Repository navigation
feat(tui): /diff v2 — search, review marks, split view, staging - #425
Merged
Merged
Conversation
Four additions to the review mode, and two redesigns the PTY forced. / searches within the patch. The prompt takes over the bottom row and owns the keyboard while it is open — `n` is a letter there, not a file jump. Enter steps through hits, Esc closes the prompt but keeps the highlights, Tab/Shift+Tab step through them afterwards. Reloading a patch recomputes matches without moving the reader; only typing jumps. m marks a file reviewed and advances to the next unreviewed one, because the value of the mark is knowing what is left. A file whose patch content changes loses its mark: a tick is a claim about content that no longer exists. v switches to split view, old on the left and new on the right, with removals blanking the right column and additions the left so the two stay aligned. s and u stage and unstage the selected file. Working-tree source only, and only these two — both are reversible, which is why they need no confirmation. Discarding work stays unbound even though discard_hunk exists. Split view had to hide the explorer. The patch pane never reaches a readable split width beside it: widening the terminal hands the extra columns to the conversation sidebar, so at 200 columns the pane was still ~62. `v` now hides the explorer — redundant while reading one patch, since the header names the file — and restores it on the way out. SPLIT_MIN_WIDTH is 72, 36 per side. The header had to shrink. Appending source, layout and search state pushed them past the ~50 columns the pane really gets, where they were invisible. The default source is now unnamed (only "last turn" earns words), layout and search moved to the bottom row, and a long path is elided from the left so the counts and "N of M" survive — that is the state you cannot read anywhere else. The inline hint row holds five of the thirteen bindings, chosen so the verbs still fit; `?` carries the rest and never leaves the row. Claude-Session: https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
Four additions to the review mode, and two redesigns the PTY forced. / searches within the patch. The prompt takes over the bottom row and owns the keyboard while it is open — `n` is a letter there, not a file jump. Enter steps through hits, Esc closes the prompt but keeps the highlights, Tab/Shift+Tab step through them afterwards. Reloading a patch recomputes matches without moving the reader; only typing jumps. m marks a file reviewed and advances to the next unreviewed one, because the value of the mark is knowing what is left. A file whose patch content changes loses its mark: a tick is a claim about content that no longer exists. v switches to split view, old on the left and new on the right, with removals blanking the right column and additions the left so the two stay aligned. s and u stage and unstage the selected file. Working-tree source only, and only these two — both are reversible, which is why they need no confirmation. Discarding work stays unbound even though discard_hunk exists. Split view had to hide the explorer. The patch pane never reaches a readable split width beside it: widening the terminal hands the extra columns to the conversation sidebar, so at 200 columns the pane was still ~62. `v` now hides the explorer — redundant while reading one patch, since the header names the file — and restores it on the way out. SPLIT_MIN_WIDTH is 72, 36 per side. The header had to shrink. Appending source, layout and search state pushed them past the ~50 columns the pane really gets, where they were invisible. The default source is now unnamed (only "last turn" earns words), layout and search moved to the bottom row, and a long path is elided from the left so the counts and "N of M" survive — that is the state you cannot read anywhere else. The inline hint row holds five of the thirteen bindings, chosen so the verbs still fit; `?` carries the rest and never leaves the row. Claude-Session: https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs
mohitranka
added a commit
that referenced
this pull request
Sep 11, 2026
Four additions to the review mode, and two redesigns the PTY forced. / searches within the patch. The prompt takes over the bottom row and owns the keyboard while it is open — `n` is a letter there, not a file jump. Enter steps through hits, Esc closes the prompt but keeps the highlights, Tab/Shift+Tab step through them afterwards. Reloading a patch recomputes matches without moving the reader; only typing jumps. m marks a file reviewed and advances to the next unreviewed one, because the value of the mark is knowing what is left. A file whose patch content changes loses its mark: a tick is a claim about content that no longer exists. v switches to split view, old on the left and new on the right, with removals blanking the right column and additions the left so the two stay aligned. s and u stage and unstage the selected file. Working-tree source only, and only these two — both are reversible, which is why they need no confirmation. Discarding work stays unbound even though discard_hunk exists. Split view had to hide the explorer. The patch pane never reaches a readable split width beside it: widening the terminal hands the extra columns to the conversation sidebar, so at 200 columns the pane was still ~62. `v` now hides the explorer — redundant while reading one patch, since the header names the file — and restores it on the way out. SPLIT_MIN_WIDTH is 72, 36 per side. The header had to shrink. Appending source, layout and search state pushed them past the ~50 columns the pane really gets, where they were invisible. The default source is now unnamed (only "last turn" earns words), layout and search moved to the bottom row, and a long path is elided from the left so the counts and "N of M" survive — that is the state you cannot read anywhere else. The inline hint row holds five of the thirteen bindings, chosen so the verbs still fit; `?` carries the rest and never leaves the row. Claude-Session: https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs
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.
Re-targets #424 at
main. That PR was merged intofeat/diff-view13 seconds after #423 squash-merged that same branch intomain, so its commits never reachedmain— this is the identical commit, cherry-picked ontomain. No content changes.What's new
/Tab/Shift+Tabmvs/u/searchThe prompt takes over the bottom row and owns the keyboard while open —
nis a letter there, not a file jump. Enter steps through hits,Esccloses the prompt but keeps the highlights.Reloading a patch recomputes matches without moving the reader; only typing jumps. Two separate calls on purpose, so a background status refresh can't yank you to a hit.
mmark reviewedSession-scoped, and marking a file advances to the next unreviewed one — the value of the mark is knowing what's left. A file whose patch content changes silently loses its mark: a tick is a claim about content that no longer exists.
s/ustagingWorking-tree source only, and only stage/unstage — both reversible, which is why they run without a confirmation. Discarding work stays unbound even though
git_review::discard_hunkexists.Two redesigns the PTY forced
Split view had to hide the explorer. The patch pane never reaches a readable split width beside it — widening the terminal hands the extra columns to the conversation sidebar, so at 200 columns the pane was still ~62.
vnow hides the explorer (redundant while reading one patch; the header names the file) and restores it on the way out.SPLIT_MIN_WIDTHis 72, 36 per side.The header had to shrink. Source, layout and search state had been appended past the ~50 columns the pane actually gets, i.e. invisible. Now:
last turnearns wordssplitright-aligned; the search prompt replaces the hints while open)N of Msurvive — that's the state you can't read anywhere elseNotes
The inline hint row holds five of thirteen bindings, chosen so the verbs still fit at ~50 columns.
?carries the rest and never leaves the row.Verification
Re-verified after the cherry-pick onto
main:cargo fmt --all -- --checkclean ·cargo clippy --all-targetsclean · 55 diff tests pass.Originally driven in a PTY: search prompt with live
1 of 3counter and Enter cycling;madvancing with the header showing1 reviewed;vproducing a real side-by-side with the explorer gone andsplittagged on the hint row, then restoring both;sstagingtests/test_report.py(confirmed withgit diff --cached).https://claude.ai/code/session_018ihDDc3ahfrxu5AYL9moXs