Skip to content

query-node-viewer mirrors store events into local state (ADR-049 rule 5) #4289

Closed

Description

@mstomar125

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.)

Activity

  1. mstomar125 commented on Nov 17, 2026

    @mstomar125
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions