From 53cf1b83f4500094986a26595163014979e10614 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 19 Mar 2026 23:12:02 -0700 Subject: [PATCH 1/3] fix(preview): show actual nested workflow name in log snapshots --- .../[workspaceId]/w/components/preview/preview.tsx | 6 +++++- apps/sim/executor/handlers/workflow/workflow-handler.ts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx index 169d643a398..254bd742024 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx @@ -197,7 +197,11 @@ export function Preview({ const childTraceSpans = extractChildTraceSpans(blockExecution) const childBlockExecutions = buildBlockExecutions(childTraceSpans) - const workflowName = childWorkflowState.metadata?.name || 'Nested Workflow' + const workflowName = + childWorkflowState.metadata?.name || + (blockExecution?.output as { childWorkflowName?: string } | undefined) + ?.childWorkflowName || + 'Nested Workflow' setWorkflowStack((prev) => [ ...prev, diff --git a/apps/sim/executor/handlers/workflow/workflow-handler.ts b/apps/sim/executor/handlers/workflow/workflow-handler.ts index 4821d86029e..cb86abfe405 100644 --- a/apps/sim/executor/handlers/workflow/workflow-handler.ts +++ b/apps/sim/executor/handlers/workflow/workflow-handler.ts @@ -444,13 +444,18 @@ export class WorkflowBlockHandler implements BlockHandler { ) const workflowVariables = (wfData?.variables as Record) || {} + const childName = wfData?.name || DEFAULTS.WORKFLOW_NAME const workflowStateWithVariables = { ...deployedState, variables: workflowVariables, + metadata: { + ...(deployedState.metadata || {}), + name: childName, + }, } return { - name: wfData?.name || DEFAULTS.WORKFLOW_NAME, + name: childName, serializedState: serializedWorkflow, variables: workflowVariables, workflowState: workflowStateWithVariables, From fececabcb537d990d62e64372a95d87debfb3944 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 19 Mar 2026 23:25:03 -0700 Subject: [PATCH 2/3] fix(preview): ensure metadata.name in non-deployed child workflow path --- apps/sim/executor/handlers/workflow/workflow-handler.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/sim/executor/handlers/workflow/workflow-handler.ts b/apps/sim/executor/handlers/workflow/workflow-handler.ts index cb86abfe405..8aa478b6e84 100644 --- a/apps/sim/executor/handlers/workflow/workflow-handler.ts +++ b/apps/sim/executor/handlers/workflow/workflow-handler.ts @@ -363,6 +363,10 @@ export class WorkflowBlockHandler implements BlockHandler { const workflowStateWithVariables = { ...workflowState, variables: workflowVariables, + metadata: { + ...(workflowState.metadata || {}), + name: workflowData.name || DEFAULTS.WORKFLOW_NAME, + }, } if (Object.keys(workflowVariables).length > 0) { From db936ff2211a71a60469c59a8d74cc4ccbb19d61 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 19 Mar 2026 23:41:48 -0700 Subject: [PATCH 3/3] style(preview): fix line formatting --- .../workspace/[workspaceId]/w/components/preview/preview.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx index 254bd742024..890a5a7d4dc 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx @@ -199,8 +199,7 @@ export function Preview({ const workflowName = childWorkflowState.metadata?.name || - (blockExecution?.output as { childWorkflowName?: string } | undefined) - ?.childWorkflowName || + (blockExecution?.output as { childWorkflowName?: string } | undefined)?.childWorkflowName || 'Nested Workflow' setWorkflowStack((prev) => [