@@ -20,10 +20,7 @@ import {
2020 TriggerUtils ,
2121} from '@/lib/workflows/triggers/triggers'
2222import { useCurrentWorkflow } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-current-workflow'
23- import {
24- resolveBlockRunStatus ,
25- updateActiveBlockRefCount ,
26- } from '@/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils'
23+ import { updateActiveBlockRefCount } from '@/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils'
2724import { getBlock } from '@/blocks'
2825import type { SerializableExecutionState } from '@/executor/execution/types'
2926import type {
@@ -68,8 +65,6 @@ interface BlockEventHandlerConfig {
6865 workflowEdges : Array < { id : string ; target : string ; sourceHandle ?: string | null } >
6966 activeBlocksSet : Set < string >
7067 activeBlockRefCounts : Map < string , number >
71- /** Tracks blocks that have errored in any parallel branch — prevents later success from masking errors. */
72- blockRunErrors : Set < string >
7368 accumulatedBlockLogs : BlockLog [ ]
7469 accumulatedBlockStates : Map < string , BlockState >
7570 executedBlockIds : Set < string >
@@ -317,7 +312,6 @@ export function useWorkflowExecution() {
317312 workflowEdges,
318313 activeBlocksSet,
319314 activeBlockRefCounts,
320- blockRunErrors,
321315 accumulatedBlockLogs,
322316 accumulatedBlockStates,
323317 executedBlockIds,
@@ -490,12 +484,7 @@ export function useWorkflowExecution() {
490484 const onBlockCompleted = ( data : BlockCompletedData ) => {
491485 if ( isStaleExecution ( ) ) return
492486 updateActiveBlocks ( data . blockId , false )
493- if ( workflowId )
494- setBlockRunStatus (
495- workflowId ,
496- data . blockId ,
497- resolveBlockRunStatus ( blockRunErrors , data . blockId , 'success' )
498- )
487+ if ( workflowId ) setBlockRunStatus ( workflowId , data . blockId , 'success' )
499488
500489 executedBlockIds . add ( data . blockId )
501490 accumulatedBlockStates . set ( data . blockId , {
@@ -526,12 +515,7 @@ export function useWorkflowExecution() {
526515 const onBlockError = ( data : BlockErrorData ) => {
527516 if ( isStaleExecution ( ) ) return
528517 updateActiveBlocks ( data . blockId , false )
529- if ( workflowId )
530- setBlockRunStatus (
531- workflowId ,
532- data . blockId ,
533- resolveBlockRunStatus ( blockRunErrors , data . blockId , 'error' )
534- )
518+ if ( workflowId ) setBlockRunStatus ( workflowId , data . blockId , 'error' )
535519
536520 executedBlockIds . add ( data . blockId )
537521 accumulatedBlockStates . set ( data . blockId , {
@@ -1296,7 +1280,6 @@ export function useWorkflowExecution() {
12961280
12971281 const activeBlocksSet = new Set < string > ( )
12981282 const activeBlockRefCounts = new Map < string , number > ( )
1299- const blockRunErrors = new Set < string > ( )
13001283 const streamedContent = new Map < string , string > ( )
13011284 const accumulatedBlockLogs : BlockLog [ ] = [ ]
13021285 const accumulatedBlockStates = new Map < string , BlockState > ( )
@@ -1310,7 +1293,6 @@ export function useWorkflowExecution() {
13101293 workflowEdges,
13111294 activeBlocksSet,
13121295 activeBlockRefCounts,
1313- blockRunErrors,
13141296 accumulatedBlockLogs,
13151297 accumulatedBlockStates,
13161298 executedBlockIds,
@@ -1922,7 +1904,6 @@ export function useWorkflowExecution() {
19221904 const executedBlockIds = new Set < string > ( )
19231905 const activeBlocksSet = new Set < string > ( )
19241906 const activeBlockRefCounts = new Map < string , number > ( )
1925- const blockRunErrors = new Set < string > ( )
19261907
19271908 try {
19281909 const blockHandlers = buildBlockEventHandlers ( {
@@ -1931,7 +1912,6 @@ export function useWorkflowExecution() {
19311912 workflowEdges,
19321913 activeBlocksSet,
19331914 activeBlockRefCounts,
1934- blockRunErrors,
19351915 accumulatedBlockLogs,
19361916 accumulatedBlockStates,
19371917 executedBlockIds,
@@ -2128,7 +2108,6 @@ export function useWorkflowExecution() {
21282108 const workflowEdges = useWorkflowStore . getState ( ) . edges
21292109 const activeBlocksSet = new Set < string > ( )
21302110 const activeBlockRefCounts = new Map < string , number > ( )
2131- const blockRunErrors = new Set < string > ( )
21322111 const accumulatedBlockLogs : BlockLog [ ] = [ ]
21332112 const accumulatedBlockStates = new Map < string , BlockState > ( )
21342113 const executedBlockIds = new Set < string > ( )
@@ -2141,7 +2120,6 @@ export function useWorkflowExecution() {
21412120 workflowEdges,
21422121 activeBlocksSet,
21432122 activeBlockRefCounts,
2144- blockRunErrors,
21452123 accumulatedBlockLogs,
21462124 accumulatedBlockStates,
21472125 executedBlockIds,
0 commit comments