diff --git a/ui/src/components/TaskChatThread.test.tsx b/ui/src/components/TaskChatThread.test.tsx index 89755b3ff5a..10854e06cc8 100644 --- a/ui/src/components/TaskChatThread.test.tsx +++ b/ui/src/components/TaskChatThread.test.tsx @@ -437,7 +437,15 @@ describe.each(["legacy", "native"] as const)("%s task history readiness", (runti async (status) => { const props = { issueId: "issue-1", - comments: createLongThreadComments(), + comments: [...createLongThreadComments(), { + ...createLongThreadComments()[3], + id: "agent-answer", + authorType: "agent" as const, + authorAgentId: "agent-1", + body: "Final saved reply", + runId: "started-run", + createdAt: new Date("2026-08-25T18:00:02.000Z"), + }], onAdd: async () => {}, linkedRuns: [ retryRun, @@ -459,11 +467,11 @@ describe.each(["legacy", "native"] as const)("%s task history readiness", (runti transcriptState.hydratedRunIds = new Set(["started-run"]); nativeTranscriptState.hydratedRunIds = new Set(["started-run"]); transcriptState.transcriptByRun.set("started-run", [{ - kind: "assistant", text: "Reasoning before the reply", channel: "analysis", + kind: "thinking", text: "Reasoning before the reply", ts: "2026-08-25T18:00:01.000Z", }]); nativeTranscriptState.transcriptByRun.set("started-run", [{ - kind: "assistant", text: "Reasoning before the reply", channel: "analysis", + kind: "assistant", text: "Reasoning before the reply", channel: "progress", ts: "2026-08-25T18:00:01.000Z", }]); render(); @@ -477,6 +485,13 @@ describe.each(["legacy", "native"] as const)("%s task history readiness", (runti ).toBeNull(); expect(container.querySelector('[data-thread-anchor="comment-1"]')?.closest('[inert]')).toBeNull(); expect(container.textContent).toContain("Thread message 1"); + if (status === "succeeded" && runtimeMode === "native") { + expect(container.textContent).toContain("Reasoning before the reply"); + expect(container.textContent).toContain("Final saved reply"); + expect(container.textContent!.indexOf("Reasoning before the reply")).toBeLessThan( + container.textContent!.indexOf("Final saved reply"), + ); + } }, ); });