Skip to content
Source
Sign inSign up
TanStack/db

fix: render persisted data in Suspense after client stream errors #1960

MergedKyleAMathews(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/1960/headmerged by KyleAMathews(GitHub profile, opens in a new tab)

Showing 8 changed files with 17 additions and 4 deletions (loading 5).

x
0 of 8 viewed, 8 left
6 additions and 0 deletions.changeset/fix-react-persisted-query-error.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+'@tanstack/db': patch
+'@tanstack/react-db': patch
+---
+​
+Render completed persisted query data when a client query stream fails during network-first initial rendering. Keep derived-query load failures on the React ErrorBoundary, with errors isolated by client and cleared when the Collection restarts.
1 addition and 1 deletiondocs/contributing/glossary.mdModified
View file
@@ -43,7 +43,7 @@
| readiness | Evidence that a named consumer may proceed. Always qualify Collection readiness, subscription readiness, or initial-query readiness; they settle at different boundaries. | Provider completion or publication in general. |
| persisted restore | The eager persisted source Collection's startup read and publication of its durable rows, including an empty snapshot, in the current sync run. | Upstream/provider readiness or an SSR seed. |
| persisted readiness | An opt-in live-query signal that every source Collection completed persisted restore in the current sync run; it is unavailable if any source did not opt in. | Collection readiness, network availability, or row nonemptiness. |
-| network-first initial render | An opt-in Suspense gate that prefers Collection readiness until a configured deadline or network failure, then permits a completed persisted restore. It does not stop network sync. | The persisted-readiness status itself or a change to ordinary live-query row publication. |
+| network-first initial render | An opt-in Suspense gate that prefers Collection readiness until a configured deadline or network failure, then permits a completed persisted restore. A failed client query stream counts as network failure; a failed derived query does not. The gate does not stop network sync. | The persisted-readiness status itself or a change to ordinary live-query row publication. |
​
`source` names a role in a data flow; it does not own a lifecycle. Do not coin a
`source session`. Use `sync run` for the local Collection sync invocation
10 additions and 3 deletionsdocs/contributing/oracle-coverage.mdModified
View file
@@ -522,13 +522,20 @@