Repository navigation
SharedNodeStore fakes reactivity — replace the version-counter Map with a genuinely reactive per-node source - #1546
Conversation
…loses #1490) SharedNodeStore.nodes was a plain Map with a companion nodesVersion counter that every mutation bumped; reads registered a dependency on the counter rather than the node itself, so any mutation re-fired every derived value over every node. This forced a subscribe-in-effect plus local-state-copy workaround into several components, which is the root cause of a recurring race class against async daemon echoes. Swap the Map + counter for a SvelteMap (per-key tracking), delete the version-counter hack, and convert the anti-pattern sites (schema forms, table rows, ReactiveNodeService's own _updateTrigger aggregator) to read the store directly via $derived. ReactiveStructureTree's onChange subscriber channel is also removed now that its only subscriber (ReactiveNodeService) no longer needs it. Co-Authored-By: Claude <[email protected]>
Pragmatic Code Review — Initial ReviewRequirements Check (issue #1490 acceptance criteria):
Code Review Findings 🟡 Important — 🟡 Important — 🟢 Suggestion — 🟢 Suggestion — No dedicated automated test proves "mutation to node B doesn't re-fire a reader of node A." This repo's fast-unit-test harness globally mocks No other Recommendation: APPROVE |
Pragmatic Code Review — PR #1546Note on PR state: at the time of this review, Requirements Check
Code Review FindingsCritical IssuesNone. The core mechanism change is correct and the regression risk areas called out in the review brief all check out. Suggested Improvements
Nitpicks
Independent Verification Details
RecommendationCOMMENT (informational — the PR is already merged, so this is not a merge gate). Content-wise this would have been an APPROVE at review time: the fix correctly implements ADR-049, all six acceptance criteria are met, the scope is complete and atomic, and verification (grep sweeps, full test suite, lint) turned up no regressions. The two Improvement-level items (the |
malibio
left a comment
There was a problem hiding this comment.
Reviewed post-merge (PR was already merged at time of request — see full report in the comment above). No blocking issues found; two follow-up improvements noted (destroy() no-op shim, missing direct browser-mode test for no-unrelated-refire guarantee).
Closes #1490