You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
query-node-viewer mirrors store events into local state (ADR-049 rule 5) #4289
Found while checking ADR-049 against the code (2026-11-17). ADR-049 rule 5 says components do not mirror store events into local state. packages/desktop-app/src/lib/components/query-node-viewer.svelte:211 calls subscribeAll in onMount and appends nodes created outside the view into local state. It is the only production caller of subscribeAll; the per-node subscribe(id, cb) has only test callers. Decide: rework the viewer to read through the store's reactive state, or amend the rule to allow this one case. (nodesVersion and _updateTrigger are gone and SvelteMap is in, so the rest of ADR-049 holds.)
Decided: amend the rule, do not rework the viewer. Rule 5 of the reactivity record now names the query viewer as its one exception, with the reason (a saved query's result set is computed by the daemon, so it can gain a node no component holds) and what the viewer keeps (ids only). Merged in nodespace-docs#160 (reviewed against the viewer and the store; no other production caller of subscribeAll or subscribe(id, cb)). Closing.
Activity
mstomar125 commentedon Nov 17, 2026
Decided: amend the rule, do not rework the viewer. Rule 5 of the reactivity record now names the query viewer as its one exception, with the reason (a saved query's result set is computed by the daemon, so it can gain a node no component holds) and what the viewer keeps (ids only). Merged in nodespace-docs#160 (reviewed against the viewer and the store; no other production caller of subscribeAll or subscribe(id, cb)). Closing.