Skip to content
Source
Sign inSign up
TanStack/router

fix(start): align server function transport behavior #8573

Mergedtannerlinsleymerged 1 commit intomain fromrefs/pull/8573/headmerged by tannerlinsley

tannerlinsleycommented

Align server function request and response handling across the client transport, server handler, and SSR path. Includes a patch changeset for @tanstack/router-core and @tanstack/start-server-core.

Validation: pnpm test:eslint, pnpm test:types, and pnpm test:unit passed locally.

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

      Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

      Note

      Currently processing new changes in this PR. This may take a few minutes, please wait...

      ⚙️ Run configuration

      Configuration used: Repository: TanStack/router/.coderabbit.yaml

      Review profile: CHILL

      Plan: Advanced

      Run ID: afdfdcc0-3529-4cf6-8f08-5d74b477de41

      📥 Commits

      Reviewing files that changed from the base of the PR and between 614bc27034c8ec98747bf305ed41d4a619640949 and 22df5c6c149f3db0d06e8b7476b66d605bc7e58a.

      📒 Files selected for processing (6)
      • .changeset/quiet-apes-protect.md
      • packages/router-core/src/ssr/handlerCallback.ts
      • packages/start-client-core/src/createServerFn.ts
      • packages/start-server-core/src/request-response.ts
      • packages/start-server-core/src/serializer/ServerFunctionSerializationAdapter.ts
      • packages/start-server-core/src/server-functions-handler.ts
       ____________________________________________________________________________________________________________________________________
      < Put abstractions in code, details in metadata. Program for the general case, and put the specifics outside the compiled code base. >
       ------------------------------------------------------------------------------------------------------------------------------------
        \
         \   (\__/)
             (•ㅅ•)
             /   づ
      ✨ Finishing Touches
      📝 Generate docstrings
      • Commit to this branch
      • Create a new PR
      🧪 Generate unit tests (beta)
      • Commit to this branch
      • Create a new PR
      • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Autopilot is currently an internal CodeRabbit preview.


      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. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: router-core

    3. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-server-core

    4. github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: start-client-core

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

      View your CI Pipeline Execution ↗ for commit 22df5c6c149f3db0d06e8b7476b66d605bc7e58a

      CommandStatusDurationResult
      nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded11m 14sView ↗
      nx run-many --target=build --exclude=examples/*...✅ Succeeded1m 54sView ↗

      ☁️ Nx Cloud last updated this comment at 2026-09-30 17:22:18 UTC

    6. 🚀 Changeset Version Preview

      5 package(s) bumped directly, 18 bumped as dependents.

      🟩 Patch bumps

      PackageVersionReason
      @tanstack/react-router1.170.40 → 1.170.41Changeset
      @tanstack/router-core1.171.33 → 1.171.34Changeset
      @tanstack/start-plugin-core1.171.48 → 1.171.49Changeset
      @tanstack/start-server-core1.169.38 → 1.169.39Changeset
      @tanstack/vue-router1.170.36 → 1.170.37Changeset
      @tanstack/react-start1.168.59 → 1.168.60Dependent
      @tanstack/react-start-client1.168.38 → 1.168.39Dependent
      @tanstack/react-start-rsc0.1.58 → 0.1.59Dependent
      @tanstack/react-start-server1.167.45 → 1.167.46Dependent
      @tanstack/router-cli1.167.39 → 1.167.40Dependent
      @tanstack/router-generator1.167.39 → 1.167.40Dependent
      @tanstack/router-plugin1.168.41 → 1.168.42Dependent
      @tanstack/router-vite-plugin1.167.41 → 1.167.42Dependent
      @tanstack/solid-router1.170.37 → 1.170.38Dependent
      @tanstack/solid-start1.168.56 → 1.168.57Dependent
      @tanstack/solid-start-client1.168.36 → 1.168.37Dependent
      @tanstack/solid-start-server1.167.43 → 1.167.44Dependent
      @tanstack/start-client-core1.170.33 → 1.170.34Dependent
      @tanstack/start-static-server-functions1.167.38 → 1.167.39Dependent
      @tanstack/start-storage-context1.167.35 → 1.167.36Dependent
      @tanstack/vue-start1.168.55 → 1.168.56Dependent
      @tanstack/vue-start-client1.167.39 → 1.167.40Dependent
      @tanstack/vue-start-server1.167.43 → 1.167.44Dependent
    7. Bundle Size Benchmarks

      • Commit: a52aec9cb56e
      • Measured at: 2026-09-30T17:11:47.188Z
      • Baseline source: history:614bc27034c8
      • Dashboard: bundle-size history

      The following scenarios have bundle-size changes compared with the baseline:

      ScenarioCurrent (gzip)Initial (gzip)RawBrotliTrend
      react-start.full99.9&nbsp;KiB
      +14&nbsp;B
      99.8&nbsp;KiB
      +14&nbsp;B
      312.1&nbsp;KiB
      +33&nbsp;B
      86.8&nbsp;KiB
      +119&nbsp;B
      ▁▁▁▇██▇█████
      react-start.rsbuild.full103.6&nbsp;KiB
      +13&nbsp;B
      103.4&nbsp;KiB
      +13&nbsp;B
      323.5&nbsp;KiB
      +33&nbsp;B
      89.4&nbsp;KiB
      -11&nbsp;B
      ▁▁▁█████████
      solid-start.full51.5&nbsp;KiB
      +17&nbsp;B
      51.3&nbsp;KiB
      +15&nbsp;B
      151.2&nbsp;KiB
      +33&nbsp;B
      45.7&nbsp;KiB
      +89&nbsp;B
      ▁▁▁█████████
      vue-start.full69.3&nbsp;KiB
      +13&nbsp;B
      69.2&nbsp;KiB
      +13&nbsp;B
      198.6&nbsp;KiB
      +33&nbsp;B
      61.7&nbsp;KiB
      +3&nbsp;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.

    8. More templates

      @tanstack/arktype-adapter

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

      @tanstack/eslint-plugin-router

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

      @tanstack/eslint-plugin-start

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

      @tanstack/history

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

      @tanstack/nitro-v2-vite-plugin

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

      @tanstack/react-router

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

      @tanstack/react-router-devtools

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

      @tanstack/react-router-ssr-query

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

      @tanstack/react-start

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

      @tanstack/react-start-client

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

      @tanstack/react-start-rsc

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

      @tanstack/react-start-server

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

      @tanstack/router-cli

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

      @tanstack/router-core

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

      @tanstack/router-devtools

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

      @tanstack/router-devtools-core

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

      @tanstack/router-generator

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

      @tanstack/router-plugin

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

      @tanstack/router-ssr-query-core

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

      @tanstack/router-utils

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

      @tanstack/router-vite-plugin

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

      @tanstack/solid-router

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

      @tanstack/solid-router-devtools

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

      @tanstack/solid-router-ssr-query

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

      @tanstack/solid-start

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

      @tanstack/solid-start-client

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

      @tanstack/solid-start-server

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

      @tanstack/start-client-core

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

      @tanstack/start-fn-stubs

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

      @tanstack/start-plugin-core

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

      @tanstack/start-server-core

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

      @tanstack/start-static-server-functions

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

      @tanstack/start-storage-context

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

      @tanstack/valibot-adapter

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

      @tanstack/virtual-file-routes

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

      @tanstack/vue-router

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

      @tanstack/vue-router-devtools

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

      @tanstack/vue-router-ssr-query

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

      @tanstack/vue-start

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

      @tanstack/vue-start-client

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

      @tanstack/vue-start-server

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

      @tanstack/zod-adapter

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

      commit: 22df5c6

    9. Merging this PR will degrade performance by 45.5%

      ❌ 1 regressed benchmark ✅ 190 untouched benchmarks ⏩ 3 skipped benchmarks1

      Warning

      Please fix the performance issues or acknowledge them on CodSpeed.

      Performance Changes

      ModeBenchmarkBASEHEADEfficiency
      ❌Memorymem server streaming-peak chunked (react)349.8 KB641.9 KB-45.5%

      Tip

      Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


      Comparing fix/start-function-transport (22df5c6) with main (614bc27) Open in CodSpeed

      Footnotes

      1. 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. ↩

    10. tannerlinsley merged thisd521abd

    11. tannerlinsley closed this

Sign in to join this conversation.