cmux NEXT transcript: chips use the row's width and truncate only when it is full

Merged
TE
16d ago
+85-13

Summary

The pull request bar above the composer cut its title off at a fixed 360px (and its repository at 160px) while the composer's column still had room, as in "#634 leo-workspace rulebook: reviewed PRs merge right away; the label is the …". The bar now uses the column's full width. The title gives way first, then the repository.

The same fixed caps on ellipsized text came out elsewhere in the agent pane:

  • Reference chips in replies (owner/repo#N · title) capped the title at 32ch. The chip is now inline-flex with max-width: 100%, so it moves to its own line first and is cut off only when it is wider than that line. Its hover card already shows the full title.
  • Question tabs (160px): the tab row wraps, so a long tab takes a whole line before it is cut off.
  • The handoff header's coverage note (160px): its tools group is flex: none (header.css), so the note now shows its whole label ("Unverified" or the native policy's name, both short) instead of a 160px cap.

A new test, test/chip-fixed-width.test.ts, scans the pane's stylesheets and fails on any rule that ellipsizes text under a fixed-length max-width (px, ch, em, rem).

Audited and left alone: fixed caps on the parent of an ellipsized child. These are the header worktree chip (180px), the header's inline status (160px), the composer location button (128px / 145px) and the project button and host (220px / 110px). They are header and composer controls that share a crowded row on purpose, not transcript chips. Popover and card widths (the link preview, session previews) are also unchanged.

No tooltip on a cut-off bar: tooltip-rules.ts (Leo 2026-10-13) gives a chip that shows its text none, not even its full text when it is cut off (44c9aa158b6 dropped the hover title this PR first added).

Testing

From webviews/:

  • bun test test/chip-fixed-width.test.ts: red on the first commit (five fixed caps listed), green on the fix.
  • bun test test/pr-dock-stale-state.test.tsx test/tooltip-rules.test.ts src/agent-session/acpmux/chips src/agent-session/acpmux/summary: pass.
  • bunx tsc --noEmit -p .: clean.

Not run locally (the Mac is overloaded; no browser lanes here): the WebKit/Chromium lanes agent-pane-pr-dock, agent-pane-column-edges and agent-pane-links-blue. They run in this PR's web / react-apps-check. A new gallery variant, agent-pane.pr-dock:long-title, shows the long bar.

Changelog

Fixed: pull request bars and reference chips in the agent pane use the available width and cut their title off only when the row is full

🤖 Generated with Claude Code

Agent session: cosmic-gray