From 549c6d7907546e8bab7a52505fe4348cfeda7ab2 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Thu, 17 Sep 2026 10:51:44 +0200 Subject: [PATCH] fix: identify an agent run by more than the job id the replay withholds Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/lib/components/DisplayResult.svelte | 11 +++++++++-- frontend/src/lib/components/FlowJobResult.svelte | 13 ++++++++++++- .../src/lib/components/FlowStatusViewerInner.svelte | 2 ++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index 740244e8c1..d0de2026cf 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -119,6 +119,12 @@ filename?: string | undefined disableExpand?: boolean jobId?: string | undefined + /** + * Which run this result belongs to. Separate from `jobId`, which the replay + * page withholds so nothing fetches: the agent views still have to tell one + * run from the next, or a second one continues the first one's fold. + */ + runKey?: string | undefined workspaceId?: string | undefined hideAsJson?: boolean noControls?: boolean @@ -144,6 +150,7 @@ filename = undefined, disableExpand = false, jobId = undefined, + runKey = undefined, workspaceId = undefined, hideAsJson = false, noControls = false, @@ -764,7 +771,7 @@ {#if isAgentStream(result_stream)} - + {:else} {/if} @@ -1278,7 +1285,7 @@ {:else if !forceJson && resultKind === 'aiagent'} {@const agentResult = parseAgentResult(result)} {#if agentResult} - + {#snippet structuredOutput(output)} {#if result !== undefined || result_stream !== undefined} - + {:else if loading} {:else} diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index be99de1798..c082825e83 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -2120,6 +2120,7 @@ tagLabel={customUi?.tagLabel} workspaceId={isReplay ? undefined : job?.workspace_id} jobId={isReplay ? undefined : job?.id} + runKey={job?.id} filename={job.id} loading={job['running']} tag={job?.tag} @@ -2226,6 +2227,7 @@ tagLabel={customUi?.tagLabel} workspaceId={isReplay ? undefined : job?.workspace_id} jobId={isReplay ? undefined : node.job_id} + runKey={node.job_id} loading={node.type != 'Success' && node.type != 'Failure'} waitingForExecutor={node.type == 'WaitingForExecutor'} refreshLog={node.type == 'InProgress'}