[codex] keep completed assistant copy actions visible - #4107
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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. Comment |
ApprovabilityVerdict: Approved This is a minor UI adjustment that makes assistant message copy actions always visible instead of requiring hover. The change is limited to CSS classes with proper test coverage and no runtime logic changes. You can customize Macroscope's approvability policy. Learn more. |
1479e5d to
89af03c
Compare
There was a problem hiding this comment.
Two small follow-ups on the assistant footer visibility change: an orphaned group/assistant marker and an assertion that cannot fail.
Posted via Macroscope — UI Consistency
| <div | ||
| className="mt-1.5 flex items-center gap-2 text-xs tabular-nums" | ||
| data-assistant-message-footer="persistent" | ||
| > |
There was a problem hiding this comment.
Dropping group-hover/assistant:opacity-100 here leaves the group/assistant marker on the row wrapper (line 935) with no consumer anywhere in the repo, so the row still advertises a hover group that nothing reacts to. Consider removing that marker in the same change so hover ownership stays truthful.
- row.kind === "message" && row.message.role === "assistant" ? "group/assistant" : null,Posted via Macroscope — UI Consistency
|
|
||
| expect(markup).toContain('aria-label="Copy link"'); | ||
| expect(markup).toContain('data-assistant-message-footer="persistent"'); | ||
| expect(markup).not.toMatch(/data-assistant-message-footer="persistent"[^>]*opacity-0/); |
There was a problem hiding this comment.
This guard can never fail: React emits className before the data attribute, so the rendered tag is <div class="mt-1.5 ..." data-assistant-message-footer="persistent"> and opacity-0 can never appear after the marker within the same tag. If the hover-gating classes were reintroduced, this assertion would still pass. Matching the whole tag keeps the guard meaningful.
| expect(markup).not.toMatch(/data-assistant-message-footer="persistent"[^>]*opacity-0/); | |
| expect(markup).not.toMatch(/<div[^>]*opacity-0[^>]*data-assistant-message-footer="persistent"/); |
Posted via Macroscope — UI Consistency
Fixes #4046
Problem
The completed assistant-message footer is hidden with
opacity-0until its row is hovered or focused. When someone selects response text and moves outside the row, the footer fades out and the copy action disappears before it can be used. The same hover dependency also makes the action undiscoverable on non-hover inputs.Root cause
AssistantTimelineRowcorrectly limits copy controls to eligible completed assistant messages through the existing copy-state logic, but the containing footer adds a second presentation constraint: hover-only opacity. That constraint hides an otherwise valid action based on pointer position.Fix
Validation
pnpm --filter @t3tools/web test -- src/components/chat/MessagesTimeline.test.tsx— 151 files and 1,318 tests passedvp check— passes with 10 existing warnings outside this diffvp run typecheckgit diff --checkVisual verification
The issue recording demonstrates the before-state: the completed-message footer disappears after the pointer leaves the assistant row.
The after-state below was captured from the full local app with the pointer moved away from the assistant row. The copy action and timestamp remain visible; the footer's computed opacity is
1.Web/shared impact
This changes only the presentation of the completed assistant-message footer in the web/desktop chat timeline. Message state, copy behavior, streaming behavior, server communication, native mobile code, and shared contracts are unchanged.
Migration/deploy impact
None. There are no schema, migration, API, auth, session, realtime transport, or deployment configuration changes.
Post-deploy smoke check
Note
Keep completed assistant message copy actions persistently visible
Previously, the assistant message footer (copy link button and timestamp) was hidden behind hover/focus opacity transitions. The footer in
AssistantTimelineRownow renders with full opacity whenshowAssistantMetais true, removing theopacity-0and hover/focus classes. Adata-assistant-message-footer="persistent"attribute is added to the wrapper div to reflect this behavior change.Macroscope summarized 89af03c.
Note
Low Risk
Presentation-only change in the web chat timeline; copy eligibility and server behavior are unchanged.
Overview
Fixes #4046 by changing how the completed assistant-message footer is shown in
AssistantTimelineRow.When
showAssistantMetais true, the footer (copy link and timestamp) no longer usesopacity-0withgroup-hover/focus-withintransitions. It stays visible so copy stays usable after selecting text and moving the pointer away, and on inputs without hover. Eligibility is unchanged—streaming and non-terminal assistant rows still omit this footer via existing timeline logic.A
data-assistant-message-footer="persistent"marker tags the footer for tests.MessagesTimeline.test.tsxaddsbuildAssistantTimelineEntryand asserts the copy control is present and not paired with hover-onlyopacity-0.Reviewed by Cursor Bugbot for commit 89af03c. Bugbot is set up for automated code reviews on this repo. Configure here.