cmux-next chat: icon-only buttons say what they do (Add menu, Copy, Jump to latest, prompt Edit/versions, favorite)

Merged
TE
15d ago
+808-53

In the cmux NEXT chat, several buttons are a bare glyph whose meaning showed only to a screen reader. Each now names itself when you hover it, and Copy behaves like the code cards' Copy.

  • Composer +: hovering says "Add files, screenshots and more" ("Add files, mentions and more" where the composer can't take screenshots). Picker takes a tooltip for an icon-only trigger; pickers that show their choice's name get none (test/tooltip-rules.ts).
  • Copy under a prompt and a turn, and a transcript row's floating Copy: these now use conversation/CopyButton. After a click the icon turns into a check reading "Copied", but only once the clipboard actually took the text, and goes back to Copy after 1.2 s. Before, the prompt and turn Copy kept the copy glyph and said "Copied" until the row re-rendered. CopyButton's name is now also its tooltip, so code cards' "Copy code" gets one too.
  • Jump to latest: hovering says "Jump to latest", or "Jump to latest, still replying" while the arrow is dots.
  • Prompt bubble: ‹ › say "Previous version" / "Next version", and the pencil says "Edit" (Retry and Fork beside them already had tooltips).
  • Model picker ☆: hovering says "Add to Starred" or "Remove from Starred", matching the Starred section's name. It already had aria-pressed.

4 new strings in acpmux/Localizable.xcstrings, all 21 locales (en/ja translated, others needs_review).

Overlap: #22773 (message hover rows) also moves the prompt and turn Copy into its own MessageActions.CopyButton, which keeps the old behavior: no check, no reset, no tooltip. Whichever lands second should use conversation/CopyButton.

Changelog

Fixed: In the cmux NEXT chat, the + menu, Copy, Jump to latest, a prompt's Edit and version arrows, and a model's star now show a tooltip; Copy shows a check for a moment after it copies.

Tests

  • New webviews/test/chat-icon-tooltips.test.tsx (JSDOM): a prompt's ‹ ›, Copy and Edit have both aria-label and title. A prompt's and a turn's Copy show "Copied" with a different glyph after a click, then go back to Copy when the 1.2 s timer runs (timer stubbed).
  • transcript-jump-latest.test.tsx: title matches the label, idle and working.
  • model-picker-picks.test.tsx: the star's title and aria-pressed before and after a click.
  • composer-suggested-prompt.test.tsx: the + has aria-label "Add" and title "Add files, mentions and more".
  • Red first: commit 92f8503f49c adds the tests. On base, all 3 new chat-icon-tooltips tests, the jump test, the star test and the + test fail; on the head they pass.
  • Gallery: agent-pane.composer plus-tooltip, and agent-pane.user-bubble copy-tooltip and edit-tooltip. Each play hovers the button and waits for the pane's tooltip.

Observed / Not run

  • Ran locally (bun test, one file at a time): chat-icon-tooltips 3/3, transcript-jump-latest 2/2, chat-header-tooltips, tooltip-rules, user-message-actions, retry-model, turn-error-details, edit-resend, transcript-copy, transcript-output-copy, transcript-range-content, artifact-panel, pane-english, strings-build-output: all pass.
  • Also failing on base, unchanged here: model-picker-picks "on a New Tab, every Claude Code row lands on the chip…" times out, and 6 composer-suggested-prompt PR-suggestion tests fail. gallery-coverage misses SubagentPaneFooter on base too.
  • scripts/web-lint.sh: clean except 3 warnings that are also on base (HistoryPage.tsx, sidebar-rail-css.test.tsx, IncomingMessageCard.tsx). prepush-gate.py: no new violations.
  • Not run: the gallery plays (no browser renders on this Mac; the gallery advisory run renders them) and any Swift (none touched).

Agent session: cosmic-gray

🤖 Generated with Claude Code


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


Summary by cubic

Adds hover tooltips to the cmux NEXT chat's icon-only buttons — composer +, Copy, Jump to latest, a prompt's version arrows and edit pencil, a model's star — so hovering names each action.

Bug Fixes

  • Prompt and turn Copy now use the shared CopyButton: "Copied" with a check shows only once the clipboard took the text, then reverts to Copy after 1.2 s. Previously they kept the copy glyph while saying "Copied" until the row re-rendered.
  • The composer + says "Add files, screenshots and more", or "Add files, mentions and more" where the pane can't capture screenshots.
  • CopyButton now carries its label as tooltip, which also gives code cards' "Copy code" a tooltip.
  • Overlaps with #22773, which also moves prompt and turn Copy and keeps the old behavior; whichever lands second should use conversation/CopyButton.