fix(cmux-next path picker): a long folder keeps a 30px filter field and its rows apart

Merged
TE
15d ago
+78-4

Layout pass, running list (lane: layout-pass; full list in cmuxterm-hq knowledge/layout-pass.md)

  • Merged: #22785 Settings, #22825 Markdown toolbar, #22839 Chief latency bars, #22847 Harnesses, #22862 gallery Settings cascade, #22872 code editor find pill, #22880 gallery model picker, #22904 Passwords header, #22917 Agent Activity split
  • Open: #22897 diff toolbar beside the files sidebar, #22954 Stats week and month
  • This PR: the path picker over a long folder
  • Next: from the HQ list (history double highlight, apps header offset)

What

The path picker ("Choose a folder") virtualizes a folder with more than 120 rows. In that state it had two layout bugs.

  • The filter field drew 20px tall instead of 30px. The picker is a flex column. The virtual list's flex basis is its full content height (300 rows × 28px), so shrinking to fit also took height from the field. The field is now flex: none.
  • The first folder overlapped the next by 4px. A 4px margin-top was meant to separate folders from Locations. Virtual rows are placed absolutely at fixed 28px steps, so the margin moved the first folder (surface-000 here) 4px into the one below. In a short folder the rule never matched anything, because the Locations rows sit inside their own labelled group. The rule is deleted, so a short folder looks the same as before.

The hint, header and footer heights are unchanged (16, 29 and 43px, before and after).

Test

CMUX_BROWSER_TESTS=1 bun test test/path-picker-long.test.ts (real Chromium, a harness over the gallery's virtualized fixture at 620px):

  • the field is 30px tall;
  • no row's bottom passes the next row's top.

Results:

  • Base (red commit): fails with a field height of 20.
  • With only the field fix: the overlap check fails.
  • In the locations, parent-folder and recent-folders gallery states the old selector matched 0 rows, so short folders don't change.
  • Head: passes.

Screenshots

Gallery viewer-empty.path-picker / virtualized. "Before" is the gallery, "after" is the same page with this PR's rules injected.

BeforeAfter
620, dark
420, light

Observed / Not run

  • Observed: the test above, red then green. tsc --noEmit reports no errors in the changed files. Clean: oxlint, vp fmt and the check:* scripts. prepush-gate.py: no new violations.
  • Not run locally: the full vp check and a gallery build, because heavy jobs are off huge-blue.
  • Noted, not changed: the hint under the field repeats the placeholder word for word ("Type to filter, or start with / to type a path"). That is a copy change, not layout.

Changelog

Fixed: in a folder with many entries, the folder picker's filter field no longer shrinks and the first folder no longer overlaps the next.

Agent session: huge-blue

🤖 Generated with Claude Code