refactor: show a flat file list in the Changes tab - #585
Open
EyalShechtman wants to merge 2 commits into
Open
EyalShechtman wants to merge 2 commits into
EyalShechtman wants to merge 2 commits into
Conversation
The Changes tab stacked a commit-history list above a nested folder tree. In a narrow inspector the split flipped to a column capped at 45% height, so the commit list ate half the panel before a single file was visible. Replace the tree with a flat, single-scope file list: a dimmed directory prefix that absorbs truncation beside a basename that always renders in full, with the stats and status letter right-aligned. Drop the commit list entirely -- there is no user story for browsing other commits here, and the whole-branch diff remains the default scope. Commit and Restore move to the panel header, and the inspector now opens on Changes. The Details tab's history graph still hands a commit off via diff:view-commit, so the header keeps an "All changes" button to get back, and Revert stays reachable under a commit scope -- ExecutionList was the only other caller of the git:revert IPC. Shift-click commit ranges lose their UI, but the commit-range and working-tree-range scope kinds stay in shared types so already-open and persisted editor diff tabs still resolve. Plan: tmp/done-plans/changes-tab-flat-list.md Claude-Session: https://claude.ai/code/session_01RX4RqNL69dAxVoaETQE57D
Captured from a Playwright fixture at three inspector widths plus the committed-only and commit-scope states. Each shot asserts the UI state before capturing. Claude-Session: https://claude.ai/code/session_01RX4RqNL69dAxVoaETQE57D
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 Changes tab stacked a commit-history list above a nested folder tree. In a narrow inspector the split flipped to a column capped at 45% height, so the commit list ate roughly half the panel before a single file was visible.
This replaces the tree with a flat, single-scope file list — a dimmed directory prefix that absorbs truncation beside a basename that always renders in full — and drops the commit list entirely. The whole-branch diff remains the default scope, Commit/Restore move to the panel header, and the inspector now opens on Changes.
Before / after
Screenshots
Inspector at 420px — the primary target width:
300px and 580px — the directory prefix absorbs truncation at every width. At 300px the per-row stats hide via the pre-existing
@container (max-width: 320px)rule inherited from the old tree:State variants — Commit/Restore appear only when uncommitted work exists; the "All changes" escape button and Revert appear only under a commit scope:
Full window at 420px:
What changed
Added
frontend/src/components/panels/diff/changesListModel.ts—buildChangesRowssplits each path into adirprefix andname;navigateListandtypeAheadreplace the tree's keyboard model.frontend/src/components/panels/diff/ChangesList.tsx— flat virtualized list. Ports the tree's virtualization,ResizeObservermeasurement,useScrollSurfaceregistration, perf marks, and click/double-click semantics unchanged.frontend/src/components/panels/diff/changesList.test.ts— unit coverage for the model.Removed
frontend/src/components/ExecutionList.tsx— the commit list.ChangesTree.tsx,changesTreeModel.ts,changesTree.test.ts— superseded by the flat list..pane-review-*CSS and the@container (max-width: 600px)stacking block that caused the cramped layout.CombinedDiffView.tsx(−197 lines).Changed
CombinedDiffView.tsx— single-column body; header carries the scope label, stats, Commit/Restore, Revert, and Refresh.ProjectView.tsx/SessionView.tsx— default inspector tab is nowchanges.DetailPanel's existingshowDetails = inspectorTab === 'details' || !hostedPanelfallback means this degrades safely when no changes panel exists.Deliberate decisions
commit-rangeandworking-tree-rangestay inshared/types/gitDiffso already-open and persisted editor diff tabs still resolve. No data migration.diff:view-commitstill works. The Details tab's history graph can still hand a commit to this panel, which is why the header keeps an "All changes" button — without it, that handoff would be a one-way trip.ExecutionListwas the only other caller of thegit:revertIPC; dropping it would have made revert unreachable from the entire app. It now renders gated onscope.kind === 'commit'.treetolistbox. A flat list of files is a listbox; keepingtreewould have had screen readers announcing nesting levels that no longer exist. This is why the spec files have a large diff.pane-diff-tree-*despite no longer being a tree — they're a measurement contract with the perf harness. Commented as such.Verification
pnpm typecheck— clean across frontend, main, runpane, sharedpnpm lint— 0 errors (5 pre-existing warnings inmain/src/services/skillCacheManager.ts, unrelated); Knip cleanpnpm --filter frontend test— 324 tests / 33 filespnpm teston the affected specs — 45 tests, including axe checks on.combined-diff-viewpnpm run build:frontendandpnpm run build:mainSpecs renamed
changes-tree*→changes-list*and reworked for the new roles.theme-screenshots.spec.tsalso queried the oldtreeitemrole and needed the same swap.Notes for review
.pane-changes-list-dir(flex: 0 1 auto,min-width: 0) and.pane-changes-list-name(flex: 0 0 auto). Inverting them would truncate filenames and preserve useless directory prefixes.screenshots/changes-redesign/so they render above. Happy to drop that commit if you'd rather not carry them in the repo.https://claude.ai/code/session_01RX4RqNL69dAxVoaETQE57D