fix(cmux-next editor): the find pill stays inside a narrow editor
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
- This PR: code editor find pill in a narrow pane
- Next: diff toolbar covering its dropdown at 560, passwords header at 360, agent-activity split at 480
What
In a narrow code editor, the find pill with Replace open ran off the pane's left edge. At 360px it started at xโโ39, which clipped the expand chevron and cut the Replace placeholder to "place". .ed-find was absolutely positioned with only right, so the pill kept its 150px fields and grew leftwards.
.ed-find now has the left inset too, with the pill packed right in a click-through band (pointer-events: none; the pill already sets auto). The pill and its rows can now shrink (min-width: 0), so in a narrow pane the fields give way down to their 40px minimum, in both Find's one row and Replace's two. At normal widths nothing moves, because the pill is still sized to its content and pinned top right.
Test
CMUX_BROWSER_TESTS=1 bun test test/editor-find-narrow.test.tsx (real Chromium) renders the pill with Replace open inside .ed-frame at 360px and 300px, with Replace closed and open. It checks that the pill stays within the 10px insets and that every button and input stays inside the pill.
- Base: fails. The pill's x is โ39.45 at 360px and โ99.45 at 300px.
- First fix: Replace-closed failed, because the row kept its 389px min-content and Close went off-screen. The reviewer caught it, and the test now covers it.
- Head: 4 pass.
Screenshots
Gallery editor.find-bar at 360px. "Before" is the base gallery. "After" is the same gallery page with this PR's two rules injected. The advisory capture didn't help here: it rendered base, then exited before the head stage.
| Before | After | |
|---|---|---|
| Replace, dark | ![]() | ![]() |
| Replace, light | ![]() | ![]() |
| Find, dark | ![]() | ![]() |
| Find, light | ![]() | ![]() |
Observed / Not run
- Observed: the test above, red then green, on huge-blue.
prepush-gate.py: no new violations. - Not run locally:
bun run check, because heavy lints moved off huge-blue. CI's web lint runs it.
Changelog
Fixed: the code editor's find bar stays inside a narrow editor instead of running off its left edge.
Agent session: huge-blue
๐ค Generated with Claude Code







