Skip to content

chat: one-tap message copy under every settled message - #388

Merged
miljanm merged 2 commits into
mobius-os:mainfrom
miljanm:fix/chat-message-copy
Jul 30, 2026
Merged

chat: one-tap message copy under every settled message#388
miljanm merged 2 commits into
mobius-os:mainfrom
miljanm:fix/chat-message-copy

Conversation

@miljanm

@miljanm miljanm commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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

  • Copies the message's prose: text blocks joined by blank lines — never tool output, thinking, or question cards, which have their own surfaces.
  • User text is copied exactly as rendered (hidden augmentation stripped), so the clipboard matches the screen; system rows (compaction, auto-continuation) offer nothing.
  • Brief check-icon + "Copied" acknowledgement; streaming answers don't offer copy until the turn settles — the same gate MessageSources uses.

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's flex-end, and assistant rows opt out of their column's flex-start with one align-self rule. Ghost button — always visible on touch devices, hover/focus-revealed on fine pointers, accent focus ring for keyboard users.

Tests
messageCopyButton.test.js covers 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

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>
@miljanm miljanm added area: ui User interface and interaction design enhancement New feature or request labels Jul 30, 2026
@miljanm
miljanm added this pull request to the merge queue Jul 30, 2026
@miljanm
miljanm removed this pull request from the merge queue due to a manual request Jul 30, 2026
@miljanm
miljanm enabled auto-merge July 30, 2026 18:02
@miljanm
miljanm added this pull request to the merge queue Jul 30, 2026
Merged via the queue into mobius-os:main with commit fbc480b Jul 30, 2026
4 checks passed
@miljanm
miljanm deleted the fix/chat-message-copy branch July 31, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui User interface and interaction design enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant