cmux-next: a chat whose tools don't fit half the tab row keeps its own row

Merged
TE
16d ago
+90-2

In a narrow pane, the chat's header tools sat in the tab row under the last tab. The tab drew over the leading tools and took their clicks.

The pane gave the chat at most half the row, but the page drew all its tools from the right edge. Now AgentPaneTabRow remembers how wide the tools were the last time they were in the row. The pane offers the row only when that width fits in the half the strip gives up. Otherwise the chat keeps its own header row below the strip, as it did before #22655. The remembered width outlives the row, so resizing across the threshold does not flip back and forth.

  • PaneTabRowSharing gains tabRowToolsNeed and fitsTabRow(room:).
  • PaneContentView.layout() offers the row only when the tools fit.

Follow-up (1) from the pane-toolbar brief (#22655).

Changelog

Fixed: In a narrow pane, the chat's tools no longer slide under the last tab; they keep their own row.

Tests

package-test-lane.sh suite Packages/macOS/CmuxNext PaneTabRowFitTests,AgentPaneTabRowNeedTests on the fleet:

  • test commit f861abfa (red): does not compile, value of type 'PaneTabRowFitTests.Tools' has no member 'fitsTabRow'
  • head f96208b8 (green): PaneTabRowFitTests and AgentPaneTabRowNeedTests passed, All 2 suites passed

Observed / Not run

  • Review passed. Known limits: the remembered width only grows, so tools that shrink while out of the row stay out until the pane widens. A narrow pane with no known width offers the row once, so the tools flash under the tabs one time.
  • Ran: prepush gate (no new violations) and the focused fleet suites above.
  • Not run: a live narrow-pane capture in a tagged build. The change is a layout gate on existing frames.

Agent session: cosmic-gray

šŸ¤– Generated with Claude Code