File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
app/workspace/[workspaceId]/w/components/preview
executor/handlers/workflow Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,11 @@ export function Preview({
197197 const childTraceSpans = extractChildTraceSpans ( blockExecution )
198198 const childBlockExecutions = buildBlockExecutions ( childTraceSpans )
199199
200- const workflowName = childWorkflowState . metadata ?. name || 'Nested Workflow'
200+ const workflowName =
201+ childWorkflowState . metadata ?. name ||
202+ ( blockExecution ?. output as { childWorkflowName ?: string } | undefined )
203+ ?. childWorkflowName ||
204+ 'Nested Workflow'
201205
202206 setWorkflowStack ( ( prev ) => [
203207 ...prev ,
Original file line number Diff line number Diff line change @@ -444,13 +444,18 @@ export class WorkflowBlockHandler implements BlockHandler {
444444 )
445445
446446 const workflowVariables = ( wfData ?. variables as Record < string , any > ) || { }
447+ const childName = wfData ?. name || DEFAULTS . WORKFLOW_NAME
447448 const workflowStateWithVariables = {
448449 ...deployedState ,
449450 variables : workflowVariables ,
451+ metadata : {
452+ ...( deployedState . metadata || { } ) ,
453+ name : childName ,
454+ } ,
450455 }
451456
452457 return {
453- name : wfData ?. name || DEFAULTS . WORKFLOW_NAME ,
458+ name : childName ,
454459 serializedState : serializedWorkflow ,
455460 variables : workflowVariables ,
456461 workflowState : workflowStateWithVariables ,
You can’t perform that action at this time.
0 commit comments