From 48baa41459d7393fa67e9b8ea58e68aa9be22ded Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Fri, 30 Jan 2026 17:53:31 -0800 Subject: [PATCH] remove comments --- apps/sim/executor/handlers/condition/condition-handler.ts | 8 -------- apps/sim/executor/utils/block-data.ts | 5 ----- 2 files changed, 13 deletions(-) diff --git a/apps/sim/executor/handlers/condition/condition-handler.ts b/apps/sim/executor/handlers/condition/condition-handler.ts index 508de5af3..96fe0db4b 100644 --- a/apps/sim/executor/handlers/condition/condition-handler.ts +++ b/apps/sim/executor/handlers/condition/condition-handler.ts @@ -20,11 +20,6 @@ const CONDITION_TIMEOUT_MS = 5000 * Evaluates a single condition expression. * Variable resolution is handled consistently with the function block via the function_execute tool. * Returns true if condition is met, false otherwise. - * - * @param ctx - Execution context - * @param conditionExpression - The condition expression to evaluate - * @param providedEvalContext - Optional evaluation context with variables - * @param currentNodeId - Optional current node ID for parallel branch context resolution */ export async function evaluateConditionExpression( ctx: ExecutionContext, @@ -95,15 +90,12 @@ export class ConditionBlockHandler implements BlockHandler { ): Promise { const conditions = this.parseConditions(inputs.conditions) - // In parallel branches, block.id is virtual (e.g., "condition₍0₎") but connections - // use original IDs (e.g., "condition"). Extract the base ID for connection lookups. const baseBlockId = extractBaseBlockId(block.id) const branchIndex = isBranchNodeId(block.id) ? extractBranchIndex(block.id) : null const sourceConnection = ctx.workflow?.connections.find((conn) => conn.target === baseBlockId) let sourceBlockId = sourceConnection?.source - // If we're in a parallel branch, look up the virtual source block ID for the same branch if (sourceBlockId && branchIndex !== null) { const virtualSourceId = buildBranchNodeId(sourceBlockId, branchIndex) if (ctx.blockStates.has(virtualSourceId)) { diff --git a/apps/sim/executor/utils/block-data.ts b/apps/sim/executor/utils/block-data.ts index eccd0f0fe..9875c79e9 100644 --- a/apps/sim/executor/utils/block-data.ts +++ b/apps/sim/executor/utils/block-data.ts @@ -99,7 +99,6 @@ export function collectBlockData( const blockNameMapping: Record = {} const blockOutputSchemas: Record = {} - // Determine if we're in a parallel branch context const branchIndex = currentNodeId && isBranchNodeId(currentNodeId) ? extractBranchIndex(currentNodeId) : null @@ -107,14 +106,10 @@ export function collectBlockData( if (state.output !== undefined) { blockData[id] = state.output - // If we're in a parallel branch and this state is from the same branch, - // also map it under the base block ID so references like - // resolve correctly within the same branch context if (branchIndex !== null && isBranchNodeId(id)) { const stateBranchIndex = extractBranchIndex(id) if (stateBranchIndex === branchIndex) { const baseId = extractBaseBlockId(id) - // Only set if not already set (prefer branch-specific data) if (blockData[baseId] === undefined) { blockData[baseId] = state.output }