Skip to content

feat(desktop): copy a file's path from its header, fold it from anywhere on its row, and fold every file with ⌥ - #3796

Merged
luke-agent[bot] merged 13 commits into
mainfrom
luke/files-changed-header-actions
Oct 19, 2026
Merged

luke-agent[bot] merged 13 commits into
mainfrom
luke/files-changed-header-actions

Conversation

@dastratakos

@dastratakos dastratakos commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Part of the stage-cli features the developer chose for Files changed: header actions, modelled on stage-cli's components/chapter/file-header.tsx. Stacked on #3794 (the design pass).

  • Copy the path. Pressing the path in a file's header copies the full path, shows the "Path copied" toast, and the hint reads "Copy path".
    • A renamed file shows two buttons: Copy old path and Copy new path.
    • Each is a real @luke/ui TextButton with an accessible name such as "Copy path: src/seats.ts".
  • Fold from the row. A press anywhere else on the header row folds or unfolds the file. The fold arrow, the path buttons, Viewed and the other controls keep their own presses. The fold arrow stays the row's keyboard control, and ; still folds the file stood on.
  • ⌥-click the fold arrow folds every file the filter keeps, or unfolds them all, the same as ⇧;. The hint reads "Collapse file · ⌥-click for all files ;".
  • toggleAll now reads the latest folds through a ref, as toggle does. That keeps it a stable prop, so passing it to every header doesn't redraw every file.
  • The header hints still mount lazily (perf(desktop): draw only what changed in Files changed on a key or a scroll #3733). Their arrival handling now covers the path buttons too: a pointer resting on a path, or keyboard focus on it, still gets its hint, and focus is restored.

Screenshots

Harness: the real Pull request tab on PR #2908, Chromium.

light dark
path hint
fold hint, with ⌥

Evidence

  • tsc --noEmit for panel and desktop: clean.
  • ./scripts/oxlint.sh: 0 errors.
  • pnpm knip: clean.
  • ./scripts/repository-checks.sh: passed.
  • biome check: no errors.
  • vitest run --project panel --project desktop: 231 files, 2366 tests passed.
  • New tests in agent-changes-tab.test.ts:
    • The header copies src/seats.ts, src/old/plan.ts and src/plan.ts from the three buttons, and a copy folds nothing.
    • A press on a header's row folds that file alone.
    • ⌥ with a press on the fold folds every file, and a second one unfolds them all.

Invariants

  • Checks green locally, as listed above.
  • JSON Schema goldens unchanged.
  • Behaviour tested.
  • No new as.
  • No raw async primitives.
  • Test count +2.
  • Deps unchanged.

Made with Luke

View guided diff Turn on auto-fix

dastratakos and others added 8 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>
…ere on its row, and fold every file with ⌥

A file's header now copies the path it names on a press, as stage-cli's
does, a renamed file's old path and new path each its own; a press anywhere
else on the row folds the file, its controls keeping their own presses;
and ⌥ with a press on the fold folds every file the filter keeps, or
unfolds them all, which the fold's hint says.

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>
…er-actions

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.

1 Skipped Deployment
Project Deployment Actions Updated
luke-web Ignored Ignored Preview Oct 19, 2026 10:42am UTC

Request Review

luke-agent Bot added a commit that referenced this pull request Oct 19, 2026
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
dastratakos and others added 3 commits October 19, 2026 04:53
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>
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>

# Conflicts:
#	packages/panel/src/tasks/agent-changes-tab.test.ts
Base automatically changed from luke/files-changed-design to main October 19, 2026 10:41
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>

# Conflicts:
#	packages/panel/src/styles/tasks.css
#	packages/panel/src/tasks/changes-list.tsx
@luke-agent
luke-agent Bot marked this pull request as ready for review October 19, 2026 10:41
@luke-agent
luke-agent Bot enabled auto-merge October 19, 2026 10:41
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 19, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +1587 to +1589
.diff-list-path-part[data-moved] {
flex: 0 1 auto;
color: var(--luke-color-text-muted);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Current filename clips before old path

When a renamed file has a long old path, .diff-list-path-part shrinks both paths instead of yielding old-path space first. The current filename becomes truncated while part of the old path remains visible.

Learn more

A renamed header displays the old and current paths as separate flex items within the width-limited path container. Both items can shrink, so a long old path consumes width that the current filename needs. The current file name was previously a direct child of the path container, where the preceding old-path text could shrink first.

Example: With a long previousPath such as packages/legacy/generated/deeply-nested/report.ts and a short current path src/report.ts, narrowing the panel can ellipsize report.ts while still displaying report.ts from the old path.

Recommended fix: Give the current path priority when the renamed header shrinks, allowing the old path's folder and name to truncate first. Verify both names on a narrow panel, and retain truncation for current paths that cannot fit even after the old path yields.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Merged via the queue into main with commit 71302aa Oct 19, 2026
11 checks passed
@luke-agent
luke-agent Bot deleted the luke/files-changed-header-actions branch October 19, 2026 10:49
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