Repository navigation
Ghost buttons: one balanced primitive for icon+label buttons (cx-s6zvc) - #19771
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ui/ghost.css: the inset before an icon is the inset after the label minus the icon's side bearing (8 - 2 px at 28 px, 6 - 1.5 px at 22 px; a trailing chevron sets its own bearing), a 6 px icon gap (4 px small), rows 2 px apart, medium labels with Apple's tracking for the size. New Tab's tools and Integrate a harness, the other New Tab style's actions, and the composer footer's folder and branch buttons use it; the pane loads ghost.css on its own since it does not load ui.css. Settings rows and toolbars have no icon+label buttons (text or icon only), so they are unchanged. Red: New Tab ink-before vs after off by 3 px, footer by 2.5 px. Green: bun test test/ghost-button-balance.test.ts (Chromium, gallery stages), 2 pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ghost-buttons # Conflicts: # webviews/src/agent-session/acpmux/NewTabPage.tsx # webviews/src/agent-session/acpmux/newtab/NewTabScreen.tsx
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Base's ghost buttons (#19771) restyled the New Tab tools row this branch removes: the "Integrate a harness" note keeps the ghost classes, and the ghost balance test measures the composer footer's folder button only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gallery1570 states changed: agent-pane.new-tab/tool-menu-open, agent-pane.new-tab/tool-menu-keyboard, agent-pane.new-tab/from-location, agent-pane.new-tab/omnibar-row-kinds, agent-pane.new-tab/switcher-off, ... · 16 broken states · 75 play checks failed Diff page and renders (the run's 1564 more on the diff page. Live preview (follows this branch; start it with
Play checks failed (0 px anchor movement, 0 layout shift, no frame over 33 ms unless the entry gives a reason):
401 nondeterministic states differed from a second render of the same head (a clock or fixture leak) and are not counted as changes. |
* test(agent-pane): the shipped page carries every stylesheet the pane imports The pane bundle drops CSS and build-agent-pane-web.sh writes the page's style from a fixed list, so ui/ghost.css (#19771), addProject.css, harnesses.css, replay.css and markdown-task-checkbox.css never reach the app. bundle.mjs --css-inputs lists the imported sheets; the test checks each one's rules are in the built index.html. Fails on the current base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(agent-pane): ship ghost, harnesses, replay, add-project and task-checkbox styles The pane bundle drops CSS imports, so the page build concatenates sheets from a hand-kept list. Five imported sheets were missing from it, leaving New Tab's quick tools, Harnesses, Replay, Add Project and reply checkboxes unstyled in the app. Add them, and fail the build when the bundle imports a sheet the page does not contain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(agent-pane): read the imported sheets without compiling the pane The style test bundled the whole pane through the React Compiler, which ran alongside the browser tests on CI and slowed them into timeouts. --css-inputs-only lists the sheets with esbuild alone in about a second. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>






Icon+label ghost buttons now share one primitive with optical padding, so their hover pills look even and their rows read tight (cx-s6zvc, Leo's polish note).
The primitive (
webviews/src/ui/ghost.css,.ui-ghost):.ui-ghost-row): 2 px apart, tighter than a button's own inset, so neighboring hover pills nearly touch..ui-ghost-sm): 22 px tall, 4.5/6 px insets, 4 px gap, for the composer footer.The agent pane doesn't load
ui.css, so the pane importsghost.csson its own, andui.cssimports it for the other pages. Callers keep their own colors.Moved onto it:
Checked, not changed: the settings rows and the toolbars have no icon+label buttons. Their buttons are text-only (Commit, Push, settings buttons) or icon-only. op-next-motion's removal of Integrate a harness from the tools row landed during this PR; the base merge takes that.
Before and after: this PR's gallery render jobs (base vs head) show the New Tab page and
agent-pane.composer-context. These are the stages the test measures.Verification
test/ghost-button-balance.test.ts(Chromium, on the real gallery stages). Red on base plus the test: New Tab's ink before the icon vs. the inset after the label off by 3 px; the footer's folder vs. chevron off by 2.5 px. Green: 2 pass.bun run check,ui-rules,gallery-coverage,composer-location-side,new-tab-no-agent,new-tab-default-agentandchat-new-worktreepass.Changelog
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes uneven padding on icon+label ghost buttons so hover pills look optically balanced: the inset before an icon is now the inset after the label minus the icon's side bearing, and rows of buttons sit tight together.
Refactors
.ui-ghostprimitive; callers keep their own colors.ghost.csson its own since it doesn't loadui.css;ui.cssimports it for other pages.Written for commit 66e5cff. Summary will update on new commits.