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'}