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] Sync-internal LWW conflicts shown as 'Your edit conflicted' toasts for nodes the user never edited #1684
Surfaced during the live write-starvation validation (2026-07-17).
Observed: the daemon resolved a batch of sync-internal LWW conflicts on nodes the user never touched (all on "Recovered Items" nodes — the daemon's own reconcile, cloud-wins). The frontend showed one "Your edit conflicted with a remote change" toast per conflict (a stack of them), even though the user made no edit to those nodes.
Why it matters: the toast is user-facing and phrased as "Your edit conflicted", but these were background reconcile/LWW resolutions on nodes outside the user's current view/edits. It's misleading (implies the user lost their work) and spammy (one toast per node during a reconcile burst).
Fix direction: only surface a conflict toast when the conflict is on a node the user is actively editing (or whose optimistic local edit was actually dropped from the UI). Suppress/aggregate conflict notifications for background sync/reconcile resolutions on nodes not in the active edit set. Related root cause: nodespace-cloud#82 (reachability timeout that caused the thrash) + nodespace-sync#334 (the Recovered-Items churn that generated the conflicts).
Traced every path that raises a conflict toast (conflictNotifications.add — the only emitter is shared-node-store.svelte.ts). There are exactly three, all user-relevant:
OCC VERSION_CONFLICT — the daemon rejected the user's own write (version mismatch).
A genuinely-newer foreign database-sourced write to an ACTIVELY-EDITED node — via decideRemoteUpdate, gated on isFocused || hasPending.
A local write-failure — the user's own change didn't save.
The exact scenario this issue reported — a background sync-internal LWW / reconcile resolution (cloud-wins) on a node the user never touched (e.g. Recovered Items) — arrives as a database-sourced WatchNodes event to a node that is not actively edited, so decideRemoteUpdate returns apply: true with nonotifyConflict — it is applied silently, no toast. Pinned by remote-update-policy.test.ts: "applies when the node is not actively edited (not focused, no pending write)".
What fixed it (all landed after this report): the daemon now suppresses a connection's own WatchNodes echoes authoritatively via x-ns-client-id (#1691), replacing the racy content-comparison heuristic that produced false-positive toasts; the conflict-toast churn cleanup (#1693); and the decideRemoteUpdate extraction with the actively-edited gate (#1608 / #1512). A conflict is now surfaced only when it's on a node the user was actually editing — exactly this issue's fix direction.
Closing as resolved. (Root-cause thrash drivers cloud#82 + sync#334 were also fixed separately.)
Activity
Daemon does not suppress same-origin WatchNodes echo — frontend guess…
mstomar125 commentedon Aug 1, 2026
Verified fixed on current main (2026-08-01)
Traced every path that raises a conflict toast (
conflictNotifications.add— the only emitter isshared-node-store.svelte.ts). There are exactly three, all user-relevant:VERSION_CONFLICT— the daemon rejected the user's own write (version mismatch).database-sourced write to an ACTIVELY-EDITED node — viadecideRemoteUpdate, gated onisFocused || hasPending.The exact scenario this issue reported — a background sync-internal LWW / reconcile resolution (cloud-wins) on a node the user never touched (e.g. Recovered Items) — arrives as a
database-sourcedWatchNodesevent to a node that is not actively edited, sodecideRemoteUpdatereturnsapply: truewith nonotifyConflict— it is applied silently, no toast. Pinned byremote-update-policy.test.ts: "applies when the node is not actively edited (not focused, no pending write)".What fixed it (all landed after this report): the daemon now suppresses a connection's own
WatchNodesechoes authoritatively viax-ns-client-id(#1691), replacing the racy content-comparison heuristic that produced false-positive toasts; the conflict-toast churn cleanup (#1693); and thedecideRemoteUpdateextraction with the actively-edited gate (#1608 / #1512). A conflict is now surfaced only when it's on a node the user was actually editing — exactly this issue's fix direction.Closing as resolved. (Root-cause thrash drivers cloud#82 + sync#334 were also fixed separately.)