Repository navigation
docs(persistence): document networkTimeoutMs: 0 for cache-first rendering - #2288
Conversation
…ring Co-authored-by: Isaac <no-reply@databricks.com>
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Document restored-row readiness docs/guides/sqlite-persistence.md |
Adds an example showing that networkTimeoutMs: 0 makes a Collection ready when SQLite restoration installs rows. Network sync continues, and later changes apply. An empty restore still waits for the network. On-demand Collections apply the behavior per query demand. |
Priority:
Estimated code review effort: 1 (Trivial) | ~3 minutes
Change: Other
Possibly related issues
- network-first: an eager Collection that last synced to zero rows stays loading offline #2284 — Describes the documented behavior where an empty SQLite restore remains loading until the network responds.
- Optional expiry for persisted demand coverage #2211 — Proposes expiry for persisted coverage used by on-demand query demands, which relates to the documented per-demand behavior.
Possibly related PRs
- TanStack/db#2168 — Changes persisted Collection readiness based on restored rows, deadlines, and remote failure.
- TanStack/db#2263 — Implements per-demand SQLite fallback for covered on-demand loads.
- TanStack/db#2285 — Corrects the same guide’s on-demand
initialRendercontract.
Merge Risk: 
Minimal · up to 4c903
-
The new guidance matches the implemented behavior and is ready to merge after normal checks.
Pre-merge checks: 
5
-
Full details: Description check
-
Explanation
The description explains the change, motivation, behavior, testing evidence, documentation scope, and lack of code changes. It does not use the template headings or include the checklist and release-impact sections explicitly, but it is otherwise sufficiently complete.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
|
Size Change: 0 B Total Size: 238 kB ℹ️ View Unchanged
|
More templates
@tanstack/angular-db
@tanstack/browser-db-sqlite-persistence
@tanstack/capacitor-db-sqlite-persistence
@tanstack/cloudflare-durable-objects-db-sqlite-persistence
@tanstack/convex-db-collection
@tanstack/db
@tanstack/db-ivm
@tanstack/db-sqlite-persistence-core
@tanstack/electric-db-collection
@tanstack/electron-db-sqlite-persistence
@tanstack/expo-db-sqlite-persistence
@tanstack/node-db-sqlite-persistence
@tanstack/offline-transactions
@tanstack/powersync-db-collection
@tanstack/preact-db
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/react-native-db-sqlite-persistence
@tanstack/react-router-with-db
@tanstack/rxdb-db-collection
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/tauri-db-sqlite-persistence
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
The doc-snippet check rejected the bare object-property fence. Show the option inside a persistedCollectionOptions call instead. Co-authored-by: Isaac <no-reply@databricks.com>
The SQLite persistence guide does not say how to render cached rows as soon as the SQLite restore completes. The behavior follows from the deadline rule, but users must work it out (see #2279). This PR adds a short example to the "Render after SQLite restore" section.
The new text says:
networkTimeoutMs: 0makes a Collectionreadyfrom its restored rows immediately.The change is in
docs/guides/sqlite-persistence.mdonly. It changes no code. I checked the behavior onmainwith the browser adapter: a populated restore becameready7 ms after the restore while the network did not answer, and an empty restore stayedloading.This pull request and its description were written by Isaac.
Summary by CodeRabbit
networkTimeoutMs: 0allows restored rows to be rendered as soon as restoration completes, while network synchronization continues and later updates are applied.