Skip to content
Source
Sign inSign up
TanStack/router

fix(solid-router): defer adapter hydration payloads #8105

OpenFnine59(GitHub profile, opens in a new tab)wants to merge 5 commits intosolid-router-v2-pre fromrefs/pull/8105/headopened

Fixes #8104.

Solid's SSR serializer can emit hydration data before the router bootstrap and before hydrate() installs the custom adapter map. Adapter expressions in those eager scripts therefore read $_TSR.t too early.

This change routes a Solid hydration payload through the router's existing buffer once a custom adapter participates in serialization. If the payload arrives before the bootstrap, it creates only an early buffer that the real bootstrap adopts. The complete payload and all later serializer chunks stay in order, so hydrate() installs the adapter map and runs the real fromSerializable function before Solid hydration consumes the value; there is no identity fallback.

Regression coverage exercises both missing-$_TSR and missing-.t timing, payloads that arrive after initialization, preservation of the pre-bootstrap queue, restoration of a Money instance and its method, and the unchanged default serializer path when no adapters are configured.

Reproduction

    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on base/target branches other than the default branch.

      Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: defaults

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 2559323b-d980-42b2-a361-55103b5b2c8c

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      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
      Comment `@coderabbitai help` to get the list of available commands.
    2. brenelz(GitHub profile, opens in a new tab) requested changes

      @@ -16,4 +16,4 @@
      1616 p(script) {
      1717 !this.initialized ? this.buffer.push(script) : script()
      1818 },
      19- buffer: [],
      19+ buffer: self.$_TSR?.buffer || [],
      brenelz(GitHub profile, opens in a new tab)commented

      we can't really make router-core changes on this branch

    3. nx-cloud[bot](GitHub profile, opens in a new tab)commented

      View your CI Pipeline Execution ↗ for commit 583af22c42e27ee46bb37bb66c2fd9538489cff7

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...❌ Failed11m 30sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded2m 14sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-09-17 01:57:56 UTC

    4. More templates

      @tanstack/arktype-adapter

      npm i https://pkg.pr.new/@tanstack/arktype-adapter@8105

      @tanstack/eslint-plugin-router

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@8105

      @tanstack/eslint-plugin-start

      npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@8105

      @tanstack/history

      npm i https://pkg.pr.new/@tanstack/history@8105

      @tanstack/nitro-v2-vite-plugin

      npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@8105

      @tanstack/react-router

      npm i https://pkg.pr.new/@tanstack/react-router@8105

      @tanstack/react-router-devtools

      npm i https://pkg.pr.new/@tanstack/react-router-devtools@8105

      @tanstack/react-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@8105

      @tanstack/react-start

      npm i https://pkg.pr.new/@tanstack/react-start@8105

      @tanstack/react-start-client

      npm i https://pkg.pr.new/@tanstack/react-start-client@8105

      @tanstack/react-start-rsc

      npm i https://pkg.pr.new/@tanstack/react-start-rsc@8105

      @tanstack/react-start-server

      npm i https://pkg.pr.new/@tanstack/react-start-server@8105

      @tanstack/router-cli

      npm i https://pkg.pr.new/@tanstack/router-cli@8105

      @tanstack/router-core

      npm i https://pkg.pr.new/@tanstack/router-core@8105

      @tanstack/router-devtools

      npm i https://pkg.pr.new/@tanstack/router-devtools@8105

      @tanstack/router-devtools-core

      npm i https://pkg.pr.new/@tanstack/router-devtools-core@8105

      @tanstack/router-generator

      npm i https://pkg.pr.new/@tanstack/router-generator@8105

      @tanstack/router-plugin

      npm i https://pkg.pr.new/@tanstack/router-plugin@8105

      @tanstack/router-ssr-query-core

      npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@8105

      @tanstack/router-utils

      npm i https://pkg.pr.new/@tanstack/router-utils@8105

      @tanstack/router-vite-plugin

      npm i https://pkg.pr.new/@tanstack/router-vite-plugin@8105

      @tanstack/solid-router

      npm i https://pkg.pr.new/@tanstack/solid-router@8105

      @tanstack/solid-router-devtools

      npm i https://pkg.pr.new/@tanstack/solid-router-devtools@8105

      @tanstack/solid-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@8105

      @tanstack/solid-start

      npm i https://pkg.pr.new/@tanstack/solid-start@8105

      @tanstack/solid-start-client

      npm i https://pkg.pr.new/@tanstack/solid-start-client@8105

      @tanstack/solid-start-server

      npm i https://pkg.pr.new/@tanstack/solid-start-server@8105

      @tanstack/start-client-core

      npm i https://pkg.pr.new/@tanstack/start-client-core@8105

      @tanstack/start-fn-stubs

      npm i https://pkg.pr.new/@tanstack/start-fn-stubs@8105

      @tanstack/start-plugin-core

      npm i https://pkg.pr.new/@tanstack/start-plugin-core@8105

      @tanstack/start-server-core

      npm i https://pkg.pr.new/@tanstack/start-server-core@8105

      @tanstack/start-static-server-functions

      npm i https://pkg.pr.new/@tanstack/start-static-server-functions@8105

      @tanstack/start-storage-context

      npm i https://pkg.pr.new/@tanstack/start-storage-context@8105

      @tanstack/valibot-adapter

      npm i https://pkg.pr.new/@tanstack/valibot-adapter@8105

      @tanstack/virtual-file-routes

      npm i https://pkg.pr.new/@tanstack/virtual-file-routes@8105

      @tanstack/vue-router

      npm i https://pkg.pr.new/@tanstack/vue-router@8105

      @tanstack/vue-router-devtools

      npm i https://pkg.pr.new/@tanstack/vue-router-devtools@8105

      @tanstack/vue-router-ssr-query

      npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@8105

      @tanstack/vue-start

      npm i https://pkg.pr.new/@tanstack/vue-start@8105

      @tanstack/vue-start-client

      npm i https://pkg.pr.new/@tanstack/vue-start-client@8105

      @tanstack/vue-start-server

      npm i https://pkg.pr.new/@tanstack/vue-start-server@8105

      @tanstack/zod-adapter

      npm i https://pkg.pr.new/@tanstack/zod-adapter@8105

      commit: 583af22

    5. Nx Cloud has identified a flaky task in your failed CI:

      Since the failure was identified as flaky, the solution is to rerun CI. Because this branch comes from a fork, it is not possible for us to push directly, but you can rerun by pushing an empty commit:

      git commit --allow-empty -m "chore: trigger rerun"
      git push

      Nx Cloud 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)
    6. Hooray! CodSpeed harness just leveled up!

      The base and head of this comparison were measured with different runner settings, so their benchmark values are not directly comparable.

      What changed between base and head:

      Re-run the base with the same settings to get a valid performance comparison.


      Comparing Fnine59:fix/tanstack-router-solid-ssr-adapter-8104 (583af22) with solid-router-v2-pre (67a9040)[^unexpected-base] Open in CodSpeed

Sign in to join this conversation.