Browse Source

feat(45-03): trigger dimming recompute for Conditional Switch rule updates

- Extend updateNodeData to check for conditionalSwitch type
- Recompute dimming when 'rules' data changes
- Pattern: conditionalSwitch updateNodeData → rules updated → recomputeDimmedNodes()

Ensures dimming updates reactively when:
1. Component useEffect updates match status (reactive)
2. Execution pipeline updates rules with fresh match results

Completes Phase 45 Plan 03 integration.
handoff-20260429-1057
shrimbly 5 months ago
parent
commit
a623b3b5a9
  1. 5
      src/store/workflowStore.ts

5
src/store/workflowStore.ts

@ -536,10 +536,13 @@ const workflowStoreImpl: StateCreator<WorkflowStore> = (set, get) => ({
) as WorkflowNode[], ) as WorkflowNode[],
hasUnsavedChanges: true, hasUnsavedChanges: true,
})); }));
// Recompute dimming if this is a switch node and switches data changed // Recompute dimming if this is a switch or conditionalSwitch node and their control data changed
if (node?.type === "switch" && "switches" in data) { if (node?.type === "switch" && "switches" in data) {
get().recomputeDimmedNodes(); get().recomputeDimmedNodes();
} }
if (node?.type === "conditionalSwitch" && "rules" in data) {
get().recomputeDimmedNodes();
}
}, },
removeNode: (nodeId: string) => { removeNode: (nodeId: string) => {

Loading…
Cancel
Save