revert: keep server-rendered pending UI of no-SSR routes through hydration (#8643) #8646
main fromrefs/pull/8646/head·merged by Sheraff(GitHub profile, opens in a new tab) 🎯 Changes#
Reverts #8643. Reopens #8640 until a proper fix lands.
#8643 introduced a React hydration mismatch. It affects ssr: false and ssr: 'data-only' routes that have no pendingComponent (and no defaultPendingComponent). React hydrates the route's Suspense boundary after the shell commits. The client load starts in between, and for data-only routes it commits immediately. The boundary then hydrates the route component against the server's pending UI:
Hydration failed because the server rendered HTML didn't match the client.
...
<Suspense fallback={null}>
<MatchInnerImpl ...>
<Item>
+ <button ...>
Before #8643, ClientOnly rendered its fallback during hydration whatever the match status was, which hid this. The #8643 tests all used a pendingComponent, so they missed it.
Solid and Vue are reverted too. The change was shared across the adapters, and it is easier to redo all three together.
The changeset is removed with the revert. #8643 was never released, so no changeset is needed.
AI-assisted (Claude).
✅ Checklist#
- I have followed the steps in the Contributing guide.
- I have tested code changes locally with the relevant test commands, or tests do not apply to this pull request.
- I fully understand the code in this pull request, including any code generated with AI assistance.
🚀 Release Impact#
- This change affects published code, and I have generated a changeset.
- This change is docs/CI/dev-only (no release).
🤖 Generated with Claude Code
Summary by CodeRabbit#
- Bug Fixes
- Improved pending UI behavior for routes configured with
ssr: falseorssr: 'data-only'across React, Solid, and Vue routers. These routes now show their pending UI during server rendering and use it as the client-only fallback while route content becomes available. - Pending UI now reflects the route’s actual pending status rather than appearing solely because rendering is on the server.
- Improved pending UI behavior for routes configured with
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-router
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-router
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: vue-router
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Repository: TanStack/router/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
b2fe0142-4182-4f45-bd1d-ead40d2c3981
📥 Commits
Reviewing files that changed from the base of the PR and between ff9f753c090c2f8832a06204a1c3b56c4c5d885f and 6209e8d20ffb23a8fc5c6ac6738ac2fffd6a37b2.
📒 Files selected for processing (10)
.changeset/no-ssr-pending-hydration.mdpackages/react-router/src/Match.tsxpackages/react-router/tests/issue-8640-data-only-pending-hydration.test.tsxpackages/solid-router/src/Match.tsxpackages/solid-router/tests/issue-8640-data-only-pending-hydration.test.tsxpackages/solid-router/tests/issue-8640/client-entry.tsxpackages/solid-router/tests/issue-8640/routeTree.tsxpackages/solid-router/tests/issue-8640/server-entry.tsxpackages/vue-router/src/Match.tsxpackages/vue-router/tests/issue-8640-data-only-pending-hydration.test.tsx
💤 Files with no reviewable changes (7)
- .changeset/no-ssr-pending-hydration.md
- packages/react-router/tests/issue-8640-data-only-pending-hydration.test.tsx
- packages/solid-router/tests/issue-8640-data-only-pending-hydration.test.tsx
- packages/solid-router/tests/issue-8640/client-entry.tsx
- packages/solid-router/tests/issue-8640/routeTree.tsx
- packages/solid-router/tests/issue-8640/server-entry.tsx
- packages/vue-router/tests/issue-8640-data-only-pending-hydration.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
📝 Walkthrough
Walkthrough#
React, Solid, and Vue route matches now wrap routes with
ssr: falseorssr: 'data-only'inClientOnly, using pending content as fallback. The PR also removes the related hydration tests and changeset.Changes#
No-SSR route rendering
Layer / File(s) Summary React route match rendering
packages/react-router/src/Match.tsx,packages/react-router/tests/issue-8640-data-only-pending-hydration.test.tsx,.changeset/no-ssr-pending-hydration.mdReact wraps no-SSR route content in ClientOnlywith pending content as fallback. The pending branch now checks match status. The hydration test and changeset were removed.Solid route match rendering
packages/solid-router/src/Match.tsx,packages/solid-router/tests/issue-8640/*Solid adjusts pending and Suspense fallback conditions, and wraps no-SSR matches in ClientOnly. The hydration test and its route and document helpers were removed.Vue route match rendering
packages/vue-router/src/Match.tsx,packages/vue-router/tests/issue-8640-data-only-pending-hydration.test.tsxVue wraps no-SSR matches in ClientOnlywith the resolved pending component as fallback.MatchInnernow renders pending content when the match status is pending. The hydration test was removed.Priority: ➖ Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Suggested reviewers:
schiller-manuel
Merge Risk: ⚪ Minimal · up to
6209eNo actionable merge-blocking issue is established; the change is mergeable after normal checks.
Pre-merge checks |
4 | 1❌ Failed checks (1 warning)#
Check name Status Explanation Resolution Docstring Coverage Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold. ✅ Passed checks (4 passed)
Check name Status Explanation Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Title check The title clearly identifies the revert and its effect on server-rendered pending UI for no-SSR routes during hydration. Description check The description explains the motivation, affected adapters, hydration mismatch, issue references, AI assistance, and changeset handling. The testing checklist remains unchecked, and neither release-im…
- Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
🛠️ Fix failing CI checks 💡
- 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.🚀 Changeset Version Preview#
5 package(s) bumped directly, 19 bumped as dependents.
🟩 Patch bumps#
Package Version Reason @tanstack/history1.162.4 → 1.162.5 Changeset @tanstack/react-router1.170.41 → 1.170.42 Changeset @tanstack/router-core1.171.34 → 1.171.35 Changeset @tanstack/solid-router1.170.38 → 1.170.39 Changeset @tanstack/vue-router1.170.37 → 1.170.38 Changeset @tanstack/react-start1.168.60 → 1.168.61 Dependent @tanstack/react-start-client1.168.39 → 1.168.40 Dependent @tanstack/react-start-rsc0.1.59 → 0.1.60 Dependent @tanstack/react-start-server1.167.46 → 1.167.47 Dependent @tanstack/router-cli1.167.40 → 1.167.41 Dependent @tanstack/router-generator1.167.40 → 1.167.41 Dependent @tanstack/router-plugin1.168.42 → 1.168.43 Dependent @tanstack/router-vite-plugin1.167.42 → 1.167.43 Dependent @tanstack/solid-start1.168.57 → 1.168.58 Dependent @tanstack/solid-start-client1.168.37 → 1.168.38 Dependent @tanstack/solid-start-server1.167.44 → 1.167.45 Dependent @tanstack/start-client-core1.170.34 → 1.170.35 Dependent @tanstack/start-plugin-core1.171.49 → 1.171.50 Dependent @tanstack/start-server-core1.169.39 → 1.169.40 Dependent @tanstack/start-static-server-functions1.167.39 → 1.167.40 Dependent @tanstack/start-storage-context1.167.36 → 1.167.37 Dependent @tanstack/vue-start1.168.56 → 1.168.57 Dependent @tanstack/vue-start-client1.167.40 → 1.167.41 Dependent @tanstack/vue-start-server1.167.44 → 1.167.45 Dependent Bundle Size Benchmarks#
- Commit:
25f9505505e9 - Measured at:
2026-10-09T19:22:56.028Z - Baseline source:
history:ff9f753c090c - Dashboard: bundle-size history
The following scenarios have bundle-size changes compared with the baseline:
Scenario Current (gzip) Initial (gzip) Raw Brotli Trend react-router.minimal84.0 KiB
+78 B83.8 KiB
+76 B261.4 KiB
+247 B73.2 KiB
+98 B▅▅▅███████▁█
react-router.full87.5 KiB
+10 B87.4 KiB
+9 B273.2 KiB
+45 B76.4 KiB
+54 B▁▁▁███████▆█
solid-router.minimal33.5 KiB
+80 B33.4 KiB
+83 B95.7 KiB
+447 B30.3 KiB
+138 B███▆▆▆▆▆▆▆▁▆
solid-router.full38.4 KiB
+62 B38.3 KiB
+61 B110.5 KiB
+302 B34.7 KiB
+97 B███▇▇▇▇▇▇▇▁▇
vue-router.minimal49.5 KiB
+48 B49.3 KiB
+50 B136.6 KiB
+166 B44.8 KiB
+105 B▂▂▂███████▁█
vue-router.full55.1 KiB
+45 B55.0 KiB
+46 B154.9 KiB
+166 B49.8 KiB
+144 B▁▁▁███████▁█
react-start.minimal96.7 KiB
+21 B96.6 KiB
+23 B302.2 KiB
+133 B83.9 KiB
-69 B███▇▇▇▇▇▇▃▁▃
react-start.query-integration104.2 KiB
+28 B104.0 KiB
+29 B328.8 KiB
+125 B90.4 KiB
-7 B▆▆▆██████▃▁▃
react-start.deferred-hydration97.4 KiB
+24 B96.6 KiB
+23 B303.6 KiB
+133 B84.6 KiB
-52 B█████████▃▁▃
react-start.full99.9 KiB
+9 B99.8 KiB
+10 B312.0 KiB
+45 B86.7 KiB
+15 B▆▆▆██████▂▁▂
react-start.rsbuild.minimal100.3 KiB
+29 B100.2 KiB
+29 B313.2 KiB
+147 B86.6 KiB
-43 B▃▃▃██████▃▁▃
react-start.rsbuild.minimal-iife100.7 KiB
+28 B100.6 KiB
+28 B314.2 KiB
+147 B87.0 KiB
-27 B▃▃▃██████▃▁▃
react-start.rsbuild.full103.6 KiB
+8 B103.4 KiB
+8 B323.3 KiB
+45 B89.4 KiB
+11 B▂▂▂██████▂▁▂
solid-start.minimal46.2 KiB
+75 B46.1 KiB
+73 B135.4 KiB
+445 B41.2 KiB
+53 B███▅▅▅▅▅▅▄▁▄
solid-start.deferred-hydration49.3 KiB
+88 B46.2 KiB
+89 B142.8 KiB
+451 B44.0 KiB
+75 B███▅▅▅▅▅▅▄▁▄
solid-start.full51.4 KiB
+51 B51.3 KiB
+51 B150.8 KiB
+299 B45.6 KiB
-16 B███▆▆▆▆▆▆▄▁▄
vue-start.minimal65.4 KiB
+51 B65.3 KiB
+52 B185.9 KiB
+166 B58.4 KiB
0 B▇▇▇██████▅▁▅
vue-start.full69.3 KiB
+59 B69.1 KiB
+57 B198.3 KiB
+166 B61.8 KiB
+62 B███▇▇▇▇▇▇▄▁▄
Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.
- Commit:
More templates
- tanstack-router-react-example-authenticated-routes
- tanstack-router-react-example-authenticated-routes-firebase
- tanstack-router-react-example-basic
- tanstack-router-react-example-basic-default-search-params
- tanstack-router-react-example-basic-devtools-panel
- tanstack-router-react-example-basic-file-based
- tanstack-router-react-example-basic-non-nested-devtools
- tanstack-router-react-example-react-query
- tanstack-router-react-example-basic-react-query-file-based
- tanstack-router-react-example-basic-ssr-file-based
- tanstack-router-react-example-basic-ssr-streaming-file-based
- tanstack-router-react-example-basic-virtual-file-based
- tanstack-router-react-example-basic-virtual-inside-file-based
- tanstack-router-react-example-deferred-data
- tanstack-router-i18n-paraglide
- tanstack-router-react-example-kitchen-sink
- tanstack-router-react-example-kitchen-sink-file-based
- tanstack-router-react-example-kitchen-sink-react-query
- tanstack-router-react-example-kitchen-sink-react-query-file-based
- tanstack-router-react-example-large-file-based
- tanstack-router-react-example-location-masking
- tanstack-router-react-example-navigation-blocking
- tanstack-router-react-example-quickstart
- tanstack-router-react-example-quickstart-esbuild-file-based
- tanstack-router-react-example-quickstart-file-based
- tanstack-router-react-example-quickstart-rspack-file-based
- tanstack-router-react-example-quickstart-webpack-file-based
- router-monorepo-react-query
- router-mono-simple
- router-mono-simple-lazy
- tanstack-router-react-example-scroll-restoration
- tanstack-search-validator-adapters
- tanstack-start-example-bare
- tanstack-start-example-basic
- tanstack-start-example-basic-auth
- tanstack-router-react-example-basic-authjs
- tanstack-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- tanstack-start-example-basic-rsbuild
- tanstack-start-example-basic-static
- tanstack-start-bun-hosting
- tanstack-start-example-clerk-basic
- tanstack-start-example-convex-trellaux
- tanstack-start-example-counter
- tanstack-start-i18n-paraglide
- tanstack-start-example-large
- tanstack-start-example-material-ui
- tanstack-start-example-next-migration
- tanstack-start-example-rscs
- tanstack-start-streaming-data-from-server-functions
- tanstack-start-example-supabase-basic
- tanstack-start-tailwind-v4
- tanstack-start-example-trellaux
- tanstack-start-example-workos
- tanstack-router-react-example-view-transitions
- tanstack-router-react-example-with-framer-motion
- tanstack-router-react-example-with-trpc
- tanstack-router-react-example-with-trpc-react-query
- tanstack-router-vue-example-basic-jsx
- tanstack-router-vue-example-basic-file-based-jsx
- tanstack-router-vue-example-basic-file-based-sfc
- tanstack-router-solid-example-authenticated-routes
- tanstack-router-solid-example-authenticated-routes-firebase
- tanstack-router-solid-example-basic
- tanstack-router-solid-example-basic-default-search-params
- tanstack-router-solid-example-basic-devtools-panel
- tanstack-router-solid-example-basic-file-based
- tanstack-router-solid-example-basic-non-nested-devtools
- tanstack-router-solid-example-basic-solid-query
- tanstack-router-solid-example-basic-solid-query-file-based
- tanstack-router-solid-example-basic-ssr-file-based
- tanstack-router-solid-example-basic-ssr-streaming-file-based
- tanstack-router-solid-example-basic-virtual-file-based
- tanstack-router-solid-example-basic-virtual-inside-file-based
- tanstack-router-solid-example-deferred-data
- tanstack-router-solid-i18n-paraglide
- tanstack-router-solid-example-kitchen-sink
- tanstack-router-solid-example-kitchen-sink-file-based
- tanstack-router-solid-example-kitchen-sink-solid-query
- tanstack-router-solid-example-kitchen-sink-solid-query-file-based
- tanstack-router-solid-example-large-file-based
- tanstack-router-solid-example-location-masking
- tanstack-router-solid-example-navigation-blocking
- tanstack-router-solid-example-quickstart
- tanstack-router-solid-example-quickstart-esbuild-file-based
- tanstack-router-solid-example-quickstart-file-based
- tanstack-router-solid-example-quickstart-rspack-file-based
- tanstack-router-solid-example-quickstart-webpack-file-based
- @tanstack/router-solid-mono-simple
- router-solid-mono-simple-lazy
- router-solid-monorepo-solid-query
- tanstack-router-solid-example-scroll-restoration
- tanstack-solid-router-search-validator-adapters
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- tanstack-solid-start-example-basic-authjs
- tanstack-solid-start-example-basic-cloudflare
- tanstack-solid-start-example-basic-netlify
- tanstack-solid-start-example-basic-nitro
- tanstack-start-example-basic-solid-query
- tanstack-solid-start-example-basic-static
- tanstack-solid-start-bun-hosting
- tanstack-solid-start-example-convex-better-auth
- tanstack-solid-start-example-counter
- tanstack-solid-start-i18n-paraglide
- tanstack-solid-start-example-large
- tanstack-solid-start-streaming-data-from-server-functions
- tanstack-solid-start-example-supabase-basic
- tanstack-solid-start-tailwind-v4
- tanstack-router-solid-example-view-transitions
- tanstack-router-solid-example-with-framer-motion
- tanstack-router-solid-example-with-trpc
@tanstack/arktype-adapter
npm i https://pkg.pr.new/@tanstack/arktype-adapter@8646@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@8646@tanstack/eslint-plugin-start
npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8646@tanstack/history
npm i https://pkg.pr.new/@tanstack/history@8646@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@8646@tanstack/react-router
npm i https://pkg.pr.new/@tanstack/react-router@8646@tanstack/react-router-devtools
npm i https://pkg.pr.new/@tanstack/react-router-devtools@8646@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@8646@tanstack/react-start
npm i https://pkg.pr.new/@tanstack/react-start@8646@tanstack/react-start-client
npm i https://pkg.pr.new/@tanstack/react-start-client@8646@tanstack/react-start-rsc
npm i https://pkg.pr.new/@tanstack/react-start-rsc@8646@tanstack/react-start-server
npm i https://pkg.pr.new/@tanstack/react-start-server@8646@tanstack/router-cli
npm i https://pkg.pr.new/@tanstack/router-cli@8646@tanstack/router-core
npm i https://pkg.pr.new/@tanstack/router-core@8646@tanstack/router-devtools
npm i https://pkg.pr.new/@tanstack/router-devtools@8646@tanstack/router-devtools-core
npm i https://pkg.pr.new/@tanstack/router-devtools-core@8646@tanstack/router-generator
npm i https://pkg.pr.new/@tanstack/router-generator@8646@tanstack/router-plugin
npm i https://pkg.pr.new/@tanstack/router-plugin@8646@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@8646@tanstack/router-utils
npm i https://pkg.pr.new/@tanstack/router-utils@8646@tanstack/router-vite-plugin
npm i https://pkg.pr.new/@tanstack/router-vite-plugin@8646@tanstack/solid-router
npm i https://pkg.pr.new/@tanstack/solid-router@8646@tanstack/solid-router-devtools
npm i https://pkg.pr.new/@tanstack/solid-router-devtools@8646@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@8646@tanstack/solid-start
npm i https://pkg.pr.new/@tanstack/solid-start@8646@tanstack/solid-start-client
npm i https://pkg.pr.new/@tanstack/solid-start-client@8646@tanstack/solid-start-server
npm i https://pkg.pr.new/@tanstack/solid-start-server@8646@tanstack/start-client-core
npm i https://pkg.pr.new/@tanstack/start-client-core@8646@tanstack/start-fn-stubs
npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8646@tanstack/start-plugin-core
npm i https://pkg.pr.new/@tanstack/start-plugin-core@8646@tanstack/start-server-core
npm i https://pkg.pr.new/@tanstack/start-server-core@8646@tanstack/start-static-server-functions
npm i https://pkg.pr.new/@tanstack/start-static-server-functions@8646@tanstack/start-storage-context
npm i https://pkg.pr.new/@tanstack/start-storage-context@8646@tanstack/valibot-adapter
npm i https://pkg.pr.new/@tanstack/valibot-adapter@8646@tanstack/virtual-file-routes
npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8646@tanstack/vue-router
npm i https://pkg.pr.new/@tanstack/vue-router@8646@tanstack/vue-router-devtools
npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8646@tanstack/vue-router-ssr-query
npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8646@tanstack/vue-start
npm i https://pkg.pr.new/@tanstack/vue-start@8646@tanstack/vue-start-client
npm i https://pkg.pr.new/@tanstack/vue-start-client@8646@tanstack/vue-start-server
npm i https://pkg.pr.new/@tanstack/vue-start-server@8646@tanstack/zod-adapter
npm i https://pkg.pr.new/@tanstack/zod-adapter@8646commit:
6209e8dMerging this PR will degrade performance by 3.77%#
:information_source: 99 benchmarks have no flame graph
The flamegraph could not be generated because too much time was spent in runtime internals, making the visualization not useful for performance analysis.
client-search-params navigation loop (solid)ssr rewrite passthrough (solid)client-links navigation loop (solid)ssr assets linked-css control (solid)ssr before-load chain (solid)ssr rewrite localized (solid)ssr global-mw document (solid)ssr assets inline-css cdn (solid)ssr control-flow route headers (solid)ssr not-found (solid)- …and 89 more
:warning: Different runtime environments detected
Some benchmarks with significant performance changes were compared across different runtime environments, which may affect the accuracy of the results.
⚡ 4improved benchmarks❌ 18 (👁 18)regressed benchmarks✅ 172untouched benchmarks⏩ 3skipped benchmarks1Performance Changes#
:information_source: Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
[!TIP] Curious why performance improved? Comment
@codspeedbot explain why performance improvedon this PR, or directly use the CodSpeed MCP with your agent.
Comparingrevert/8643-no-ssr-pending-hydration(6209e8d) withmain(ff9f753)Footnotes#
-
3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
Sheraff(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
View your CI Pipeline Execution ↗ for commit 6209e8d20ffb23a8fc5c6ac6738ac2fffd6a37b2
nx affected --targets=test:eslint,test:unit,tes...nx run-many --target=build --exclude=examples/*...☁️ Nx Cloud last updated this comment at
2026-10-09 19:34:25UTC