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
[bug] batchSetNodes clobbers a focused/pending node on tree (re)load — missing the skip-while-editing guard #1436
Severity: high · Confidence: med-high (verified guard is absent)
setNode() refuses to overwrite a focused or pending node from a database source (shared-node-store.svelte.ts:1409-1440), but batchSetNodes() (1692-1760, used by doLoadChildrenTree with a database source, line 2178) only replicates the ai-chat "fewer messages" guard — no isFocused || hasPending check; it calls nodesSet unconditionally. A concurrent loadChildrenTree for a parent whose child is being edited overwrites the child's optimistic content mid-keystroke (the nodespace-sync#76 corruption class the single-node guard was built to prevent).
Fix: apply the same isFocused || hasPending skip (+ version stash) per node inside the batchSetNodes database-source loop.
Found via the 2026-06-18 multi-repo bug-hunt sweep. Confidence/severity from the sweep + spot-verification.
Resolved in #1453 (Batch A). batchSetNodes now applies the same isFocused || hasPending skip-while-editing guard (+ server-confirmed-version stash) as setNode in its database-source loop, so a concurrent doLoadChildrenTree reload can't clobber a child being edited mid-keystroke. Four new guard cases added to the skip-while-editing suite; full frontend suite 3890/3890; test:free-users 7/7.
Activity
mstomar125 commentedon Jun 24, 2026
Resolved in #1453 (Batch A).
batchSetNodesnow applies the sameisFocused || hasPendingskip-while-editing guard (+ server-confirmed-version stash) assetNodein its database-source loop, so a concurrentdoLoadChildrenTreereload can't clobber a child being edited mid-keystroke. Four new guard cases added to the skip-while-editing suite; full frontend suite 3890/3890; test:free-users 7/7.