chat: one-tap message copy under every settled message - #388
Merged
Conversation
A quiet copy control under every settled user and assistant message copies the message's prose — text blocks joined by blank lines, never tool output, thinking, or question chrome. Plain tap target only: it never intercepts press/hold, so native long-press selection stays fully available. Always visible on touch devices, hover/focus-revealed on fine pointers, with a brief Copied acknowledgement. Placement matches the existing code-block copy button: every copy affordance shares the lower-right corner (assistant rows opt out of their column's flex-start via align-self), a contract pinned in messageCopyButton.test.js. Co-authored-by: Möbius Agent <mobius-agent@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a small copy control under every settled chat message — user and assistant — so grabbing a whole answer (or your own note) is one tap, especially on phones where long-press selection across a full message is fiddly.
What it does
What it deliberately doesn't do
It is a plain tap target: no press/hold or context-menu interception, so native long-press selection and its action menu stay fully available (the existing chatUiPolish contract).
Placement
Every copy affordance shares the lower-right corner: code blocks already pin
right: 7px/bottom: 7px(from the earlier code-block copy button work, #272), user bubbles inherit their column'sflex-end, and assistant rows opt out of their column'sflex-startwith onealign-selfrule. Ghost button — always visible on touch devices, hover/focus-revealed on fine pointers, accent focus ring for keyboard users.Tests
messageCopyButton.test.jscovers the copy-text semantics (prose only, augmentation stripping, empty system rows), the plain-tap-target contract, the settled-only gate, and the shared lower-right corner.🤖 Generated with Claude Code