Skip to content

feat(desktop): show or hide Files changed's tree with ⇧F, drag it wider, and leave a strip of its files while it is hidden - #3799

Merged
luke-agent[bot] merged 19 commits into
mainfrom
luke/files-changed-tree-strip-resize
Oct 19, 2026
Merged

luke-agent[bot] merged 19 commits into
mainfrom
luke/files-changed-tree-strip-resize

Conversation

@dastratakos

@dastratakos dastratakos commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

T2 of the "File tree: viewed and counts" stack. It's stacked on #3798 (T1), which is stacked on #3794.

  • ⇧F shows or hides the tree.
    • It's a new row in @luke/settings/shortcuts' Files changed table, under a new "Panels" group, as stage-cli groups it. So the ? sheet and Settings › Keyboard shortcuts list it, and changes-list.tsx's keyRuns handles it.
    • Like the view's other plain keys, it only works while focus is inside Files changed and you're not typing. It doesn't clash with any app chord: ⌘F is Find and ⌃⌘F is Full screen.
    • It acts where the tree is seen. In a panel wide enough, it opens or closes the tree beside the list. In a narrow panel, it opens or closes the floating tree.
  • Resize: a drag handle on the tree's left edge, using the app's own useResizableEdge.
    • The width runs from 220 to 480 px, defaults to 264, and always leaves the list 320 px.
    • It supports the arrow keys and Home/End, Enter or a double-click resets it, and dragging past the minimum shuts the tree.
    • The width is kept in renderer storage (luke.fileTreeWidth), the same way the Inbox list's and the Runs panel's widths are kept (folded-groups.ts). It's one width for every File and Changes tab, matching how the tree's open state is already shared.
    • With a wider tree, T1's +N −M counts show on most rows.
  • Collapsed strip: while the tree is hidden in a wide enough panel, a 12 px strip stands in its place (changes-strip.tsx).
    • It has one mark per changed file, in tree order, coloured by status the same way as the tree's letters. Viewed files are dimmed, and the file the bar names stands out.
    • Resting the pointer on it peeks the tree out over the list, through the same usePaneRoom float as the narrow panel's floating tree. Leaving puts the tree away again, and choosing a file closes it.
    • It's hidden from assistive technology, which reaches the tree through its toggle and ⇧F.
    • The panel's narrow layout is unchanged: it keeps its edge peek and doesn't show the strip.

Screenshots

PR #3645 in the Files changed harness (Chromium, the panel's real CSP and stylesheet).

strip (tree hidden) strip hovered: tree peeks tree dragged to 400 px
dark 900
light 900
dark 600
light 600

Tests

New tests in agent-changes-tab.test.ts:

  • ⇧F toggles the tree, and does nothing while typing in its search.
  • The tree wears the kept width, and its edge (Resize files) asks for the default on Enter.
  • With the tree hidden, the strip draws a mark per file in tree order, with status, viewed and current. Pointing at it peeks the tree.

The sheet's and the Settings page's literal rows gain "Show or hide file tree ⇧F".

I also checked by hand in the harness:

  • dragging the edge 120 px stores and draws about 387 px;
  • ⇧F hides the tree and shows the strip at 900, and opens the floating tree at 340.

Evidence

  • pnpm check:affected ran out of memory in discarded-effect on T1. For T2 I ran the fallback list, and everything passed:
    • tsc --noEmit for panel, settings and desktop: clean;
    • vitest --project panel --project settings: 201 files, 2133 tests passed;
    • ./scripts/oxlint.sh: 0 errors;
    • biome check: no errors;
    • pnpm knip: clean;
    • ./scripts/repository-checks.sh: passed.
  • cd apps/desktop && node scripts/build.mjs: passed, bundle budget included.

Invariants

  • Checks green locally, as listed above.
  • JSON Schema goldens unchanged.

Made with Luke

View guided diff Turn on auto-fix

dastratakos and others added 16 commits October 19, 2026 03:24
…-cli does

Minimize inline comments folded each open thread to its head row, and left
resolved and outdated threads as they were, since those already stand
folded; on a pull request whose threads were resolved it changed nothing
to see. It now means what stage-cli's means: each line's threads draw as
one chip at the end of the line, in a row of no height, so the diff reads
as if the line held no comments. The chip names who wrote on the line,
how many comments, and how many are open; pressing it shows or hides the
line's threads, and the tab's find reads them and opens the line it
brings into view. I turns the setting on and off inside Files changed.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…on no line a row for their chip

Two findings from review. The chip's fold was drawn anew each time it
opened or closed, so a find that opened a resolved thread's own fold inside
it had that fold drawn closed again, and a keyboard press lost the focus;
the fold is now kept and told whether it is open. And the chip of threads
on no line, above the diff or under a file's picture, floated up over what
stood before it; it now takes a row of its own.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…iet fold and a clearer header

Each file's code area kept room for a scroll bar up and down, which a Mac
that always shows scroll bars drew as a strip at the end of every line, so
the rows and the bands between hunks stopped short of the file's header.
The code area keeps none now, and the header, the bands, the rows, and the
threads share one left and one right edge.

Each file is a card on the panel's ground, rounded whole and set apart by
the room between files; its header stuck at the top stands square, the
card's rounded top scrolled away. The fold is a compact quiet mark with no
fill while its file is open. The header names the file's folder quietly
and its name in the full ink, cutting the folder first where the row runs
short; its letter stands on a tint of its own colour; and Viewed says V in
its hint. The bands between hunks are 24 px and quieter, and the tree's
search stands level with the first card.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…anged-design

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Adds I to Files changed's shortcut table (Review group) and to its dispatch record, after #3795.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Viewed's hint now reads V from Files changed's shortcut table (#3795).

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
… Files changed's tree rows

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…drawn

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…anding in the marks' place

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…he tree's tests on no clock

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…er, and leave a strip of its files while it is hidden

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 19, 2026 10:55am UTC

Request Review

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot marked this pull request as ready for review October 19, 2026 06:04
devin-ai-integration[bot]

This comment was marked as resolved.

…ee edge where no drag could widen it

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Base automatically changed from luke/files-changed-tree-viewed-counts to main October 19, 2026 10:46
…ee-strip-resize

# Conflicts:
#	packages/panel/src/styles/tasks.css
#	packages/panel/src/tasks/agent-changes-tab.tsx
#	packages/panel/src/tasks/changes-list.tsx
@luke-agent
luke-agent Bot enabled auto-merge October 19, 2026 10:53
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 84358db Oct 19, 2026
11 checks passed

This branch was successfully deployed

1 active deployment
Preview — ce797057 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant