Repository navigation
feat(chat): Info and Copy buttons on user messages - #2226
Conversation
User messages now carry two of the three buttons agent messages have: Message info (time, word and character counts) and Copy message. Agent messages keep Read aloud as their third button. MessageBubble already supported this (#495), but its action row only renders when the bubble has a timestamp, and neither chat passed one for user messages. Pass it from AcpConversationItemView (project chat and workspace chat) and from acp-client's AgentPanel (workspace chat without a linked project session). - User actions sit at the bubble's trailing edge, mirroring agent messages. The glass user bubble gets the theme's icon colors; the light-on-dark palette stays with the built-in solid blue bubble. - A just-sent message fades in inside MessageBubble, with its buttons shown from the start, so they stay mounted when the fade ends. Fix the info popover, which screenshots showed was broken on narrow and newest messages (agent messages too): - It sized to the bubble's width, so a short message wrapped the time over four lines. It now sizes to its content. - The chat row entry animation kept translateY(0) after finishing (fill-mode both), making every row a stacking context, so the next message painted over the popover. Use fill-mode backwards. - On the newest message it was cut off by the composer. It now opens upward when it does not fit below. The popover styles are inline because the web app never scans acp-client for Tailwind classes; filed as tasks/backlog/2026-10-04-acp-client-tailwind-classes-not-generated.md. Also filed a pre-existing light-mode link contrast bug in the workspace chat's user bubble. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (4)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (12)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughTimestamped user messages now show Info and Copy actions in project and workspace chats. The changes adjust action alignment and metadata popover placement, add automated coverage, change the message-entry animation fill mode, and add two backlog tasks. ChangesUser Message Actions
Tailwind CSS backlog note
Workspace chat link backlog note
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~30 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
actor User
participant AcpConversationItemView
participant MessageBubble
participant MessageActions
participant Clipboard
AcpConversationItemView->>MessageBubble: Pass user message timestamp and animation state
MessageBubble->>MessageActions: Render Info and Copy actions
User->>MessageActions: Select Copy
MessageActions->>Clipboard: Write raw message markdown
Merge Risk: ⚪ Minimal · up to This change adds Info and Copy actions to timestamped user messages in project and workspace chats, and adjusts popover placement and the message-entry animation fill mode. No merge-blocking issues were identified in the supplied evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new message buttons require explicit interaction and do not grant user messages read-aloud capabilities. A separate settings change removes host-specific permission-default handling; its effect on actual agent permissions remains unresolved. No privilege escalation was established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 53.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 9 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. I’m a rabbit; I hop by the chat, Comment |
UI Screenshot Evidence — Playwright Visual AuditAll 20 Playwright tests passed across mobile (375×667) and desktop (1280×800) viewports, dark and light themes, for both project chat and workspace chat surfaces. Project Chat Screenshots (generated by
|
| Screenshot | Viewport | Theme | What it shows |
|---|---|---|---|
user-message-actions-top-dark-1280x800.png |
Desktop | Dark | History with user messages showing Info + Copy, agent showing all three |
user-message-actions-top-dark-375x667.png |
Mobile | Dark | Same — buttons trailing-aligned, no overflow |
user-message-actions-top-light-1280x800.png |
Desktop | Light | Light theme parity — glass bubble with themed icons |
user-message-actions-top-light-375x667.png |
Mobile | Light | Light mobile — no overflow, proper wrapping |
user-message-actions-bottom-dark-1280x800.png |
Desktop | Dark | Long URL + unbreakable token user message with buttons |
user-message-actions-bottom-dark-375x667.png |
Mobile | Dark | Same content on mobile — wraps correctly |
user-message-actions-bottom-light-1280x800.png |
Desktop | Light | Light theme with long content |
user-message-actions-bottom-light-375x667.png |
Mobile | Light | Light mobile with long content |
user-message-actions-info-open-dark-1280x800.png |
Desktop | Dark | Info popover open — readable, on top of adjacent rows |
user-message-actions-info-open-dark-375x667.png |
Mobile | Dark | Info popover on mobile — sized to content, not squeezed |
user-message-actions-info-newest-light-1280x800.png |
Desktop | Light | Newest message popover flips upward above composer |
user-message-actions-info-newest-light-375x667.png |
Mobile | Light | Same upward flip on mobile |
user-message-actions-sent-dark-1280x800.png |
Desktop | Dark | Optimistic sent message with buttons during fade-in |
user-message-actions-sent-dark-375x667.png |
Mobile | Dark | Same on mobile |
user-message-actions-copied-light-1280x800.png |
Desktop | Light | Copy button shows "Copied" confirmation |
user-message-actions-copied-light-375x667.png |
Mobile | Light | Same on mobile |
Workspace Chat Screenshots
| Screenshot | Viewport | Theme | What it shows |
|---|---|---|---|
user-message-actions-workspace-dark-1280x800.png |
Desktop | Dark | Legacy AgentPanel with user Info + Copy on solid blue bubble |
user-message-actions-workspace-dark-375x667.png |
Mobile | Dark | Same — white icons on dark bubble |
user-message-actions-workspace-light-1280x800.png |
Desktop | Light | Light theme workspace chat |
user-message-actions-workspace-light-375x667.png |
Mobile | Light | Light mobile workspace chat |
user-message-actions-workspace-info-open-dark-1280x800.png |
Desktop | Dark | Info popover open on workspace chat |
user-message-actions-workspace-info-open-dark-375x667.png |
Mobile | Dark | Same on mobile |
Automated Assertions (beyond visual)
Each test asserts:
assertNoOverflow— no horizontal overflow at viewport widthexpectUserActions— Info + Copy visible, Read aloud absentexpectTrailingActions— buttons right-aligned at bubble content edge, on one lineexpectPopoverUsable— popover inside visible conversation area, painted on top (elementFromPoint), each row fits on one line- Copy writes exact raw markdown to clipboard
- Popover closes with Escape
- Newest message popover opens upward (measured position)
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
…imits; new failure guidance chat-features: replaces the operator-voiced 'Agent Questions' with 'When the Agent Needs You' - permission requests (Manual/Plan/safety checks), questions, and external-link requests, with who can answer (only the chat's creator), the Needs input list label, deadlines and what an expired request does, and that no push notification is sent. Adds Message Actions (Info/Copy now on your own messages, #2226) and the chat list's activity ordering (#2228). agents: a table of the five permission modes; Manual/Plan link to the chat cards; requests are refused on self-hosted instances that haven't enabled them (#2225). Usage Limits is rewritten for users: the credentials chip lives on Settings -> Advanced (the page is not 'Settings -> Credentials'), what the OK/Warning/Critical/Limit reached levels mean, and source-file detail removed. session-troubleshooting: Needs input, the check-in pause (#2236), connection and sign-in failure cards (#2217), and stalled-turn failures (#2232). mcp-servers: 'When a server needs sign-in' replaces a paragraph buried under Scopes. notifications/quickstart: in-chat requests don't notify; sleeping tasks stay on Active Tasks (#2240). self-hosting: 'Let agents ask in chat' (the three ACP_INTERACTION* variables, off by default). configuration: the ACP interaction rows get their own subsection; adds STALLED_TASK_CLASSIFIER_* and RATE_LIMIT_CALLBACK_TOKEN_RENEWAL*. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…imits; new failure guidance chat-features: replaces the operator-voiced 'Agent Questions' with 'When the Agent Needs You' - permission requests (Manual/Plan/safety checks), questions, and external-link requests, with who can answer (only the chat's creator), the Needs input list label, deadlines and what an expired request does, and that no push notification is sent. Adds Message Actions (Info/Copy now on your own messages, #2226) and the chat list's activity ordering (#2228). agents: a table of the five permission modes; Manual/Plan link to the chat cards; requests are refused on self-hosted instances that haven't enabled them (#2225). Usage Limits is rewritten for users: the credentials chip lives on Settings -> Advanced (the page is not 'Settings -> Credentials'), what the OK/Warning/Critical/Limit reached levels mean, and source-file detail removed. session-troubleshooting: Needs input, the check-in pause (#2236), connection and sign-in failure cards (#2217), and stalled-turn failures (#2232). mcp-servers: 'When a server needs sign-in' replaces a paragraph buried under Scopes. notifications/quickstart: in-chat requests don't notify; sleeping tasks stay on Active Tasks (#2240). self-hosting: 'Let agents ask in chat' (the three ACP_INTERACTION* variables, off by default). configuration: the ACP interaction rows get their own subsection; adds STALLED_TASK_CLASSIFIER_* and RATE_LIMIT_CALLBACK_TOKEN_RENEWAL*. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Summary
User messages in chat now show two of the three action buttons that agent messages have: Info (metadata popover with time, word count, character count) and Copy (copies raw markdown to clipboard). Agent messages keep all three (Info, Read aloud, Copy). User messages do not get Read aloud.
The shared
MessageBubbleinacp-clientalready supported user message actions since PR #495, but no chat call site passed the user message'stimestampprop, and the action row only renders whentimestamp > 0— so the buttons never appeared.Key changes:
timestampfrom all three chat surfaces (project chat, workspace chat with project session, legacy workspace chat)UserMessageFadeanimation intoMessageBubbleso the action row renders during the per-character fade-inalignprop toMessageActionsto decouple popover anchor side from color variant — user bubbles anchor end (right), agent bubbles anchor start (left)useLayoutEffectmeasuring against nearest overflow-clipping ancestor, uses inline styles for placement/sizing (Tailwind classes not generated for acp-client — see backlog task).sam-message-entryanimation fill-mode frombothtobackwardsso rows don't create stacking contexts that trap popover z-indexBacklog tasks filed:
tasks/backlog/2026-10-04-acp-client-tailwind-classes-not-generated.md—@sourceinindex.cssis never processed by Tailwindtasks/backlog/2026-10-04-legacy-chat-user-links-invisible-light-mode.md— links in solid blue workspace-chat user bubbles are invisible in light modeValidation
pnpm lintpnpm typecheckpnpm test— 567 acp-client tests pass, 104 CI chat audit specs passpnpm check:fast.claude/rules/47-control-loop-io-budget.md)N/A: no sweep/cron/alarm changes.
Staging Verification (REQUIRED for all code changes — merge-blocking)
N/A: Staging verification explicitly skipped per user instruction.
UI Compliance Checklist (Required for UI changes)
.tmp/playwright-screenshots/(see.claude/rules/17-ui-visual-testing.md)UI Screenshot Evidence
Screenshots posted in #issuecomment-5980504214 with full Playwright visual audit evidence (22 screenshots across mobile/desktop, dark/light, both chat surfaces).
Surface: Project Chat — User Message Actions
<script>alert("x")</script>), short text ("ok"), multiline with code blocks, empty actions on SAM-injected contextSurface: Workspace Chat — User Message Actions (Legacy AgentPanel)
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
AcpConversationItemViewrenders<AcpMessageBubble text={item.text} role="user" timestamp={item.timestamp} bubbleClassName="glass-msg-user" />MessageBubblecheckstimestamp != null && timestamp > 0→ renders<MessageActions>withalign="end"andvariant="default"(glass theme)MessageActionsrenders Info and Copy buttons (no TTS for user role), trailing-aligned viajustify-endalign="end"), flips upward if near bottom viauseLayoutEffectmeasuringvisibleBounds()navigator.clipboard.writeText(text)with raw markdownWorkspace chat path:
AgentPanel→MessageBubblewithrole="user" timestamp={item.timestamp}→ same actions withvariant="on-dark"(solid blue bubble)Untested Gaps
N/A: full flow covered by automated tests across all three chat surfaces.
Post-Mortem (Required for bug fix PRs)
N/A: not a bug fix — this is a new feature (user messages previously had no action buttons).
Specialist Review Evidence (Required for agent-authored PRs)
needs-human-reviewlabel added and merge deferred to humanCodeRabbit Review Evidence (Required for agent-authored PRs)
CodeRabbit Notes
CodeRabbit review requested via
coderabbit-reviewlabel at ~13:33Z. CodeRabbit processed 12 files and posted an APPROVED review at 13:42:29Z with no comments or findings. No unresolved feedback.Exceptions (If any)
Scope: Staging verification skipped
Rationale: User explicitly instructed "Skip staging. Make it so."
Expiration: N/A
Scope: Correctness reviewer incomplete
Rationale: Hit 429 rate limit, produced no findings. Two of three reviews completed with no blocking issues. UI-only change with comprehensive automated test coverage.
Expiration: N/A
Agent Preflight (Required)
Classification
External References
N/A: No external API changes. Feature uses existing React, Playwright, and Tailwind patterns.
Codebase Impact Analysis
packages/acp-client/src/components/MessageBubble.tsx— imports UserMessageFade, passes align/variant to MessageActions, renders fade-in for user messagespackages/acp-client/src/components/MessageActions.tsx— newalignprop, useLayoutEffect popover flip, inline styles for positioningapps/web/src/components/project-message-view/AcpConversationItemView.tsx— passestimestampandbubbleClassNameto user message bubbles, removes local UserMessageFade usagepackages/acp-client/src/components/AgentPanel.tsx— passestimestampto user message bubblespackages/ui/src/tokens/theme.css— animation fill-mode fix (both → backwards)Documentation & Specs
N/A: No behavior or interface documentation changes needed. This is a UI enhancement adding existing action buttons to user messages.
Constitution & Risk Check
navigator.clipboard.writeText, Info shows locally computed metadata.🤖 Generated with Claude Code