diff --git a/apps/web/src/components/chat/MessagesTimeline.test.tsx b/apps/web/src/components/chat/MessagesTimeline.test.tsx index 194edc0bd5bb..5e6f5cf9093e 100644 --- a/apps/web/src/components/chat/MessagesTimeline.test.tsx +++ b/apps/web/src/components/chat/MessagesTimeline.test.tsx @@ -225,6 +225,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 the larger leading inset only when the top fade is enabled", () => { const timelineEntries = [buildUserTimelineEntry("Hello")]; @@ -530,6 +547,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", () => { const markup = renderToStaticMarkup( {row.showAssistantMeta ? ( -
+
{!row.message.streaming && (