Skip to content

[P0][bug] UI frozen during initial sync pull — WatchNodes flood, no backpressure/background streaming/progress #1673

Closed

Description

@mstomar125

Summary

During the initial pull of a populated tenant (tenant_demo, 24,197 nodes / 39,183 relationships), the app is unusable: content pane stuck "Loading…", pill "Syncing…", until/if the pull drains. The daemon floods the frontend's WatchNodes stream faster than the UI consumes it — 69× WatchNodes subscriber lagged; some events dropped warnings during the pull. The pull itself progresses fine (daemon healthy, local DB growing) — a frontend backpressure / main-thread problem, not a daemon stall. Validation round-1 (2026-07-16), core 330799b2 / sync 50ef06d.

Not data loss: the collection list is query-based and membership-correct once loaded.

Fix direction

  • Initial sync streams in the background: workspace interactive immediately (show local, fill in as it pulls).
  • WatchNodes consumer gets backpressure/batching (coalesce, chunk, apply off the hot path) so a burst can't starve the UI.
  • Progress indicator ("Syncing N/M…") instead of blocking "Loading…".
  • Investigate the double sync-service spawn: pull + push spawned + realtime connected, joining channels schema=tenant_demo each logged 2× at pull start — a possible double orchestrator/subscription doubling the flood (ADR-053 double-open class?).

Evidence

Validation report val-P0-ui-blocked-during-sync.md (round-1 pack, 2026-07-16); ~/.nodespace/logs/nodespaced.log.

Activity

  1. self-assigned this
    on Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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