File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -384,12 +384,23 @@ function buildEntryTree(entries: ConsoleEntry[]): EntryNode[] {
384384 iterationContainerId : iterGroup . iterationContainerId ,
385385 }
386386
387- // Block nodes within this iteration
388- const blockNodes : EntryNode [ ] = iterBlocks . map ( ( block ) => ( {
389- entry : block ,
390- children : [ ] ,
391- nodeType : 'block' as const ,
392- } ) )
387+ // Block nodes within this iteration — workflow blocks get their full subtree
388+ const blockNodes : EntryNode [ ] = iterBlocks . map ( ( block ) => {
389+ if ( isWorkflowBlockType ( block . blockType ) ) {
390+ const allDescendants = collectWorkflowDescendants ( block . blockId , workflowChildGroups )
391+ const rawChildren = allDescendants . map ( ( c ) => ( {
392+ ...c ,
393+ childWorkflowBlockId :
394+ c . childWorkflowBlockId === block . blockId ? undefined : c . childWorkflowBlockId ,
395+ } ) )
396+ return {
397+ entry : block ,
398+ children : buildEntryTree ( rawChildren ) ,
399+ nodeType : 'workflow' as const ,
400+ }
401+ }
402+ return { entry : block , children : [ ] , nodeType : 'block' as const }
403+ } )
393404
394405 return {
395406 entry : syntheticIteration ,
You can’t perform that action at this time.
0 commit comments