Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
improvement(preview): nested workflow snapshots/preview when not exec…
…uted
  • Loading branch information
icecrasher321 committed Feb 6, 2026
commit 8a10e9fc932e069620aab675e39fae2b137d9473
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface BlockExecutionData {
/** Child trace spans for nested workflow blocks */
children?: TraceSpan[]
childWorkflowSnapshotId?: string
childWorkflowName?: string
}

/** Represents a level in the workflow navigation stack */
Expand Down Expand Up @@ -87,13 +88,16 @@ export function buildBlockExecutions(spans: TraceSpan[]): Record<string, BlockEx

for (const span of allBlockSpans) {
if (span.blockId && !blockExecutionMap[span.blockId]) {
const output = span.output as Record<string, unknown> | undefined
blockExecutionMap[span.blockId] = {
input: redactApiKeys(span.input || {}),
output: redactApiKeys(span.output || {}),
status: span.status || 'unknown',
durationMs: span.duration || 0,
children: span.children,
childWorkflowSnapshotId: span.childWorkflowSnapshotId,
childWorkflowName:
typeof output?.childWorkflowName === 'string' ? output.childWorkflowName : undefined,
}
}
}
Expand Down Expand Up @@ -192,7 +196,7 @@ export function Preview({
const childTraceSpans = extractChildTraceSpans(blockExecution)
const childBlockExecutions = buildBlockExecutions(childTraceSpans)

const workflowName = childWorkflowState.metadata?.name || 'Nested Workflow'
const workflowName = blockExecution?.childWorkflowName || 'Nested Workflow'

setWorkflowStack((prev) => [
...prev,
Expand Down