Skip to content

Support forced review sessions and real PR working directories - #494

Open
cpaasch-oai wants to merge 1 commit into
agavra:mainfrom
cpaasch-oai:resumesession
Open

Support forced review sessions and real PR working directories#494
cpaasch-oai wants to merge 1 commit into
agavra:mainfrom
cpaasch-oai:resumesession

Conversation

@cpaasch-oai

@cpaasch-oai cpaasch-oai commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The use-case here is that I am reviewing git HEAD commit. Then, as I'm reviewing I end up making changes to it and then merge them into the head commit with git 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, doing tuicr -r HEAD will 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

  • Add --session to 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.
  • Preserve the selected session identity, comments, reviewed state, polling, autosaves, and active-session tracking when opening an explicit revision range.
  • Keep collaborative session updates atomic and ensure CLI-added comments update the explicitly selected session without indexing external session files.
  • Keep pull-request agent working directories rooted in a real local checkout across direct entry, saved-session reopening, and review-target transitions.
  • Document the session workflows and cover reconstruction, revision selection, session ownership, external updates, symlinked manifests, and pull-request working directories with regression tests.

Validation

  • cargo fmt --all -- --check
  • git diff --check HEAD^ HEAD

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant