fix(start): release cancelled hydration replay events #8268
main fromfix/start-hydration-replay-cleanup·opened 🎯 Changes#
Queued interaction events keep removed DOM nodes alive when a deferred hydration boundary unmounts before hydration completes. Clear those queues when the final gate consumer is released in React and Solid, including nested markers whose gates have not mounted yet. Successful hydration still replays queued events.
✅ 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).
Summary by CodeRabbit#
Bug Fixes
- Fixed deferred hydration interactions so queued events are released correctly when boundaries are hidden or unmounted.
- Prevented stale interactions from replaying after a boundary is removed.
- Ensured shared and nested hydration boundaries retain or clear queued interactions appropriately.
Tests
- Expanded React and Solid end-to-end coverage for aborted and unmounted deferred hydration boundaries.
- Added coverage for interaction replay and cleanup scenarios.
- Improved navigation and shared widget styling verification.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: react-start-client
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-start-client
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-client-core
View your CI Pipeline Execution ↗ for commit feb19063a95051f807182d0506b32d1bfd56f1e2
Command Status Duration Result nx run-many --target=build --exclude=examples/*...✅ Succeeded 1m 46s View ↗
☁️ Nx Cloud last updated this comment at
2026-10-24 22:01:05UTC🚀 Changeset Version Preview#
3 package(s) bumped directly, 11 bumped as dependents.
🟩 Patch bumps#
Package Version Reason @tanstack/react-start-client1.168.44 → 1.168.45 Changeset @tanstack/solid-start-client1.168.42 → 1.168.43 Changeset @tanstack/start-client-core1.170.39 → 1.170.40 Changeset @tanstack/react-start1.169.4 → 1.169.5 Dependent @tanstack/react-start-rsc0.1.65 → 0.1.66 Dependent @tanstack/react-start-server1.167.52 → 1.167.53 Dependent @tanstack/solid-start1.169.4 → 1.169.5 Dependent @tanstack/solid-start-server1.167.50 → 1.167.51 Dependent @tanstack/start-plugin-core1.171.55 → 1.171.56 Dependent @tanstack/start-server-core1.169.45 → 1.169.46 Dependent @tanstack/start-static-server-functions1.167.44 → 1.167.45 Dependent @tanstack/vue-start1.169.4 → 1.169.5 Dependent @tanstack/vue-start-client1.167.45 → 1.167.46 Dependent @tanstack/vue-start-server1.167.50 → 1.167.51 Dependent Bundle Size Benchmarks#
- Commit:
6b5ac8bb5741 - Measured at:
2026-10-24T21:57:35.044Z - Baseline source:
history:6b9fe6d29552 - Dashboard: bundle-size history
The following scenarios have bundle-size changes compared with the baseline:
Scenario Current (gzip) Initial (gzip) Raw Brotli Trend solid-start.deferred-hydration49.2 KiB
+26 B46.1 KiB
-2 B142.4 KiB
+62 B43.9 KiB
+19 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@8268@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@8268@tanstack/eslint-plugin-start
npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8268@tanstack/history
npm i https://pkg.pr.new/@tanstack/history@8268@tanstack/react-router
npm i https://pkg.pr.new/@tanstack/react-router@8268@tanstack/react-router-devtools
npm i https://pkg.pr.new/@tanstack/react-router-devtools@8268@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@8268@tanstack/react-start
npm i https://pkg.pr.new/@tanstack/react-start@8268@tanstack/react-start-client
npm i https://pkg.pr.new/@tanstack/react-start-client@8268@tanstack/react-start-rsc
npm i https://pkg.pr.new/@tanstack/react-start-rsc@8268@tanstack/react-start-server
npm i https://pkg.pr.new/@tanstack/react-start-server@8268@tanstack/router-cli
npm i https://pkg.pr.new/@tanstack/router-cli@8268@tanstack/router-core
npm i https://pkg.pr.new/@tanstack/router-core@8268@tanstack/router-devtools
npm i https://pkg.pr.new/@tanstack/router-devtools@8268@tanstack/router-devtools-core
npm i https://pkg.pr.new/@tanstack/router-devtools-core@8268@tanstack/router-generator
npm i https://pkg.pr.new/@tanstack/router-generator@8268@tanstack/router-plugin
npm i https://pkg.pr.new/@tanstack/router-plugin@8268@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@8268@tanstack/router-utils
npm i https://pkg.pr.new/@tanstack/router-utils@8268@tanstack/router-vite-plugin
npm i https://pkg.pr.new/@tanstack/router-vite-plugin@8268@tanstack/solid-router
npm i https://pkg.pr.new/@tanstack/solid-router@8268@tanstack/solid-router-devtools
npm i https://pkg.pr.new/@tanstack/solid-router-devtools@8268@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@8268@tanstack/solid-start
npm i https://pkg.pr.new/@tanstack/solid-start@8268@tanstack/solid-start-client
npm i https://pkg.pr.new/@tanstack/solid-start-client@8268@tanstack/solid-start-server
npm i https://pkg.pr.new/@tanstack/solid-start-server@8268@tanstack/start-client-core
npm i https://pkg.pr.new/@tanstack/start-client-core@8268@tanstack/start-fn-stubs
npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8268@tanstack/start-plugin-core
npm i https://pkg.pr.new/@tanstack/start-plugin-core@8268@tanstack/start-server-core
npm i https://pkg.pr.new/@tanstack/start-server-core@8268@tanstack/start-static-server-functions
npm i https://pkg.pr.new/@tanstack/start-static-server-functions@8268@tanstack/start-storage-context
npm i https://pkg.pr.new/@tanstack/start-storage-context@8268@tanstack/valibot-adapter
npm i https://pkg.pr.new/@tanstack/valibot-adapter@8268@tanstack/virtual-file-routes
npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8268@tanstack/vue-router
npm i https://pkg.pr.new/@tanstack/vue-router@8268@tanstack/vue-router-devtools
npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8268@tanstack/vue-router-ssr-query
npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8268@tanstack/vue-start
npm i https://pkg.pr.new/@tanstack/vue-start@8268@tanstack/vue-start-client
npm i https://pkg.pr.new/@tanstack/vue-start-client@8268@tanstack/vue-start-server
npm i https://pkg.pr.new/@tanstack/vue-start-server@8268@tanstack/zod-adapter
npm i https://pkg.pr.new/@tanstack/zod-adapter@8268commit:
feb1906Merging this PR will not alter performance#
1 warning, 1 note
:warning: 36 benchmarks are dominated by system calls
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
:information_source: 20 benchmarks have no flamegraph
The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.
✅ 194untouched benchmarks⏩ 3skipped benchmarks1
Comparingfix/start-hydration-replay-cleanup(feb1906) withmain(6b9fe6d)[^unexpected-base]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. ↩
-
Nx Cloud has identified a flaky task in your failed CI:#
🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.
View detailed reasoning in Nx Cloud ↗
🎓 Learn more about Self-Healing CI on [nx.dev](https://nx.dev/docs/features/ci-features/self-healing-ci?utm_source=pull-request&utm_medium=comment)
Sign in to join this conversation.
Note
Reviews paused#
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
af689716-e502-4297-8289-0423746132ca📥 Commits
Reviewing files that changed from the base of the PR and between f600d91caa023022b058a8130fd95d95b9c97822 and 3090b12ca694bd0af7d2ba9a0979144b69743315.
📒 Files selected for processing (1)
packages/start-client-core/src/hydration/runtime.ts🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
Deferred hydration gate release now clears queued interaction replay events for released gates and nested hydration markers. React and Solid cleanup pass marker elements to the runtime. Unit and end-to-end tests cover replay, abort, and navigation behavior.
Changes: Deferred hydration replay cleanup
packages/start-client-core/src/hydration/replay.ts,packages/start-client-core/src/hydration/interaction.ts,packages/start-client-core/src/hydration/runtime.tspackages/react-start-client/src/GenericHydrate.tsx,packages/solid-start-client/src/GenericHydrate.tsxreleaseGateduring hydration cleanup.packages/start-client-core/tests/hydration-interaction.test.ts,e2e/react-start/deferred-hydration/tests/hydration.spec.ts,e2e/solid-start/deferred-hydration/tests/hydration.spec.ts,e2e/solid-start/start-manifest/tests/start-manifest.spec.ts,.changeset/fair-dryers-think.mdEstimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Merge Risk:
Minimal · up to
3090bNo actionable merge-blocking risk remains from the reviewed change.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
🧪 Generate unit tests (beta)
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.
❤️ Share