Skip to content

feat(web): resizable Git Changes panes and next/previous change across files - #241

Merged
mubeda merged 4 commits into
mainfrom
v015b/211-git-diff-panes-nav
Nov 2, 2026
Merged

mubeda merged 4 commits into
mainfrom
v015b/211-git-diff-panes-nav

Conversation

@mubeda

@mubeda mubeda commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Closes #211

Changes

Resizable panes in Git Changes

  • Two handles: one between the file list and the diff (it sets the list height), and one above the commit form (it caps the form's height; a taller form scrolls). The diff takes the rest.
  • Keyboard: ArrowUp/ArrowDown, Home/End, and double-click resets.
  • Sizes are remembered per browser (bibcode:git-changes-list-height, bibcode:git-changes-commit-height), the same way as the Pull Requests file column.
  • Reuses useResizableWidth, which gains an optional axis: "y".

Next/previous change across files

  • F7 / Shift+F7 (diff.nextChange / diff.previousChange, the same as Compare) and the shared button step through a file's change blocks, then continue into the next or previous file. They stop at the ends of the list.
  • A pure resolveChangeStep in changeNavigation.logic.ts does the stepping. The shared button moved to diffs/ChangeNavigationButton.tsx, with a disabledReason.
  • Disabled buttons say why: "This is the first change in the list.", "This is the last change in the list.", or "Loading this diff…" while the read is pending or the renderer is still preparing.
  • Binary, too-large and other non-patch files are passed over. A file whose read failed stops navigation and shows its error, including when stale cached data is shown.
  • Keyboard focus returns to the diff section after a step across files, so F7 keeps working.

Docs: docs/user/keybindings.md, docs/user/workspace-ui.md, docs/architecture/overview.md, and Git Manager step 3 in docs/testing/cross-platform-validation.md.

Validation

  • vp test run --project unit src/components/gitManager src/components/diffs src/hooks src/keybindings.test.ts src/components/pullRequests (apps/web): all pass. 658 tests pass in gitManager/diffs on the final commit.
  • Fails-before evidence:
    • changeNavigation.logic.test.ts: 7 tests.
    • useResizableWidth axis tests and GitManagerChangesPanes.test.tsx: keys, persistence, reset and restore.
    • GitManagerChangesView.navigation.test.tsx: 14 tests through the real view, covering a pending read, a failed read, stale data with a pending or failed refresh, focus across files and at a trailing binary file, and a delayed renderer.
  • vp check: pass. vp run typecheck (apps/web): pass.
  • Not run locally: a packaged desktop e2e. The runbook step is the manual check.

Review

  • Codex: 4 rounds. Rounds 1–3 found loading and failed files being skipped, lost focus, cached data bypassing the guards, and a renderer that wasn't ready yet. All are fixed with tests, and round 4 was CLEAN.
  • vercel-react-best-practices: run. Arrival position is derived during render; the effect only scrolls. UI.md: run. Disabled states explain themselves, handles are keyboard-accessible, and F7 matches Compare.
  • Not run: an advisor review, because no advisor tool was available in this session.

Profiler coverage: none applies. This is web-only UI with no processes, RPC, worktree removal, shutdown or events.
Runbooks: cross-platform-validation.md updated; the other docs/testing runbooks were reviewed and remain accurate.

Known limitations

  • Not built: the issue's optional extras (maximise or pop-out diff, collapsible commit form, side-by-side view, overview bar, changes-only focus).
  • When every remaining file is binary or non-patch, Next stays enabled, lands on the last such file and goes inert. Knowing in advance would need every later diff read up front.
  • The newly selected row is not scrolled into view inside the virtualized file list.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P

mubeda and others added 4 commits November 1, 2026 19:01
…s files (#211)

The Changes tab gets draggable, keyboard-accessible handles between the file
list and the diff and above the commit form (sizes remembered per browser, via
useResizableWidth with a new vertical axis). Previous/Next change buttons and
the existing diff.nextChange/diff.previousChange shortcuts (F7/Shift+F7) walk
the blocks of the selected file and continue into the adjacent file, stopping
at the ends of the list with a tooltip that says why.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
…nd keep focus

Next/Previous change now waits for a diff that is still loading (buttons say
so), stops on a file whose read failed so its error shows, and only passes over
confirmed unsupported content (binary, too large). Crossing a file boundary no
longer drops keyboard focus: the new pane takes it back when nothing else holds it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
…focus at the end

Readiness now follows the query's pending and error status for the current
request, so held data from an earlier read (for example a large-text result)
no longer lets a refreshing or failed file be passed over, and a failed refresh
shows its error even when older data is held. A step that ends on a trailing
unsupported file keeps keyboard focus in the diff.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
…nge navigation

Next/Previous change and F7 stay inert, with the "Loading this diff…" reason,
until the lazily loaded renderer can scroll, so a step no longer advances past a
block whose scroll was dropped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YWW672NbkSQaa8cTJBLP3P
@github-actions github-actions Bot added size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Nov 2, 2026
@mubeda
mubeda marked this pull request as ready for review November 2, 2026 07:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T07:42:15.429514Z eae98a0 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-02T07:42:37.428459Z eae98a0 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mubeda
mubeda merged commit fd98b43 into main Nov 2, 2026
42 of 50 checks passed
@mubeda
mubeda deleted the v015b/211-git-diff-panes-nav branch November 5, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Git Changes diff: resizable panes and next/previous-difference navigation across files

1 participant