From a623b3b5a971cebcb7e02d205510ecdc8e5dfbf4 Mon Sep 17 00:00:00 2001 From: shrimbly Date: Thu, 26 Feb 2026 21:51:04 +1300 Subject: [PATCH] feat(45-03): trigger dimming recompute for Conditional Switch rule updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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. --- src/store/workflowStore.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/store/workflowStore.ts b/src/store/workflowStore.ts index 73c7e4bb..7ff35abf 100644 --- a/src/store/workflowStore.ts +++ b/src/store/workflowStore.ts @@ -536,10 +536,13 @@ const workflowStoreImpl: StateCreator = (set, get) => ({ ) as WorkflowNode[], 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) { get().recomputeDimmedNodes(); } + if (node?.type === "conditionalSwitch" && "rules" in data) { + get().recomputeDimmedNodes(); + } }, removeNode: (nodeId: string) => {