Browse Source

fix(45): stop ConditionalSwitch from passing input text to downstream nodes

ConditionalSwitch should act as a gate/trigger, not a data router.
Active outputs now trigger downstream execution without forwarding
the upstream text through the connection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 5 months ago
parent
commit
f96df88337
  1. 6
      src/store/utils/connectedInputs.ts

6
src/store/utils/connectedInputs.ts

@ -250,10 +250,8 @@ export function getConnectedInputsPure(
// Block non-active outputs (data does not flow through non-matching rules)
if (!isActive) return;
// Active output: recursively get upstream text
const condInputs = getConnectedInputsPure(sourceNode.id, nodes, edges, _visited, dimmedNodeIds);
if (condInputs.text) text = condInputs.text;
return; // Skip normal getSourceOutput processing
// Active output: ConditionalSwitch is a gate — trigger downstream but don't pass data through
return;
}
const handleId = edge.targetHandle;

Loading…
Cancel
Save