Skip to content

Commit 4f45f70

Browse files
improvement(snapshot): exclude sentinel in client side activation detection (#3432)
1 parent d640fa0 commit 4f45f70

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/workflow-execution-utils.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export function updateActiveBlockRefCount(
3232
/**
3333
* Determines if a workflow edge should be marked as active based on its handle and the block output.
3434
* Mirrors the executor's EdgeManager.shouldActivateEdge logic on the client side.
35+
* Exclude sentinel handles here
3536
*/
3637
function shouldActivateEdgeClient(
3738
handle: string | null | undefined,
@@ -56,10 +57,6 @@ function shouldActivateEdgeClient(
5657
case 'loop-end-source':
5758
case 'parallel-start-source':
5859
case 'parallel-end-source':
59-
case 'loop_exit':
60-
case 'loop_continue':
61-
case 'loop_continue_alt':
62-
case 'parallel_exit':
6360
return true
6461
default:
6562
return true
@@ -81,12 +78,8 @@ export function markOutgoingEdgesFromOutput(
8178
const outgoing = workflowEdges.filter((edge) => edge.source === blockId)
8279
for (const edge of outgoing) {
8380
const handle = edge.sourceHandle
84-
if (!handle) {
85-
setEdgeRunStatus(workflowId, edge.id, 'success')
86-
continue
87-
}
8881
if (shouldActivateEdgeClient(handle, output)) {
89-
const status = handle === 'error' ? 'error' : 'success'
82+
const status = handle === 'error' ? 'error' : output?.error ? 'error' : 'success'
9083
setEdgeRunStatus(workflowId, edge.id, status)
9184
}
9285
}

0 commit comments

Comments
 (0)