Agent chat: no stray Copy at the top left of a sent prompt
Merged
TE
14d ago+63+63+01234567890123456789-17-17-01234567890123456789
Leo asked, about a lone Copy icon at the top left of his sent prompt in the agent chat:
why is there a copy button for the prompt i sent on teh top left?
top left??? just remove it
What changes
- A sent prompt (a user row drawn as the person's bubble) no longer gets the transcript row's floating Copy. That button was moved to the row's empty left corner on 10-20 so it would not cover the bubble. Under keyboard focus or a selected range it then showed alone at the far top left.
- Kept: the action row under the bubble (time, āā, Copy, Pin). A selected range and Cmd-C still copy the prompt.
- Tool rows keep their floating Copy. Answers keep theirs in the turn footer. User rows drawn as a line (another agent's message, a task's result) keep theirs at the right.
- The CSS rule that put the prompt's floating Copy at the left is removed, since nothing uses it now.
Tests (red first, in their own commit d4eeeb03)
- New
transcript-copy.test.tsx: "a sent prompt's row has exactly one Copy, the one under its bubble; tool and answer rows unchanged". It asserts oneCopybutton in the prompt row, inside.cv-user__actions, and no.acpmux-row__copy. The tool row keeps its own floating Copy, and the answer row has none. - Updated to match:
render-tool-open.test.tsx: the prompt's one Copy is under its bubble.composer-line-breaks.test.ts: it clicks the action row's Copy.chief-context-copy.test.ts: comment only.- The Edited files gallery state waits for the prompt's action row.
Observed / Not run
- Not run: the webview tests could not run here, because the fleet steps for the red commit and the head sat in a saturated queue and never started. CI's webview jobs run them on this PR.
- Before/after: the gallery advisory run on this PR shows the prompt states at the merge base and at this head.
Takes back #22855: Leo asked to remove the prompt's floating Copy that #22855 moved to the top left ("top left??? just remove it"); its CSS rule has no remaining user.
Leo-ask: ask-6e5da66bad
Leo-ask: ask-cbf6b700cc
Changelog
Fixed: a sent prompt in the agent chat no longer shows a stray Copy button at its top left.
Agent session: Air-Blue
š¤ Generated with Claude Code