fix(solid-router-ssr-query): allow redirect inside server function ssr #5668
Merged
birkskyum(GitHub profile, opens in a new tab)merged 7 commits into
main fromrefs/pull/5668/head·merged by birkskyum(GitHub profile, opens in a new tab) closes https://github.com/TanStack/router/issues/5620
Summary by CodeRabbit#
New Features
- Added server-side rendering (SSR) support for redirect testing in React Router and Solid Start examples.
Bug Fixes
- Improved not-found route rendering logic in Solid Router's Match component for better redirect state handling.
Tests
- Added e2e tests validating server function redirects during SSR with query integration.
Chores
- Updated @tanstack/solid-query dependency to v5.90.9 across multiple packages.
- 1
View your CI Pipeline Execution ↗ for commit 4d70237de11ee5ad54b34f135d105c9ccdb280f5
Command Status Duration Result nx affected --targets=test:eslint,test:unit,tes...✅ Succeeded 8m 39s View ↗ nx run-many --target=build --exclude=examples/*...✅ Succeeded 30s View ↗
☁️ Nx Cloud last updated this comment at
2025-11-03 16:19:55UTCMore templates
- tanstack-router-solid-example-basic
- 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-streaming-file-based
- 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-quickstart-file-based
- tanstack-solid-start-example-bare
- tanstack-solid-start-example-basic
- tanstack-solid-start-example-basic-auth
- 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-example-basic-supabase
- 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-start-example-basic-cloudflare
- tanstack-start-example-basic-react-query
- 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-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/arktype-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/arktype-adapter@5668@tanstack/directive-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/directive-functions-plugin@5668@tanstack/eslint-plugin-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/eslint-plugin-router@5668@tanstack/history
npm i https://pkg.pr.new/TanStack/router/@tanstack/history@5668@tanstack/nitro-v2-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/nitro-v2-vite-plugin@5668@tanstack/react-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router@5668@tanstack/react-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-devtools@5668@tanstack/react-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-router-ssr-query@5668@tanstack/react-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start@5668@tanstack/react-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-client@5668@tanstack/react-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/react-start-server@5668@tanstack/router-cli
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-cli@5668@tanstack/router-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-core@5668@tanstack/router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools@5668@tanstack/router-devtools-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-devtools-core@5668@tanstack/router-generator
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-generator@5668@tanstack/router-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-plugin@5668@tanstack/router-ssr-query-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-ssr-query-core@5668@tanstack/router-utils
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-utils@5668@tanstack/router-vite-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/router-vite-plugin@5668@tanstack/server-functions-plugin
npm i https://pkg.pr.new/TanStack/router/@tanstack/server-functions-plugin@5668@tanstack/solid-router
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router@5668@tanstack/solid-router-devtools
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-devtools@5668@tanstack/solid-router-ssr-query
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-router-ssr-query@5668@tanstack/solid-start
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start@5668@tanstack/solid-start-client
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-client@5668@tanstack/solid-start-server
npm i https://pkg.pr.new/TanStack/router/@tanstack/solid-start-server@5668@tanstack/start-client-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-client-core@5668@tanstack/start-plugin-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-plugin-core@5668@tanstack/start-server-core
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-server-core@5668@tanstack/start-static-server-functions
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-static-server-functions@5668@tanstack/start-storage-context
npm i https://pkg.pr.new/TanStack/router/@tanstack/start-storage-context@5668@tanstack/valibot-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/valibot-adapter@5668@tanstack/virtual-file-routes
npm i https://pkg.pr.new/TanStack/router/@tanstack/virtual-file-routes@5668@tanstack/zod-adapter
npm i https://pkg.pr.new/TanStack/router/@tanstack/zod-adapter@5668commit:
4d70237birkskyum(GitHub profile, opens in a new tab) changed the title
github-actions[bot](GitHub profile, opens in a new tab) added labelspackage: solid-router
birkskyum(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Caution
Review failed#
The pull request is closed.
Walkthrough#
Adds server-function-triggered SSR redirect test routes for React and Solid Start frameworks, updates TanStack Solid Query dependency versions across multiple e2e and example packages, and modifies Solid Router's Match component to handle not-found rendering during redirected states.
Changes#
e2e/react-start/server-functions/src/routes/redirect-test-ssr/index.tsx,e2e/react-start/server-functions/src/routes/redirect-test-ssr/target.tsxe2e/react-start/server-functions/src/routeTree.gen.ts,e2e/react-start/server-functions/tests/server-functions.spec.tse2e/solid-start/server-functions/src/routes/redirect-test-ssr/index.tsx,e2e/solid-start/server-functions/src/routes/redirect-test-ssr/target.tsxe2e/solid-start/server-functions/src/routeTree.gen.ts,e2e/solid-start/server-functions/tests/server-functions.spec.tse2e/solid-router/basic-solid-query-file-based/package.json,e2e/solid-router/basic-solid-query/package.json,e2e/solid-start/basic-solid-query/package.json,e2e/solid-start/query-integration/package.json,e2e/solid-start/server-functions/package.json,e2e/solid-start/server-routes/package.json,examples/solid/basic-solid-query-file-based/package.json,examples/solid/basic-solid-query/package.json,examples/solid/start-basic-solid-query/package.jsonpackages/solid-router/src/Match.tsxSequence Diagram#
Estimated code review effort#
🎯 3 (Moderate) | ⏱️ ~20 minutes
packages/solid-router/src/Match.tsx: Complex control-flow restructuring involving reactive signal derivation and conditional branching; verify that not-found state is correctly gated during redirects and that suspense/root-route logic remains sound.routeTree.gen.ts): Ensure auto-generated route metadata is consistent across React and Solid frameworks and correctly links parent/child relationships.Possibly related PRs#
packages/solid-router/src/Match.tsxto handle route matching/outlet rendering; related control-flow refactoring.Suggested reviewers#
Poem#
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 19ae7621b207cf5f5ee087ac6a0cca00d173786a and 4d70237de11ee5ad54b34f135d105c9ccdb280f5.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml📒 Files selected for processing (18)
e2e/react-start/server-functions/src/routeTree.gen.ts(13 hunks)e2e/react-start/server-functions/src/routes/redirect-test-ssr/index.tsx(1 hunks)e2e/react-start/server-functions/src/routes/redirect-test-ssr/target.tsx(1 hunks)e2e/react-start/server-functions/tests/server-functions.spec.ts(1 hunks)e2e/solid-router/basic-solid-query-file-based/package.json(1 hunks)e2e/solid-router/basic-solid-query/package.json(1 hunks)e2e/solid-start/basic-solid-query/package.json(1 hunks)e2e/solid-start/query-integration/package.json(1 hunks)e2e/solid-start/server-functions/package.json(1 hunks)e2e/solid-start/server-functions/src/routeTree.gen.ts(13 hunks)e2e/solid-start/server-functions/src/routes/redirect-test-ssr/index.tsx(1 hunks)e2e/solid-start/server-functions/src/routes/redirect-test-ssr/target.tsx(1 hunks)e2e/solid-start/server-functions/tests/server-functions.spec.ts(1 hunks)e2e/solid-start/server-routes/package.json(1 hunks)examples/solid/basic-solid-query-file-based/package.json(1 hunks)examples/solid/basic-solid-query/package.json(1 hunks)examples/solid/start-basic-solid-query/package.json(1 hunks)packages/solid-router/src/Match.tsx(1 hunks)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