From 1479e5da170189c777862763e588db6f350bcae8 Mon Sep 17 00:00:00 2001 From: Maxwell Young Date: Sat, 18 Jul 2026 10:32:48 +1200 Subject: [PATCH] keep completed assistant copy actions visible --- .../components/chat/MessagesTimeline.test.tsx | 31 +++++++++++++++++++ .../src/components/chat/MessagesTimeline.tsx | 5 ++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/chat/MessagesTimeline.test.tsx b/apps/web/src/components/chat/MessagesTimeline.test.tsx index 0957e025311..0fccf75d27e 100644 --- a/apps/web/src/components/chat/MessagesTimeline.test.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.test.tsx @@ -218,6 +218,23 @@ function buildUserTimelineEntry(text: string) { }; } +function buildAssistantTimelineEntry(text: string) { + return { + id: "assistant-entry-1", + kind: "message" as const, + createdAt: MESSAGE_CREATED_AT, + message: { + id: MessageId.make("assistant-message-1"), + role: "assistant" as const, + text, + turnId: null, + createdAt: MESSAGE_CREATED_AT, + updatedAt: MESSAGE_CREATED_AT, + streaming: false, + }, + }; +} + describe("MessagesTimeline", () => { it("uses LegendList isNearEnd when deciding whether the live edge is visible", async () => { const { @@ -407,6 +424,20 @@ describe("MessagesTimeline", () => { expect(markup).toContain('data-user-message-footer="true"'); }); + it("keeps completed assistant message actions visible without hover", async () => { + const { MessagesTimeline } = await import("./MessagesTimeline"); + const markup = renderToStaticMarkup( + , + ); + + 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/); + }); + it("renders context compaction entries in the normal work log", async () => { const { MessagesTimeline } = await import("./MessagesTimeline"); const markup = renderToStaticMarkup( diff --git a/apps/web/src/components/chat/MessagesTimeline.tsx b/apps/web/src/components/chat/MessagesTimeline.tsx index 61d7855844d..783e01693ce 100644 --- a/apps/web/src/components/chat/MessagesTimeline.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.tsx @@ -995,7 +995,10 @@ function AssistantTimelineRow({ row }: { row: Extract {row.showAssistantMeta ? ( -
+
{!row.message.streaming && (