Skip to content

Commit 270cba4

Browse files
committed
remove activatedEdges path
1 parent 0168512 commit 270cba4

File tree

18 files changed

+4
-33
lines changed

18 files changed

+4
-33
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ interface PreviewWorkflowProps {
145145
/** Cursor style to show when hovering the canvas */
146146
cursorStyle?: 'default' | 'pointer' | 'grab'
147147
/** Map of executed block IDs to their status for highlighting the execution path */
148-
executedBlocks?: Record<string, { status: string }>
148+
executedBlocks?: Record<string, { status: string; output?: unknown }>
149149
/** Currently selected block ID for highlighting */
150150
selectedBlockId?: string | null
151151
/** Skips expensive subblock computations for thumbnails/template previews */
@@ -274,9 +274,9 @@ export function PreviewWorkflow({
274274

275275
/** Maps base block IDs to execution data, handling parallel iteration variants (blockId₍n₎). */
276276
const blockExecutionMap = useMemo(() => {
277-
if (!executedBlocks) return new Map<string, { status: string }>()
277+
if (!executedBlocks) return new Map<string, { status: string; output?: unknown }>()
278278

279-
const map = new Map<string, { status: string }>()
279+
const map = new Map<string, { status: string; output?: unknown }>()
280280
for (const [key, value] of Object.entries(executedBlocks)) {
281281
// Extract base ID (remove iteration suffix like ₍0₎)
282282
const baseId = key.includes('₍') ? key.split('₍')[0] : key

apps/sim/executor/execution/engine.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ function createMockContext(overrides: Partial<ExecutionContext> = {}): Execution
5757
parallelExecutions: new Map(),
5858
completedLoops: new Set(),
5959
activeExecutionPath: new Set(),
60-
activatedEdges: new Map(),
6160
metadata: {
6261
executionId: 'test-execution',
6362
startTime: new Date().toISOString(),

apps/sim/executor/execution/engine.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -415,15 +415,7 @@ export class ExecutionEngine {
415415
}
416416
}
417417

418-
const { readyNodes, activatedEdges } = this.edgeManager.processOutgoingEdges(
419-
node,
420-
output,
421-
false
422-
)
423-
424-
if (activatedEdges.length > 0) {
425-
this.context.activatedEdges.set(nodeId, activatedEdges)
426-
}
418+
const { readyNodes } = this.edgeManager.processOutgoingEdges(node, output, false)
427419

428420
logger.info('Processing outgoing edges', {
429421
nodeId,
@@ -436,7 +428,6 @@ export class ExecutionEngine {
436428
output,
437429
readyNodesCount: readyNodes.length,
438430
readyNodes,
439-
activatedEdgeCount: activatedEdges.length,
440431
})
441432

442433
this.addMultipleToQueue(readyNodes)

apps/sim/executor/execution/executor.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ export class DAGExecutor {
313313
activeExecutionPath: snapshotState?.activeExecutionPath
314314
? new Set(snapshotState.activeExecutionPath)
315315
: new Set(),
316-
activatedEdges: snapshotState?.activatedEdges
317-
? new Map(Object.entries(snapshotState.activatedEdges))
318-
: new Map(),
319316
workflow: this.workflow,
320317
stream: this.contextExtensions.stream ?? false,
321318
selectedOutputs: this.contextExtensions.selectedOutputs ?? [],

apps/sim/executor/execution/snapshot-serializer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ export function serializePauseSnapshot(
8787
parallelExecutions: serializeParallelExecutions(context.parallelExecutions),
8888
parallelBlockMapping: mapFromEntries(context.parallelBlockMapping),
8989
activeExecutionPath: Array.from(context.activeExecutionPath),
90-
activatedEdges: context.activatedEdges ? Object.fromEntries(context.activatedEdges) : undefined,
9190
pendingQueue: triggerBlockIds,
9291
dagIncomingEdges,
9392
}

apps/sim/executor/execution/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export interface SerializableExecutionState {
4949
parallelExecutions?: Record<string, any>
5050
parallelBlockMapping?: Record<string, any>
5151
activeExecutionPath: string[]
52-
activatedEdges?: Record<string, Array<{ source: string; target: string; sourceHandle?: string }>>
5352
pendingQueue?: string[]
5453
remainingEdges?: Edge[]
5554
dagIncomingEdges?: Record<string, string[]>

apps/sim/executor/handlers/agent/agent-handler.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ describe('AgentBlockHandler', () => {
158158
completedLoops: new Set(),
159159
executedBlocks: new Set(),
160160
activeExecutionPath: new Set(),
161-
activatedEdges: new Map(),
162161
workflow: {
163162
blocks: [],
164163
connections: [],

apps/sim/executor/handlers/api/api-handler.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ describe('ApiBlockHandler', () => {
4545
loopExecutions: new Map(),
4646
executedBlocks: new Set(),
4747
activeExecutionPath: new Set(),
48-
activatedEdges: new Map(),
4948
completedLoops: new Set(),
5049
}
5150
mockApiTool = {

apps/sim/executor/handlers/condition/condition-handler.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ describe('ConditionBlockHandler', () => {
133133
loopExecutions: new Map(),
134134
executedBlocks: new Set([mockSourceBlock.id]),
135135
activeExecutionPath: new Set(),
136-
activatedEdges: new Map(),
137136
workflow: mockWorkflow as SerializedWorkflow,
138137
completedLoops: new Set(),
139138
}

apps/sim/executor/handlers/evaluator/evaluator-handler.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ describe('EvaluatorBlockHandler', () => {
5454
completedLoops: new Set(),
5555
executedBlocks: new Set(),
5656
activeExecutionPath: new Set(),
57-
activatedEdges: new Map(),
5857
}
5958

6059
// Reset mocks using vi

0 commit comments

Comments
 (0)