Skip to content

fix(desktop): stop a long command-palette reason collapsing its label - #205

Merged
akoita merged 1 commit into
mainfrom
claude/fix-palette-row-layout
Aug 27, 2026
Merged

fix(desktop): stop a long command-palette reason collapsing its label#205
akoita merged 1 commit into
mainfrom
claude/fix-palette-row-layout

Conversation

@akoita

@akoita akoita commented Aug 27, 2026

Copy link
Copy Markdown
Owner

The bug

A long disabled reason collapsed its command's label to zero width, and overflow-wrap: anywhere then broke the name one character per line — "Request revision" rendered as a 241px vertical column of letters. Reported from the running app.

.palette-command used grid-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

Row Label width Row height
Approve artifact (control) 232 → 120px 31 → 31px
Request revision 0 → 123px 241 → 45px
Open provider authentication 114 → 217px 46 → 45px

Two 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 gets white-space: nowrap with an ellipsis for the extreme case, and loses overflow-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:

  • The other eleven overflow-wrap: anywhere sites are all genuinely unbreakable strings — file paths, the policy fingerprint, mono codes — and are correct.
  • The one remaining minmax(0, 1fr) auto is 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 validate passes: 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

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>
@akoita
akoita merged commit 89ef7a8 into main Aug 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant