Repository navigation
feat(web): read all changed files' diffs in one scroll, and find in them - #388
Merged
kalaspuff merged 3 commits intoNov 5, 2026
Merged
Conversation
…them
The diff dialog showed one file at a time: moving between files meant
stepping, and the browser's find saw only the file shown. It now holds
every changed file's diff one after the other, each under a header that
stays at the top while its lines scroll, and opens at the file clicked.
All diffs come in one request (GET /sessions/{id}/diff), which fills each
file's cache; files draw their lines as they come near the view.
The list of files beside them marks the one in view and goes to another
on a click; the arrow keys (and j/k) move through it with the focus. j/k
go from file to file anywhere in the dialog, n/p from change to change.
Cmd/Ctrl+F opens a find bar over the diffs that finds in every file's
lines from where the reader is: Enter and Shift+Enter, Cmd/Ctrl+G and F3
step through the matches, Alt+C/W/R match case, whole words and regular
expressions, Escape closes the bar and then the dialog. Matches light up
with the transcript find's highlights, and the list counts them per file.
The stray yellow focus rings are gone: the header's buttons leave the
focus in the diffs, the list's rows show keyboard focus as their own
outline, and the row a click opened the dialog from gets the focus back
on closing without the keyboard's ring (data-quiet-focus).
React's StrictMode runs the dialog's effect twice in development, the second time with the focus already in the dialog: the opener has to be read as the dialog first renders, so that it gets the focus back without the ring.
This comment has been minimized.
This comment has been minimized.
From fctl's review of #388. The find bar's flag that sends the page to a match stayed set when a step or a search landed on the match the bar was at already, so a later change to the diffs scrolled back to it: each step is now an ask of its own, gone to once. A second ⌘F with the bar open left a flag set that selected the field's text at the next keystroke, which the key after it then replaced: the field is now focused and selected once for each ⌘F. And the list scrolled the opened file into view before the dialog showed, which does nothing: it does so a frame later, in the list's middle as it opens.
kalaspuff
approved these changes
Nov 5, 2026
kalaspuff
deleted the
fctl/691-after-clicking-on-a-file-in-the-file-lis
branch
November 5, 2026 21:38
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.
Summary
The diff dialog showed one file at a time and left stray yellow focus rings behind. It now holds every changed file's diff, one after the other, in one scroll that opens at the file clicked. Each file has a header that stays at the top while its lines scroll, and can fold. All diffs come in one request (
GET /sessions/{id}/diff, which fills each file's cache), and a file draws its lines once it comes near the view, so sessions with many files stay quick. The list beside the diffs marks the file in view and jumps to a file on a click.j/kgo from file to file. The arrow keys (andj/k, Home, End) move through the list, and the focus moves with them.n/pstep from change to change across files.sandwstill lay the diffs out side by side and wrap them.Verified with unit tests: the search logic, the line keys matching
parsePatch, and the dialog's keys, find, folding, bulk loading and focus return. I also drove it with Playwright in Chromium and WebKit against this repository's own #385 and #386 diffs (13 and 55 files): 55 files open in about 0.65 s with a simulated 200 ms network delay, and "diff" (894 matches) is found in about 75 ms.npm run checkand the web tests pass. Docs:docs/llms.txtand the Changes paragraph of getting started describe the new keys.Screenshots
Before: clicking a file in the list and pressing ↓ rings it in yellow; so does the next-file button after an arrow key, and the Changes row after the dialog closes.
After, the same steps: ↓ in the list went on to the next file with no ring, the header's buttons have none, and the Changes row is quiet after closing.
Finding "review" from
docs/api.md: the match it is at in brand yellow, the others lighter, and the count per file in the list.The light theme, side by side, while finding; and a phone, where the list covers the diffs while open.
Worth confirming
/still focuses the list's file filter rather than the find bar, as it did before; ⌘F is the way into finding in the diffs.n/pare new keys for the next and previous change (a run of added or removed lines), across files.fctl session
Note
Low risk. It reworks the web app's diff dialog and adds a find bar; it changes no API, storage or server code, and only affects how the session page shows diffs.
What it does. Replaces the diff dialog's one-file-at-a-time view with a single scroll through every changed file's diff, fetched together with one
GET /sessions/{id}/diff, plus a file list and a find bar (⌘F) that searches across all the diffs. The latest commit makes the find bar go to each step once and focus its field once per ⌘F, and scrolls the opened file's row into view in the list after the dialog shows.Large rewrite.
diff-dialog.tsxis rewritten and split intodiff-files.tsxanddiff-find.tsx;docs/architecture.mdstill describes the old per-file fetch.fctl review's first look at
7306cfb· 13 files, +2255 −562 · Review agent settings