-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(solid-router-ssr-query): allow redirect inside server function ssr #5668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds 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
Sequence DiagramsequenceDiagram
participant Browser
participant Router
participant Match as Match (old)
participant Match2 as Match (new)
participant NotFound
Browser->>Router: Navigate to route with server redirect
rect rgb(200, 220, 255)
Note over Match: Old Flow
Router->>Match: Render Outlet
match->>Match: Check next child match
alt Match found
Match->>Match: Render child
else No match (redirected)
Match->>NotFound: Invariant fails!<br/>"Could not find match"
end
end
rect rgb(200, 255, 220)
Note over Match2: New Flow
Router->>Match2: Render Outlet (during redirect)
Match2->>Match2: Get childMatchStatus
Match2->>Match2: Derive shouldShowNotFound<br/>(check redirected state)
alt Match exists & not redirected
Match2->>Match2: Render child route
else Redirected or no match
Match2->>Match2: Skip not-found rendering,<br/>await redirect
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
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. Comment |
|
View your CI Pipeline Execution ↗ for commit 4d70237
☁️ Nx Cloud last updated this comment at |
More templates
@tanstack/arktype-adapter
@tanstack/directive-functions-plugin
@tanstack/eslint-plugin-router
@tanstack/history
@tanstack/nitro-v2-vite-plugin
@tanstack/react-router
@tanstack/react-router-devtools
@tanstack/react-router-ssr-query
@tanstack/react-start
@tanstack/react-start-client
@tanstack/react-start-server
@tanstack/router-cli
@tanstack/router-core
@tanstack/router-devtools
@tanstack/router-devtools-core
@tanstack/router-generator
@tanstack/router-plugin
@tanstack/router-ssr-query-core
@tanstack/router-utils
@tanstack/router-vite-plugin
@tanstack/server-functions-plugin
@tanstack/solid-router
@tanstack/solid-router-devtools
@tanstack/solid-router-ssr-query
@tanstack/solid-start
@tanstack/solid-start-client
@tanstack/solid-start-server
@tanstack/start-client-core
@tanstack/start-plugin-core
@tanstack/start-server-core
@tanstack/start-static-server-functions
@tanstack/start-storage-context
@tanstack/valibot-adapter
@tanstack/virtual-file-routes
@tanstack/zod-adapter
commit: |
c404021 to
5646ed3
Compare
5646ed3 to
4bbe13c
Compare
closes #5620
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores