cmux NEXT composer: the text starts 8 px after +, on one left inset in every layout

TE
5d ago
+317-0

Leo, 2026-10-31: "composer still looks like stuff with the + spacing indent to the text"

What changes

The text in every composer layout (the placeholder, the caret and a typed draft) now starts one 8 px gap after the + button, and + starts on the box's 8 px inset. Both values are two tokens defined once in the shared composer sheet (composerLocation.css): --acpmux-composer-inset (8 px) and --acpmux-composer-lead-gap (8 px). So the text sits 8 + 28 + 8 = 44 px in, as leo-workspace design/grid.md 5.1 says.

  • Chat pane, Home (an empty chat) and Quick Composer (ComposerBox): the prompt's left padding, the placeholder's left and shell mode's left inset were a local 7 px. They now use the lead gap. The + and actions margins use the inset token.
  • New Tab: the field always kept a blank 20 px glyph column (--ds-control-icon) after +, even with no ! or > glyph showing, so its text started 28 px after +. Now the column is reserved only while a glyph shows. The row's gap is the lead gap token.

No control, menu row or default changes. The + button itself (its 28 px box, glyph and menu) is untouched.

Measurements

(pending: the red and green runs fill this)

Test

webviews/test/composer-plus-text-gap.test.ts (Chromium, gallery stage) checks every layout: the + button's offset from the box's left edge, the text's start after the + button's right edge, and the rows hanging off the box. It fails when a gap is off the token. composer-alignment-centers.test.ts now expects 8 px where it expected 7.

  • Red on base: (pending)
  • Green at head: (pending)

Stills (2x, light and dark, gallery)

(pending)

Viewed after image: (pending)

Overlap

  • lane/ux-plus-menu (the + menu rework, not yet a PR) replaces New Tab's Picker with ComposerPlusMenu and keeps the acpmux-newtab-plus nt-split-plus classes and the 28 px button. This PR changes only CSS and tests, so it doesn't touch that diff or fork its tokens.
  • #27559 (draft, a grid-token baseline) moves the same chat prompt padding onto --grid-composer-inset, which isn't on base yet. Whichever lands second maps --acpmux-composer-lead-gap onto the grid token.

Changelog

Fixed: The composer's text starts 8 px after the + button in the chat, Home and New Tab, with no blank indent.

Observed / Not run

(pending)

Risk: normal. CSS insets on the composer, covered by the gallery geometry test.

Agent session: agent session

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds a gallery geometry test that verifies the composer text starts 8 px after the + button and that the + and hanging rows sit on the box's 8 px inset, in every composer layout.

  • Measures chat (normal, narrow, typed draft, image attached), Home, and New Tab (default, suggestions, narrow) in light and dark, writing JSON measurements and 2× stills to webviews/artifacts/composer-plus-gap/.
  • Fails the run when the + is not 8 px from the box's left edge, the text is not 8 px after +, or a hanging row (attachment chips, pills, foot, suggestions) is off the inset, within a 0.5 px tolerance.
  • Test-only change: red on base, where New Tab reserves a blank glyph column after + and the chat prompt starts 7 px after it.