Open History to see the last commit
1---
2title: SSR and Hydration
3id: ssr
4---
5
6TanStack DB SSR transports the smallest useful snapshot for the work the server
7performed:
8
9- Explicitly preloaded collections dehydrate as normalized collection rows.
10- Preloaded or render-discovered live queries dehydrate as ordered query-result
11 snapshots, without serializing all of their source collections.
12
13The browser renders either snapshot immediately, starts its normal collection
14sync and live-query pipeline, then atomically replaces a live-query snapshot
15when the browser result becomes authoritative.
16
17## High-level Summary
18
19The SSR-friendly API adds six concepts:
20
21- `DbClient` owns materialized collection instances for one request, browser app,
22 test, or script.
23- `collectionOptions(...)` creates a stable collection descriptor. Reusable
24 descriptors create fresh adapter config for each `DbClient`.
25- `dbClient.dehydrate()`, `dbClient.hydrate(state)`, and
26 `dbClient.applyCollectionChunk(chunk)` move explicit collection state across
27 the server/client boundary.
28- `dbClient.preloadLiveQuery(options)` captures only the ordered result of a
29 live query for hydration or streaming.
30- React and Svelte apps use `DbProvider` so hooks can resolve collection
31 descriptors against the current client.
32- `@tanstack/react-router-with-db` streams live queries discovered by Suspense
33 during a TanStack Start server render.
34
35Existing apps continue to work. `createCollection(...)` and direct collection
36instances still exist. The migration is required when you want SSR-safe request
37isolation, hydration, incremental chunks, Suspense streaming, or the 1.0-ready
38React hook shape.
39
40The old dependency-array form now warns:
41
42```tsx
43useLiveQuery((q) => q.from({ todos }).where(...), [status])
44```
45
46It still works, but warns in development and will be removed in 1.0. Prefer:
47
48```tsx
49useLiveQuery({
50 query: (q) => q.from({ todos: todoCollection }).where(...),
51})
52```
53
54React derives live query identity from structured query IR by default. Add
55`queryKey` only for opaque functional query logic or for a hot render path where
56you want to skip derived identity work.
57
58## Cheat Sheet
59
60| Task | Before | SSR-friendly |
61| --- | --- | --- |
62| Define a collection | `createCollection(options)` | `collectionOptions(id, factory)` |
63| Materialize a collection | module-level singleton | `dbClient.collection(todoCollection)` |
64| Scope collection state | module lifetime | `new DbClient()` per request/browser/test |
65| Provide React context | none | `<DbProvider client={dbClient}>` |
66| Query from React | direct collection instance | descriptor in `from`, resolved by `DbProvider` |
67| Mutate from React | import singleton collection | `useDbClient().collection(todoCollection)` |
68| Server preload | ad hoc collection preload | `collection.preload()` or `dbClient.preloadLiveQuery(...)` |
69| Serialize SSR state | none | `const state = dbClient.dehydrate()` |
70| Hydrate in browser | none | `dbClient.hydrate(state)` before hooks read it |
71| Apply rows incrementally | custom app state | `dbClient.applyCollectionChunk(chunk)` |
72| Stream render-time results | none | `routerWithDbClient(router, dbClient)` |
73| React query identity | dependency array | derived IR, or `queryKey` when needed |
74
75### Minimal React Pattern
76
77```tsx
78import {
79 DbClient,
80 DbProvider,
81 collectionOptions,
82 eq,
83 useDbClient,
84 useLiveQuery,
85} from '@tanstack/react-db'
86
87const todoCollection = collectionOptions('todos', () => ({
88 id: 'todos',
89 getKey: (todo: Todo) => todo.id,
90 sync: {
91 sync: ({ markReady }) => {
92 markReady()
93 },
94 },
95}))
96
97function useTodoCollection() {
98 return useDbClient().collection(todoCollection)
99}
100
101function Todos({ status }: { status: string }) {
102 const todos = useTodoCollection()
103
104 const { data } = useLiveQuery({
105 query: (q) =>
106 q
107 .from({ todo: todoCollection })
108 .where(({ todo }) => eq(todo.status, status)),
109 })
110
111 return (
112 <ul>
113 {data.map((todo) => (
114 <li
115 key={todo.id}
116 onClick={() => todos.update(todo.id, (draft) => {
117 draft.done = true
118 })}
119 >
120 {todo.title}
121 </li>
122 ))}
123 </ul>
124 )
125}
126
127const dbClient = new DbClient()
128
129root.render(
130 <DbProvider client={dbClient}>
131 <Todos status="open" />
132 </DbProvider>
133)
134```
135
136The factory matters when config contains mutable adapter state or closures.
137Every `DbClient` gets a fresh config and collection instance. First-party
138adapter option creators already attach an equivalent factory, so this is also
139safe:
140
141```tsx
142const todoCollection = collectionOptions(
143 localOnlyCollectionOptions<Todo>({
144 id: 'todos',
145 getKey: (todo) => todo.id,
146 })
147)
148```
149
150Within one `DbClient`, descriptors with the same `id` resolve to the same
151collection. Only the first descriptor is materialized. Include every dynamic
152parameter that changes the collection in its `id`.
153
154A descriptor created from an arbitrary concrete config can be materialized by
155one `DbClient` only. Use the explicit factory form for custom adapters and
156request-scoped dependencies.
157
158## SSR Flow
159
160The server and browser use the same descriptors, but different `DbClient`
161instances.
162
163```txt
164server request
165 -> new DbClient()
166 -> preload an explicit collection or live-query result
167 -> dbClient.dehydrate()
168 -> send state through framework loader
169
170browser
171 -> new DbClient()
172 -> dbClient.hydrate(loaderState)
173 -> <DbProvider client={dbClient}>
174 -> useLiveQuery({ query })
175 -> start source sync
176 -> atomically replace any query snapshot with the live result
177```
178
179During React hydration, descriptor-backed queries read either hydrated
180collection rows or their matching query-result snapshot for the first browser
181render. Adapter sync and queued on-demand loads start when React commits the
182external-store subscription, so the initial markup still matches the server.
183The snapshot remains visible while the source is loading. Once the browser live
184query is ready, DB publishes one handoff from the snapshot to the live result.
185
186### Server
187
188Create a fresh `DbClient` for each request. Materialize descriptors through that
189client, preload the data needed for the route, and dehydrate the client.
190
191```tsx
192import { DbClient, collectionOptions, eq } from '@tanstack/db'
193
194export const todoCollection = collectionOptions('todos', () => ({
195 id: 'todos',
196 getKey: (todo: Todo) => todo.id,
197 syncMode: 'on-demand',
198 sync: {
199 sync: ({ markReady, begin, write, commit }) => {
200 markReady()
201
202 return {
203 loadSubset: async () => {
204 const todos = await api.todos.list()
205 begin({ immediate: true })
206 for (const todo of todos) {
207 write({ type: 'insert', value: todo })
208 }
209 commit()
210 return true
211 },
212 }
213 },
214 },
215}))
216
217export async function loadTodosForSsr() {
218 const dbClient = new DbClient()
219 const todos = dbClient.collection(todoCollection)
220 await todos.preload()
221
222 return dbClient.dehydrate()
223}
224```
225
226This explicit collection preload dehydrates normalized source rows. Use it when
227multiple browser queries need the same source data.
228
229If the source is much larger than the rendered result, preload the query instead:
230
231```tsx
232const dbClient = new DbClient()
233
234await dbClient.preloadLiveQuery({
235 query: (q) =>
236 q
237 .from({ todo: todoCollection })
238 .where(({ todo }) => eq(todo.status, 'open'))
239 .select(({ todo }) => ({ id: todo.id, title: todo.title })),
240})
241
242const state = dbClient.dehydrate()
243```
244
245This payload contains the projected query result and no source collection rows
246unless that collection was also materialized explicitly.
247
248### Browser
249
250Hydrate the browser client before rendering components that read from DB.
251
252```tsx
253import {
254 DbClient,
255 DbProvider,
256 HydrationBoundary,
257} from '@tanstack/react-db'
258
259function App({ dehydratedDbState }: { dehydratedDbState: DehydratedDbState }) {
260 const [dbClient] = React.useState(() => new DbClient())
261
262 return (
263 <DbProvider client={dbClient}>
264 <HydrationBoundary state={dehydratedDbState}>
265 <Routes />
266 </HydrationBoundary>
267 </DbProvider>
268 )
269}
270```
271
272Frameworks differ in how loader data reaches the client, but the DB handoff is
273the same: `DbClient` on the server, `dehydrate()`, then `hydrate()` into the
274browser client.
275
276### Svelte
277
278Svelte resolves descriptors from its own `DbProvider` and reads hydrated query
279snapshots synchronously during server rendering:
280
281```svelte
282<script lang="ts">
283 import { DbClient, DbProvider } from '@tanstack/svelte-db'
284 import Todos from './Todos.svelte'
285
286 const client = new DbClient()
287 client.hydrate(dehydratedDbState)
288</script>
289
290<DbProvider {client}>
291 <Todos />
292</DbProvider>
293```
294
295Inside `Todos.svelte`, `useLiveQuery({ query })` can use collection descriptors
296directly. The browser subscription starts source sync and performs the same
297snapshot-to-live-result handoff as React.
298
299Live demo: https://tanstack-db-ssr-demo.netlify.app/ssr-db
300
301## Suspense Streaming with TanStack Start
302
303`@tanstack/react-router-with-db` follows the same integration pattern as
304`@tanstack/react-router-with-query`:
305
306```tsx
307import { DbClient } from '@tanstack/react-db'
308import { createRouter } from '@tanstack/react-router'
309import { routerWithDbClient } from '@tanstack/react-router-with-db'
310
311export type RouterContext = {
312 dbClient: DbClient
313}
314
315export function getRouter() {
316 const dbClient = new DbClient()
317 const router = createRouter({
318 routeTree,
319 context: { dbClient },
320 })
321
322 return routerWithDbClient(router, dbClient)
323}
324```
325
326The adapter adds `dbClient` to router context, wraps the app in `DbProvider`,
327dehydrates critical state, and opens a stream for query results discovered later
328during rendering.
329
330```tsx
331function RouteComponent() {
332 return (
333 <Suspense fallback={<p>Loading todos</p>}>
334 <TodoList />
335 </Suspense>
336 )
337}
338
339function TodoList() {
340 const { data } = useLiveSuspenseQuery({
341 query: (q) =>
342 q
343 .from({ todo: todoCollection })
344 .where(({ todo }) => eq(todo.status, 'open')),
345 })
346
347 return data.map((todo) => <Todo key={todo.id} todo={todo} />)
348}
349```
350
351When `TodoList` suspends on the server, the adapter streams the pending query
352promise. That promise resolves to the ordered live-query result snapshot inside
353the streamed `DehydratedDbState`. The source collections and D2 graph do not
354cross the wire. The browser shows the snapshot, starts the source collections
355and live query normally, then replaces the snapshot when the browser result is
356ready.
357
358The server and browser must derive the same live-query identity. Structured
359queries do this automatically. An opaque query must provide a serializable
360`queryKey`; render-time streaming throws if it cannot derive an identity.
361
362## Suspense Streaming with Next.js
363
364Next.js App Router can transport the same pending query promise through React
365Server Components. Start the preload without awaiting it, dehydrate the pending
366result, and pass that state to a client hydration boundary:
367
368```tsx
369export default function Page() {
370 const dbClient = new DbClient()
371 void dbClient.preloadLiveQuery(openTodosQuery)
372
373 const state = dbClient.dehydrate({
374 shouldDehydrateCollection: () => false,
375 shouldDehydrateLiveQuery: () => true,
376 })
377
378 return (
379 <DbHydration state={state}>
380 <Suspense fallback={<p>Loading todos</p>}>
381 <TodoList />
382 </Suspense>
383 </DbHydration>
384 )
385}
386```
387
388`DbHydration` is a client component that creates one browser `DbClient`, wraps
389children in `DbProvider`, and passes `state` to `HydrationBoundary`. React streams
390the promise result into that boundary. The full working integration is in
391`examples/react/next-ssr-e2e`.
392
393## Incremental Collection Hydration
394
395Applications can also apply collection rows received through their own stream.
396Incremental hydration uses the same collection chunk shape as holistic
397dehydration:
398
399```ts
400dbClient.applyCollectionChunk({
401 collectionId: 'todos',
402 rows: [
403 {
404 key: 'todo-1',
405 value: {
406 id: 'todo-1',
407 title: 'Streamed row',
408 status: 'open',
409 },
410 metadata: { source: 'stream' },
411 },
412 ],
413 syncMeta: { version: 1, cursor: 'abc' },
414})
415```
416
417If the target collection is already materialized, the rows apply immediately and
418existing live queries react from collection state. If the collection is not
419materialized yet, the chunk is stored and applied when that `collectionId`
420materializes.
421
422## What Gets Serialized
423
424`dbClient.dehydrate()` can emit two independent snapshot types.
425
426Serialized:
427
428- explicit collection snapshots: collection id, synced row keys and values, row
429 metadata, and adapter sync metadata from `exportSyncMeta`
430- live-query snapshots: query hash and ordered result rows; completed explicit
431 preloads are included by default, while framework integrations opt pending
432 promises into streaming
433
434Not serialized:
435
436- mutation handlers
437- pending optimistic mutations
438- pending subscriptions
439- D2 graphs or compiled pipelines
440- transaction stacks
441- module-level runtime state
442- source collection rows for a query-result snapshot, unless that collection was
443 also explicitly materialized for dehydration
444
445Choose the payload unit according to what the browser needs. Explicit collection
446preloading preserves normalized rows for reuse across queries. Live-query
447preloading avoids shipping a 50-100x larger source when the rendered projection
448is small. Neither mode serializes executable query state.
449
450## Sync Metadata
451
452Adapters can participate in resumable sync with three optional hooks:
453
454```ts
455type SyncConfig = {
456 exportSyncMeta?: () => unknown
457 importSyncMeta?: (meta: unknown) => void
458 mergeSyncMeta?: (current: unknown, incoming: unknown) => unknown
459}
460```
461
462The metadata shape is adapter-owned. Version it inside the adapter payload. If an
463adapter cannot understand incoming metadata, it should ignore it and restart
464sync from a safe point.
465
466During hydration, DB imports `syncMeta` into the materialized collection. If the
467collection already has current metadata, DB calls `mergeSyncMeta(current,
468incoming)` when provided and imports the merged result.
469
470If an adapter does not implement sync metadata hooks, row snapshots still hydrate
471and the adapter can restart sync normally.
472
473## Initial Data
474
475`initialData` is a startup seed, not a sync-ready signal.
476
477Before adapter sync starts, current `DbClient` precedence from lowest to highest
478is:
479
4801. per-materialization `initialData`
4812. persisted rows
4823. hydrated rows
483
484Fresh adapter sync is authoritative over all three. Hydrated and initial rows
485are provisional base state, so the adapter's first insert for the same key is
486reconciled as an update instead of raising a duplicate-key error.
487
488Hydrated rows and `initialData` never mark adapter sync as ready by themselves.
489The adapter still owns readiness through its sync lifecycle.
490
491## React Query Identity
492
493React hooks derive live query identity from structured query IR by default:
494
495```tsx
496function Todos({ status }: { status: string }) {
497 return useLiveQuery({
498 query: (q) =>
499 q
500 .from({ todo: todoCollection })
501 .where(({ todo }) => eq(todo.status, status)),
502 })
503}
504```
505
506The captured `status` value is represented in the structured IR, so no
507dependency array or `queryKey` is required.
508
509Use `queryKey` when the query contains opaque runtime logic that DB cannot
510stably represent:
511
512```tsx
513function SearchTodos({ search }: { search: string }) {
514 return useLiveQuery({
515 queryKey: [todoCollection.id, 'search', search],
516 query: (q) =>
517 q
518 .from({ todo: todoCollection })
519 .fn.where(({ todo }) =>
520 todo.title.toLowerCase().includes(search.toLowerCase())
521 ),
522 })
523}
524```
525
526Common reasons to add `queryKey`:
527
528- `.fn.where(...)`
529- `.fn.select(...)`
530- `.fn.having(...)`
531- function values, symbols, class instances, or circular objects captured inside
532 the structured query
533- a render path where derived identity becomes measurably expensive
534
535Before 1.0, DB warns when structured IR cannot be hashed and preserves the
536legacy mount-stable identity. The query still works, but captured values inside
537opaque logic are not reactive unless they are represented in `queryKey`. In 1.0,
538an unhashable query without `queryKey` will throw.
539
540DB also warns once in development if deriving identity becomes expensive enough
541that an explicit `queryKey` would be better.
542
543Dependency arrays are accepted for backwards compatibility:
544
545```tsx
546useLiveQuery((q) => q.from({ todo: todoCollection }), [status])
547```
548
549They warn in development and will be removed in 1.0. Migrate to the config
550object form:
551
552```tsx
553useLiveQuery({
554 query: (q) => q.from({ todo: todoCollection }),
555})
556```
557
558Add `queryKey` only if the query uses opaque logic or trips the performance
559warning.
560
561## Migration Guide
562
563### 1. Create descriptors instead of SSR singletons
564
565For collections that need SSR, replace module-level `createCollection(...)`
566with a reusable `collectionOptions(...)` descriptor.
567
568```tsx
569// Before
570export const todoCollection = createCollection({
571 id: 'todos',
572 getKey: (todo) => todo.id,
573 sync: todoSync,
574})
575
576// After
577export const todoCollection = collectionOptions('todos', () => ({
578 id: 'todos',
579 getKey: (todo: Todo) => todo.id,
580 sync: createTodoSync(),
581}))
582```
583
584Put mutable state and closures inside the factory. First-party adapter option
585creators can also be passed directly because they provide a fresh config
586factory. Collections that never participate in SSR can keep using
587`createCollection`.
588
589### 2. Add a `DbClient`
590
591Use a new client for every server request and a stable client for each browser
592app instance.
593
594```tsx
595const dbClient = new DbClient()
596```
597
598In tests, create a new client per test unless the test is explicitly covering
599shared state.
600
601### 3. Wrap React with `DbProvider`
602
603```tsx
604root.render(
605 <DbProvider client={dbClient}>
606 <App />
607 </DbProvider>
608)
609```
610
611Hooks that resolve collection descriptors need this provider. Without it, DB
612throws instead of falling back to hidden global state.
613
614### 4. Use collection hooks for imperative operations
615
616Use descriptors directly in live query sources, and materialize only when you
617need collection methods:
618
619```tsx
620function useTodoCollection() {
621 return useDbClient().collection(todoCollection)
622}
623
624function TodoActions({ id }: { id: string }) {
625 const todos = useTodoCollection()
626
627 return (
628 <button onClick={() => todos.delete(id)}>
629 Delete
630 </button>
631 )
632}
633```
634
635This keeps request/client scoping in one place and avoids reintroducing
636module-level collections.
637
638### 5. Replace dependency arrays
639
640Most queries can drop the dependency array entirely:
641
642```tsx
643// Before
644useLiveQuery(
645 (q) =>
646 q
647 .from({ todo: todoCollection })
648 .where(({ todo }) => eq(todo.status, status)),
649 [status],
650)
651
652// After
653useLiveQuery({
654 query: (q) =>
655 q
656 .from({ todo: todoCollection })
657 .where(({ todo }) => eq(todo.status, status)),
658})
659```
660
661If the query uses opaque functional variants, add `queryKey`:
662
663```tsx
664useLiveQuery({
665 queryKey: [todoCollection.id, 'status-fn', status],
666 query: (q) =>
667 q
668 .from({ todo: todoCollection })
669 .fn.where(({ todo }) => todo.status === status),
670})
671```
672
673### 6. Preload and dehydrate on the server
674
675Preload a collection when the browser should receive normalized source rows:
676
677```tsx
678const dbClient = new DbClient()
679const todos = dbClient.collection(todoCollection)
680await todos.preload()
681
682return {
683 dbState: dbClient.dehydrate(),
684}
685```
686
687Preload a live query when the browser only needs the rendered result:
688
689```tsx
690const dbClient = new DbClient()
691await dbClient.preloadLiveQuery(openTodosQuery)
692
693return {
694 dbState: dbClient.dehydrate(),
695}
696```
697
698### 7. Hydrate before client hooks read DB
699
700```tsx
701<DbProvider client={client}>
702 <HydrationBoundary state={loaderData.dbState}>
703 <App />
704 </HydrationBoundary>
705</DbProvider>
706```
707
708Imperative integrations can call `client.hydrate(loaderData.dbState)` before
709rendering instead.
710
711## Compatibility
712
713No existing public API is removed by this change.
714
715Still supported:
716
717- `createCollection(...)`
718- passing collection instances to `useLiveQuery(...)`
719- `useLiveQuery(queryFn, deps)`
720- `useLiveSuspenseQuery(queryFn, deps)`
721- mutation APIs such as `insert`, `update`, `delete`, `subscribe`, and
722 optimistic mutation helpers
723
724Warnings:
725
726- React dependency arrays warn in development and will be removed in 1.0.
727- Opaque query IR without `queryKey` warns in development and keeps legacy
728 mount-stable identity until 1.0. In 1.0 it will throw.
729- Expensive derived identity warns in development and suggests `queryKey`.
730
731Required for SSR:
732
733- stable explicit collection ids
734- request-scoped server `DbClient`
735- browser-scoped client `DbClient`
736- `DbProvider` for descriptor resolution in React
737- `dehydrate()` on the server and `hydrate()` in the browser
738
739Required for render-time Suspense streaming:
740
741- `routerWithDbClient(router, dbClient)`
742- `useLiveSuspenseQuery(...)` inside a Suspense boundary
743- a stable derived query identity or explicit serializable `queryKey`
744
745## Detailed Changelog
746
747### Added
748
749- `DbClient`
750- `collectionOptions(...)`
751- `CollectionOptions` descriptor type
752- `CollectionMaterializeOptions`
753- `DehydratedDbState`
754- `DehydratedCollectionChunk`
755- `DehydratedCollectionRow`
756- `dbClient.collection(descriptor, options?)`
757- `dbClient.dehydrate()`
758- `dbClient.hydrate(state)`
759- `dbClient.applyCollectionChunk(chunk)`
760- `dbClient.subscribe(listener)`
761- `dbClient.createTransaction(config)`
762- `dbClient.cleanup()`
763- React `DbProvider`
764- React `useDbClient()`
765- React `useOptionalDbClient()`
766- React `HydrationBoundary`
767- React descriptor resolution inside live query builders
768- React derived structured query identity
769- React `queryKey` escape hatch for opaque or hot-path queries
770- React per-query `client` override
771- SSR-capable `useSyncExternalStore` server snapshot support
772- `dbClient.preloadLiveQuery(...)`
773- Svelte `DbProvider`, `useDbClient()`, descriptor resolution, and synchronous
774 server snapshot support
775- TanStack Start and Next.js Playwright SSR E2E coverage
776- `@tanstack/react-router-with-db`
777- render-time `useLiveSuspenseQuery` promise streaming
778
779### Changed
780
781- React `useLiveQuery({ query })` can use collection descriptors directly in
782 `from`, `join`, `leftJoin`, and `unionAll` sources when a `DbProvider` is
783 present.
784- React live query identity is derived from normalized structured IR when no
785 explicit `queryKey` or legacy dependency array is supplied.
786- Explicit collection preloading serializes normalized collection rows.
787- Live-query preloading and render-time discovery serialize ordered result
788 snapshots without implicitly serializing source collections.
789- Browser observers keep the hydrated result visible while normal source sync
790 starts, then publish one authoritative handoff.
791- Hydration applies rows as committed synced state without invoking mutation
792 handlers or creating optimistic state.
793- Hydration and adapter sync begin in a deterministic order: pending rows and
794 sync metadata are imported before sync starts.
795- `DbClient` owns collection instances and ambient transaction scope; cleanup
796 releases both.
797- Incremental chunks use the same collection payload shape as full dehydration.
798- Streamed live-query promises resolve to live-query result snapshots.
799
800### Deprecated
801
802- React dependency arrays for `useLiveQuery` and wrappers that delegate to it.
803 They still work and warn in development. They are planned for removal in 1.0.
804
805### Not Changed
806
807- `createCollection(...)` remains available.
808- Direct collection runtime APIs remain available.
809- Vue, Solid, and Angular keep their existing dependency/reactivity model until
810 they get their own SSR/client-provider work. Svelte is covered by this change.
811- Query collection `queryKey` is still TanStack Query's cache key. It is
812 separate from React live query identity.
813
814## Validation
815
816The SSR strategy is covered by:
817
818- core `DbClient` tests for hydration, streaming chunks, sync metadata,
819 initial data precedence, explicit ids, and no optimistic serialization
820- React tests for `DbProvider`, descriptor resolution, derived query identity,
821 `queryKey`, deprecation warnings, SSR result snapshots, and atomic handoff
822- Svelte tests for provider ownership, server snapshot rendering, and browser
823 handoff
824- query adapter tests to ensure Query cache behavior still holds
825- persistence core tests to ensure persisted row behavior remains intact
826- TanStack Start and Next.js Playwright E2Es that verify a Suspense fallback,
827 streamed query result, omitted source-only data, clean hydration, and atomic
828 replacement by browser sync