From 9d9e538a90dc9a4864477985912bad3a80a42658 Mon Sep 17 00:00:00 2001 From: Martino Ferrari Date: Wed, 24 Jun 2026 13:50:26 +0200 Subject: [PATCH] fix(logic): subscribe signals referenced by array action node params subscribeRefs() walked node kinds to build the signal subscription set but omitted the new action.array.push/set/remove nodes. Signal or local-var references in their expr/index params were never subscribed, so the live cache held no value and they resolved to NaN at run time (action.accumulate was handled, its modern equivalent action.array.push was not). Add the missing cases, including the comma-split index list for array.set. Co-Authored-By: Claude Opus 4.6 --- web/src/lib/logic.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/lib/logic.ts b/web/src/lib/logic.ts index 40b4ec4..52ddd63 100644 --- a/web/src/lib/logic.ts +++ b/web/src/lib/logic.ts @@ -399,7 +399,14 @@ export class LogicEngine { case 'flow.loop': if ((node.params.mode ?? 'count') === 'while') collectRefs(node.params.cond ?? '').forEach(want); break; case 'action.write': case 'action.accumulate': + case 'action.array.push': case 'action.log': collectRefs(node.params.expr ?? '').forEach(want); break; + case 'action.array.set': + collectRefs(node.params.expr ?? '').forEach(want); + String(node.params.index ?? '').split(',').forEach(s => collectRefs(s.trim()).forEach(want)); + break; + case 'action.array.remove': + collectRefs(node.params.index ?? '').forEach(want); break; case 'action.config.apply': case 'action.config.read': case 'action.config.write': {