Fix the command palette's overflow, width, chrome, and selection colour - #360
Merged
Conversation
A list overlay's border, title, and filter rows are unavoidable, but the geometry resolver could still hand it fewer rows than that when the transcript floor and prompt claimed the rest first. With ~30 palette commands on a short terminal, this squeezed the overlay host below its own render minimum: the box painted more rows than it was assigned, spilling into and past the prompt box below it. The resolver now treats an open overlay's chrome as a second floor alongside the transcript's, collapsing other chrome further (down to relaxing the transcript floor) before it will starve the overlay below what its own border and first content row need. Callers report that minimum explicitly rather than the resolver guessing it from an opaque row count.
The palette host floats with absolute left/right insets over the landing screen, which escape root's padding — so it spanned the full terminal width while the prompt box below it, sized in normal flow, stayed inset by the shared side margin. The two stacked boxes visibly misaligned on both edges. The float now takes its left inset and width from the same layout.sideMargin / layout.contentWidth the prompt box already resolves through, rather than assuming the padding edge sits at column zero.
Two pieces of palette chrome duplicated information already on screen: a per-row category column (command/config/session/...) when the command name already says what it is, and a title rule (- command palette -) repeating what the box border and filter row already establish. Both are gone; rows reflow into the reclaimed width so descriptions truncate later, and the shortcut column still lines up. Every other list overlay keeps its title rule — only the palette, which is unambiguous from context and reads its own filter query as a second header, drops it.
The active row painted a filled grey background across its full width, the one list overlay in the shell that did — every other picker already marks its active row by upgrading the text colour and nothing else. Selection now works the same way here: the active label goes full-emphasis text, the rest stay dimmed, and the cursor reads unmistakably while arrowing through the list without a background fill competing with the accent colours already in the box.
TheGreatAxios
force-pushed
the
cl-5581-palette-pass
branch
from
August 7, 2026 07:59
f483acf to
bd4c380
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
layout.sideMargin/layout.contentWidththe prompt box resolves through, so the two boxes share one width and align on both edges.Verification
bun run typecheck,bun run build, andbun run test(bun test ./src ./tests ./evals) all pass: 3969 pass, 0 fail.geometry.test.ts(overlay height never exceeds terminal rows across 4–12 row terminals with a 48-row overlay request; overlay honors an explicitminBodyRows),palette-paint.test.ts(shared box edges while floating, no title rule, no marker/category column, selection reads viafgnotbg).Closes CL-5581
Closes CL-5582
Closes CL-5583
Closes CL-5584