Support forced review sessions and real PR working directories - #494
Open
cpaasch-oai wants to merge 1 commit into
Open
Support forced review sessions and real PR working directories#494cpaasch-oai wants to merge 1 commit into
cpaasch-oai wants to merge 1 commit into
Conversation
Add --session to reopen a saved review by JSON path or exact session slug. Reconstruct local working-tree, staged, commit-range, and pristine reviews from their original checkout, including Git, Mercurial, and Jujutsu repositories. Reopen pull-request sessions only when the remote head still matches the saved review. Allow --session with an explicit revision range while preserving the selected session's identity, metadata, comments, and reviewed state. Keep the requested range as the displayed diff and bind polling, autosaves, and active-session tracking to the selected session file. Reject incompatible pull-request targets and sessions from other checkouts. Preserve atomic, locked session updates and ensure review CLI comments are written to the explicitly selected file. Update manifest metadata for managed sessions, including canonical paths beneath symlinked review directories, without indexing external session files. Keep PR agent working directories rooted in a real local checkout instead of a virtual forge path across direct PR entry, saved PR reopening, and review-target transitions. Document the new session workflows and add regression tests for CLI parsing, saved-session reconstruction, explicit revision selection, session ownership, external comment updates, symlinked manifests, and PR working directories.
cpaasch-oai
force-pushed
the
resumesession
branch
from
July 30, 2026 17:28
b780596 to
5598fdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The use-case here is that I am reviewing
git HEADcommit. Then, as I'm reviewing I end up making changes to it and then merge them into the head commit withgit add -u ; git commit --amend --no-edit. I would like to then pick up my review, preserving old comments and the hunks/files I marked as reviewed. As the git hash of HEAD changed, doingtuicr -r HEADwill give me a fresh review-session.Doing
tuicr -r HEAD --session <the session-string shown at the end of the previous tuicr -r HEAD session>, I can restore the old comments,...AI-generated description of this PR:
Summary
--sessionto reopen a saved review by JSON path or exact session slug, reconstructing the original Git, Mercurial, or Jujutsu checkout and rejecting stale pull-request heads.Validation
cargo fmt --all -- --checkgit diff --check HEAD^ HEAD