Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Thank you for this PR, @Jose10go, and for the report that started this work. We merged #2263 instead. It fixes #2202 without a new adapter API. With
Because of this, This comment was written by Isaac. |
Fixes #2202
Electric progressive collections use core's on-demand sync mode, so
initialRendercurrently rejects them. Allow local initial rendering only when the adapter can certify a previously completed full snapshot, with matching durable row-set evidence. Network synchronization continues in the background.No caller-supplied progressive flag is required. A completed empty snapshot is eligible; an empty cold cache is not. Partial, legacy, reset, mismatched-shape, tag-dependent, and inconsistent-row-set caches cannot release initial rendering. Explicitly configured cursors cannot certify unseen rows as a full snapshot.
Changes across the monorepo:
@tanstack/db: add an adapter-ownedisPersistedSnapshotCompletecapability and an unavailable persisted-readiness state. Failed network loads reject rather than hanging when no eligible snapshot exists.@tanstack/electric-db-collection: record completion with the rows and resume metadata when progressive full synchronization completes; expose the capability only for progressive collections. Resume legacy progressive caches conservatively with a fresh full sync.@tanstack/db-sqlite-persistence-core: hydrate a progressive startup baseline only after checking completion metadata and key-set evidence from the same atomic SQLite snapshot.Validation:
git diff --checkpassed.Tradeoffs and scope:
useLiveQueryare not gated by it. Genuine on-demand collections remain unsupported.