Rework the Lite diff file header, reviewed state, and keyboard navigation - #15658
Merged
Conversation
|
This pull request changes Lite's UI, so it is labelled Attach them however you like — drag images straight into a comment, or Swap the label for |
Adds Previous/Next file navigation to the diff pane, one step above the existing Alt+arrow hunk navigation. Landing on a file scrolls its header to the top, matching what picking the file in the file list does.
CodeView makes the diff scroller focusable, so the first arrow keypress turned it :focus-visible and raised the UA focus ring around the whole pane. The file tree already suppresses its own; the diff pane shows focus on the selected lines instead.
Adds a ChangeScale component - the green/red squares that show at a glance how much of a change is additions - beside the +N -N counts, and regroups the header's trailing cluster into tallies, a separator, then the controls. The review control becomes the design's "Viewed" button: one button carrying checkbox semantics with the box drawn inside it, rather than a real Checkbox nested in a button or a label, either of which leaves two controls where the design has one. The change type badge goes, as the design has no place for it.
Clicking a file header fell through to the whole-diff container, so the next Tab restarted at the first file in the diff rather than walking the actions of the header you clicked. A tabindex of -1 makes the header mouse-focusable without adding a tab stop.
The +N -N in a file header carried no wording: the units live in the colours, which say nothing to a screen reader and little to anyone who has not learnt them. It gets a tooltip and a matching label, as the files panel's counts already have. The phrasing moves to describeLineStats so ChangeStats shares it rather than keeping a second copy of the pluralisation.
Update the workspace details toolbar button text from "Mark all reviewed/unreviewed" to "Mark all viewed/unviewed". Use wording that matches the viewed state tracked by the UI so the bulk action label is clearer and more accurate.
A file list said nothing about what had been reviewed, so the only way to find your place was to open files one by one. A reviewed file now shows a tick where its change type sits, and what the row says about it recedes - its actions stay at full strength, since dimming a control reads as disabling it. Reviewing records the version it saw, so the tick tracks the diff on show and drops as soon as the file changes again, matching the indeterminate state its diff header draws. The uncommitted list holds changes but no diffs, so useReviewedPaths fetches them for the reviewed paths alone - nothing reviewed, nothing fetched - and those are the queries the diff pane loads anyway. Both lists share one predicate so they cannot drift apart.
PavelLaptev
force-pushed
the
diff-changes
branch
from
August 30, 2026 13:56
16e3c45 to
04b97c6
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.
🧢 Changes
Related to GB-1912
Diff view work in Lite:
ChangeScalecomponent (with stories) that replaces the oldChangeTypeBadge.reviewed-pathsmodule.Before:
After:
Alt+Shift+↑/↓.Screen.Recording.2026-08-30.at.16.51.34.mov
☕️ Reasoning
The diff pane header was carrying unlabelled numbers and a badge that didn't match
the design, and there was no way to tell which files you'd already looked at or to
step between files from the keyboard. This brings the header in line with the design,
makes the line counts self-explanatory, and adds reviewed-state tracking plus keyboard
navigation so a multi-file diff can be worked through without the mouse.