Agent pane header: no background behind the top-right icons at rest

Merged
TE
3d ago
+78-25

Leo (2026-11-02): "I'VE LITERALLY FING ASKED / FOR THE FING STUPID BACKGROUND ON THE FING TOP RIGHT ICONS TO BE REMOVED / FOR FING / WEEKS". Earlier (2026-10-31): "AND THE FING BACKGROUND ON THIS FING BUILD ON THESE BUTTONS STILL ISN'T F***ING REMOVESD".

What was drawing it

With the chat's tools in the pane's tab row (chrome.tabs.rowTools, on by default), the page is transparent at html but .acpmux-shell still painted --agent-page-bg over the whole pane, the tab row included. The tabs sit on the native row; the tools (Session Info, terminal, changes, browser, files) sat on a block of the page's color that ended at the pane's ⋯. That block is the background.

Regressed by: #20933 put the tools in the tab row while the shell kept its background. #25638 (git log -S'html:has(.acpmux-shell[data-tab-row])') made html transparent but left the shell's color. #28962 later removed per-button plates, which is why the complaint outlived it.

Change

  • header.css: .acpmux-shell[data-tab-row] paints the page color only below the row (a hard-stop gradient at --acpmux-tab-row-height), so the icons sit directly on the row.
  • Only the button under the pointer shows a hover pill. A toggle whose panel is open, or a button whose menu is open, shows the filled rounded square, as in Leo's reference, where only the toggled-on button is filled. The focus ring stays; the shared focus gradient stays off. Embedded and floating headers match.
  • Takes back #28962: its pressed-and-hover "no fill" was not what Leo meant. The background was the shell band, and his reference shows a fill on the toggled-on button.

Test

webviews/test/chat-header-tab-row-surface.test.ts (committed red first in 897c56f7b8c):

  • A new pixel test renders the shipped CSS with the tab-row shell. The pixels behind the tools must be the row's color, not --agent-page-bg, and below the row they must be the page color.
  • The per-state cases now assert: nothing at rest, focused or disabled; the hover pill only on hover; the on fill only while pressed or with a menu open. This covers all four header hosts.

Observed / Not run

  • Observed: scripts/web-lint.sh passed (fast checks; the type-aware lint is left to CI on this host).
  • Not run yet: the browser-lane test through cmux-ci. Results will be posted on this PR. No Mac capture yet: this VM has no fleet client.

Changelog

Fixed: The agent pane header's top-right icons no longer sit on a background; only hover and an open panel's toggle are highlighted.

Agent session: agent session

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the agent pane header's top-right icons showing a background band at rest, so the icons now sit directly on the tab row like the tabs beside them.

Bug Fixes

  • The shell paints the page color only below the tab row, not behind the tools.
  • Icons show no background at rest; hover shows a pill, and a toggle with an open panel or a button with an open menu shows the filled rounded square.
  • Reverts the previous removal of all fills on pressed states, matching the reference where only the toggled-on button is filled.