Skip to content

Fix hydration mismatch for ssr='data-only' with pendingComponent#7266

Merged
birkskyum merged 9 commits intomainfrom
copilot/fix-hydration-regression-for-ssr
Apr 26, 2026
Merged

Fix hydration mismatch for ssr='data-only' with pendingComponent#7266
birkskyum merged 9 commits intomainfrom
copilot/fix-hydration-regression-for-ssr

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

Closes #7085

Fixes the Solid Router resolvedNoSsr condition so ssr: 'data-only' routes with a pendingComponent hydrate correctly without duplicating suspense fallback output.

Adds Solid Start selective SSR regression coverage for the data-only pending component hydration case, and shares browser error collection through @tanstack/router-e2e-utils.

@brenelz
Copy link
Copy Markdown
Contributor

brenelz commented Apr 25, 2026

@copilot Lets try gpt 5.5

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Apr 26, 2026

View your CI Pipeline Execution ↗ for commit 3ff8326

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ❌ Failed 5m 20s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 21s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-26 02:49:15 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

🚀 Changeset Version Preview

1 package(s) bumped directly, 3 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/solid-router 1.168.23 → 1.168.24 Changeset
@tanstack/solid-start 1.167.46 → 1.167.47 Dependent
@tanstack/solid-start-client 1.166.40 → 1.166.41 Dependent
@tanstack/solid-start-server 1.166.41 → 1.166.42 Dependent

@brenelz brenelz marked this pull request as ready for review April 26, 2026 00:17
@brenelz brenelz changed the title [WIP] Fix hydration mismatch for ssr='data-only' with pendingComponent Fix hydration mismatch for ssr='data-only' with pendingComponent Apr 26, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 26, 2026

More templates

@tanstack/arktype-adapter

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

@tanstack/eslint-plugin-router

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

@tanstack/eslint-plugin-start

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-rsc

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: e22c3b5

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

Bundle Size Benchmarks

  • Commit: 65874cd48a26
  • Measured at: 2026-04-26T02:44:21.824Z
  • Baseline source: history:aebf4264767a
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 87.35 KiB 0 B (0.00%) 274.60 KiB 75.97 KiB ▅▅▅▅▅▅▅▅▅▅▅
react-router.full 90.77 KiB 0 B (0.00%) 286.11 KiB 78.90 KiB ▅▅▅▅▅▅▅▅▅▅▅
solid-router.minimal 35.58 KiB 0 B (0.00%) 106.86 KiB 31.98 KiB ▁▁▁▁▁▁▁▁███
solid-router.full 40.32 KiB -5 B (-0.01%) 121.07 KiB 36.26 KiB ▁▁▁▁▄▄▄▄▆███
vue-router.minimal 53.30 KiB 0 B (0.00%) 152.01 KiB 47.88 KiB ▅▅▅▅▅▅▅▅▅▅▅
vue-router.full 58.44 KiB 0 B (0.00%) 168.19 KiB 52.34 KiB ▅▅▅▅▅▅▅▅▅▅▅
react-start.minimal 101.92 KiB 0 B (0.00%) 322.77 KiB 88.18 KiB ▅▅▅▅▅▅▅▅▅▅▅
react-start.full 105.35 KiB 0 B (0.00%) 333.10 KiB 91.02 KiB ▅▅▅▅▅▅▅▅▅▅▅
react-start.rsbuild.minimal 101.43 KiB 0 B (0.00%) 325.62 KiB 87.12 KiB ▁████████
react-start.rsbuild.full 104.74 KiB 0 B (0.00%) 336.31 KiB 89.93 KiB ▅▅▅▅▅▅▅▅▅
solid-start.minimal 49.58 KiB +1 B (+0.00%) 152.69 KiB 43.74 KiB ▁▁▁▁▁▁▁▁████
solid-start.full 55.37 KiB +5 B (+0.01%) 169.59 KiB 48.72 KiB ▁▁▁▁▄▄▄▄▅███

Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

Comment on lines +8 to +24
const browserErrors: Array<string> = []

page.on('pageerror', (error) => {
browserErrors.push(error.message)
})

page.on('console', (message) => {
if (message.type() === 'error' || message.type() === 'warning') {
browserErrors.push(message.text())
}
})

page.on('requestfailed', (request) => {
browserErrors.push(
`${request.url()} ${request.failure()?.errorText ?? 'failed'}`,
)
})
Copy link
Copy Markdown
Member

@birkskyum birkskyum Apr 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot do we have all this in a util somewhere ? it seems quite generic

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot resolve this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a shared collectBrowserErrors helper in @tanstack/router-e2e-utils and updated this test to use it. Addressed in 92177e3.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved by the existing 92177e3 follow-up: the generic browser error listener is now collectBrowserErrors in @tanstack/router-e2e-utils, and this spec imports it instead of defining it inline.

@birkskyum
Copy link
Copy Markdown
Member

@copilot what is mre?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 26, 2026

@copilot what is mre?

MRE means “minimal reproducible example” — in this PR it’s the small route added to reproduce the hydration mismatch.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.nx.app
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run @tanstack/router-e2e-utils:test:eslint --outputStyle=stream --skipRemoteCache (dns block)
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run tanstack-solid-start-e2e-selective-ssr:test:e2e --outputStyle=stream --skipRemoteCache (dns block)
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run tanstack-solid-start-e2e-selective-ssr:test:e2e --outputStyle=stream --skipRemoteCache -- tests/pending-component-hydration.spec.ts (dns block)
  • sparrow.cloudflare.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --no-warnings --experimental-vm-modules /home/REDACTED/work/router/router/node_modules/.pnpm/wrangler@4.75.0/node_modules/wrangler/wrangler-dist/cli.js types (dns block)
  • www.google-analytics.com
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js show project tanstack-solid-start-e2e-selective-ssr --json (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/router/router/node_modules/.pnpm/nx@22.6.5_@swc-node&#43;register@1.11.1_@emnapi&#43;core@1.10.0_@emnapi&#43;runtime@1.10.0_@swc&#43;cor_f8cf112faadbfcc2e1461352f7817c81/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin5357-2-363.557867.sock /home/REDACTED/work/router/router/node_modules/.pnpm/nx@22.6.5_@swc-node&#43;register@1.11.1_@emnapi&#43;core@1.10.0_@emnapi&#43;runtime@1.10.0_@swc&#43;cor_f8cf112faadbfcc2e1461352f7817c81/node_modules/nx/src/plugins/project-json/build-nodes/project-json (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/router/router/node_modules/.pnpm/nx@22.6.5_@swc-node&#43;register@1.11.1_@emnapi&#43;core@1.10.0_@emnapi&#43;runtime@1.10.0_@swc&#43;cor_f8cf112faadbfcc2e1461352f7817c81/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin5357-3-370.280252.sock ./scripts/nx/playwright-plugin.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Agent-Logs-Url: https://github.com/TanStack/router/sessions/aae41f53-16ad-426b-a9bb-36e4d8c9ffcf

Co-authored-by: birkskyum <74932975+birkskyum@users.noreply.github.com>
@birkskyum
Copy link
Copy Markdown
Member

@copilot rename the route from "routes/mre-data-only.tsx" to something more descriptive (don't include MRE, because all routes are practively mre's)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 26, 2026

Merging this PR will not alter performance

✅ 5 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing copilot/fix-hydration-regression-for-ssr (3ff8326) with main (aebf426)2

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

  2. No successful run was found on main (65874cd) during the generation of this report, so aebf426 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Agent-Logs-Url: https://github.com/TanStack/router/sessions/0a1fcc3c-48db-4f47-b20b-72dee8d1ff44

Co-authored-by: birkskyum <74932975+birkskyum@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 26, 2026

@copilot rename the route from "routes/mre-data-only.tsx" to something more descriptive (don't include MRE, because all routes are practively mre's)

Renamed the route to data-only-pending-component and updated the test plus generated route tree in c2c2641. No UI changed here, so there isn’t a meaningful screenshot to attach.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cloud.nx.app
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run tanstack-solid-start-e2e-selective-ssr:build --outputStyle=stream --skipRemoteCache (dns block)
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run tanstack-solid-start-e2e-selective-ssr:test:e2e --outputStyle=stream --skipRemoteCache -- tests/pending-component-hydration.spec.ts tart-e2e-selectinode ream e git conf�� --local pull.rebase in/sh (dns block)
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run tanstack-solid-start-e2e-selective-ssr:test:e2e --outputStyle=stream --skipRemoteCache -- tests/pending-component-hydration.spec.ts (dns block)
  • sparrow.cloudflare.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --no-warnings --experimental-vm-modules /home/REDACTED/work/router/router/node_modules/.pnpm/wrangler@4.75.0/node_modules/wrangler/wrangler-dist/cli.js types (dns block)
  • www.google-analytics.com
    • Triggering command: /usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run tanstack-solid-start-e2e-selective-ssr:build --outputStyle=stream --skipRemoteCache (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/router/router/node_modules/.pnpm/nx@22.6.5_@swc-node&#43;register@1.11.1_@emnapi&#43;core@1.10.0_@emnapi&#43;runtime@1.10.0_@swc&#43;cor_f8cf112faadbfcc2e1461352f7817c81/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin4333-2-362.046595.sock /home/REDACTED/work/router/router/node_modules/.pnpm/nx@22.6.5_@swc-node&#43;register@1.11.1_@emnapi&#43;core@1.10.0_@emnapi&#43;runtime@1.10.0_@swc&#43;cor_f8cf112faadbfcc2e1461352f7817c81/node_modules/nx/src/plugins/project-json/build-nodes/project-json (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/router/router/node_modules/.pnpm/nx@22.6.5_@swc-node&#43;register@1.11.1_@emnapi&#43;core@1.10.0_@emnapi&#43;runtime@1.10.0_@swc&#43;cor_f8cf112faadbfcc2e1461352f7817c81/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin4333-3-366.705703.sock ./scripts/nx/playwright-plugin.ts (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

@birkskyum birkskyum merged commit 944b155 into main Apr 26, 2026
12 of 13 checks passed
@birkskyum birkskyum deleted the copilot/fix-hydration-regression-for-ssr branch April 26, 2026 02:43
Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Solid: ssr='data-only' + pendingComponent element causes hydration mismatch / template is not a function

3 participants