fix(desktop): stop a long command-palette reason collapsing its label - #205
Merged
Conversation
The palette row sized its note column with an intrinsic `auto` track, which refuses to shrink below max-content, so a long disabled reason absorbed the row and starved the `minmax(0, 1fr)` label track to zero width. `overflow-wrap: anywhere` on the label then broke the name between every character, rendering "Request revision" as a 241px vertical column of letters. "Open provider authentication" was clipped by the same cause. Size the label track from its own text and give the note what is left, so the note wraps instead of the label. The label no longer breaks mid-word and truncates with an ellipsis in the extreme case. Measured at 1500x1000 on the fixture workspace: the Request revision label goes from 0px wide and 241px tall to 123px wide and 45px tall, and every row in the palette now renders its name on one line. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
A long disabled reason collapsed its command's label to zero width, and
overflow-wrap: anywherethen broke the name one character per line — "Request revision" rendered as a 241px vertical column of letters. Reported from the running app..palette-commandusedgrid-template-columns: minmax(0, 1fr) auto. The note track is intrinsic, so it sizes to max-content and refuses to shrink; the flexible label track absorbed the entire deficit down to 0.Measured, at 1500×1000 on the fixture workspace
Approve artifact(control)Request revisionOpen provider authenticationTwo rows were affected, not one. Every row now renders its name on a single line; the two long reasons wrap the note to two lines, which is the intended behaviour.
The fix
Size the label track from its own text (
minmax(min-content, max-content)) and give the note the remainder (minmax(0, 1fr)), so the note is what wraps. The label getswhite-space: nowrapwith an ellipsis for the extreme case, and losesoverflow-wrap: anywhere— a command name should never break mid-word.Audit
This is the same shape as the spine overflow fixed in the workspace redesign: an intrinsic track starving a flexible one. I grepped for both halves of the pattern across
styles.css:overflow-wrap: anywheresites are all genuinely unbreakable strings — file paths, the policy fingerprint, mono codes — and are correct.minmax(0, 1fr) autois the spine rule at ≤1180px, where the identity is designed to truncate via ellipsis and the controls must never collapse. Intentional, left alone.The palette was the only real instance.
Verification
pnpm validatepasses: 58 test files, 971 tests. CSS-only change; no markup, copy or ARIA touched. Verified by rendering the palette headlessly and measuring every row's label and note rects before and after.🤖 Generated with Claude Code