Debug: chat header tools in the pane's tab row (no top bar prototype, hq-1d)

Merged
TE
21d ago
+3366-693

Summary

Prototype for Leo's "why is there even a top bar" (hq-1d context): with the Debug toggle chrome.tabs.rowTools on, a chat pane has one row on top. Its header tools (summary, chat menu, …) move into the right end of the pane's tab row, and the separate chat header bar goes away. Off by default; nothing changes until it's turned on.

  • The strip gives up the tools' width at its trailing end, left of the pane's "…" (clamped to half the pane). Tab sizing and motion are untouched: the strip only gets a narrower frame, so Chrome-style shrinking (hq-1d/hq-4e) applies as before. No edits to NewTabSlot, NewTabPage+Open, TabStripView* or PaneController.apply.
  • Native → page: tabRow {height, trailingInset} event; page → native: pane.tabRowTools {width} (allowlisted in AgentPageOps.methods). Both convert through the page zoom.
  • New protocol PaneTabRowSharing (CmuxNextDesign); PaneContentView lays the content host under the row and keeps the strip and "…" above it.
  • Web: header/tabRow.ts (useTabRow, useTabRowTools), CSS vars --acpmux-tab-row-height / --acpmux-tab-row-inset; a slight fade where the tools meet the tabs.

Known rough edges (prototype): the page's rounded corners sit at the row's top; the warning status slot is hidden in this mode; the tools can flash once in the row before their width arrives; the lone-chat compact header is unchanged.

Stills below; the default stays off until Leo OKs it.

Showcase

DEV build on cosmic-gray at this head (fad20e4d), a mock chat, with chrome.tabs.rowTools off (today) and on. Same window, 1200x760.

Off (today)On
Few tabs, light
Many tabs, light
Few tabs, dark
Many tabs, dark

With it on, the chat gets one row back (~32pt); with many tabs, they shrink a bit more to leave room for the five tools (Chrome-style shrinking unchanged).

Testing

  • webviews/test/agent-pane-tab-row.test.ts "the same row offered again" (a page that says ready again without reloading): red on 07b38222 (waitForFunction timeout, no report), green on 4369f147.

  • Red then green: bun test test/agent-pane-tab-row.test.ts (327c783e red; 2/2 with the feature).

  • vp check clean; crash ratchet, concurrency, god-file and system-blue checks OK.

  • Fleet Release compile passes on the head (step 6a36e90f, 23695c66).

  • Tested in the app (cosmic-gray DEV on 52b49dc2): the toggle switches live; tabs, tools and chat lay out as shown.

Follow-ups (setting on only)

  • A zoom or interface-size change doesn't relayout the pane, so the reported width can be stale until the next layout.
  • The artifact panel (.acpmux-artifact) isn't offset for the row.
  • A held terminal can resize briefly during a paint hold.
  • The room/2 clamp on the tools' share isn't visible to the page.
  • Each newly offered row makes the page report the width, then 0, then the width again (the ref callback and the effect both follow it); Swift ends at the width, but a layout landing between could jump one frame.
  • No Swift test yet that pane.tabRowTools gets through the agent page host.

Changelog

none

🤖 Generated with Claude Code