From 8480a84b3c4e2c2788c367ceb5ec14f4a580d8fe Mon Sep 17 00:00:00 2001 From: roboomp Date: Thu, 9 Jul 2026 17:04:32 +0000 Subject: [PATCH] fix(collab-web): preserve active transcript args - Render deduped active tool cards with the execution args carried by ActiveTool. - Covered differing raw assistant args and effective active args in the transcript regression test. Fixes #4948 --- .../src/components/transcript/Transcript.tsx | 3 ++- packages/collab-web/test/transcript.test.tsx | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/collab-web/src/components/transcript/Transcript.tsx b/packages/collab-web/src/components/transcript/Transcript.tsx index 30e105564..947883ee1 100644 --- a/packages/collab-web/src/components/transcript/Transcript.tsx +++ b/packages/collab-web/src/components/transcript/Transcript.tsx @@ -109,13 +109,14 @@ function AssistantBody({ case "toolCall": { const act = active.get(block.id); const result = results.get(block.id); + const args = act?.args ?? block.arguments; return ( { - it("renders one running card for a committed tool call without the working shimmer", () => { + it("renders one running card for a committed tool call using active args without the working shimmer", () => { const html = renderTranscript({ entries: [committedAssistantToolCall()], activeTools: new Map([[TOOL_CALL_ID, activeTool()]]), @@ -99,6 +102,8 @@ describe("Transcript live tool rendering", () => { expect(countElements(html, '[aria-label="running"]')).toBe(1); expect(countOccurrences(html, TOOL_NAME)).toBe(1); expect(html).not.toContain("thinking…"); + expect(html).toContain(ACTIVE_TOOL_TARGET); + expect(html).not.toContain(RAW_ASSISTANT_TARGET); }); it("keeps the working shimmer when no tool is active", () => {