feat(desktop): a breadcrumb's list of its folder is drawn in the file tree's own rows, icons, and keys

Merged
DA
7d ago
+381-87

Part 4 of Dean's file viewer polish; parts 1–3 (#2125, #2131, #2139) are merged.

Summary

A breadcrumb's dropdown looks like the file tree: the same rows, coloured icons, hover, type, and keys. In part 3 it was the window's action menu.

  • Pressing a crumb hangs a popover under it, drawn by the file tree bundle itself through a new list entry on the bundle's contract (file-tree/contract.ts).
    • The popover holds a Pierre tree of that folder's entries alone: folders first, none of them opening, and the crumb's own entry marked and holding the keyboard.
    • A press or Return chooses an entry: ⌘ opens a file in a new tab, and a folder is revealed in the tree beside the file.
  • It closes as a menu does: on Escape (which returns focus to the crumb), a press elsewhere, or the window losing focus or resizing. Pressing the same crumb again closes it.
  • The bundle loads the first time a crumb is pressed, if the tree has not loaded it already. The popover is ph-no-capture, as the tree is.

Bundle

file-tree.js is 71,444 gz (+188 on part 3), against a ceiling of 74,166. renderer.js is 739,692 gz. No budget move.

Screenshots (headless Chrome, fixture data)

Light: server crumbDark: file crumb, current marked

Verification

  • ./scripts/check.sh exits 0.
  • New tests, each failing without the change:
    • file-tree/index.test.ts, on real Pierre: the list draws folders first in coloured rows with the current entry selected; a press, ⌘-press, and Return each choose the right entry.
    • planning/file-view.test.ts: a crumb opens the list with itself marked; a choice closes it and navigates, ⌘ in a new tab; Escape returns focus to the crumb.
  • CI could not verify this. It is a desktop UI change and ./scripts/verify.sh was not run: this was written on a Linux VM. A Mac break that lands is caught at the release rehearsal on a tag (LUKE-159).

šŸ¤– Generated with Claude Code