fix Paraglide Start scaffold integration - #503
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe Paraglide add-on now generates localized TanStack Router rewrites and a server entry that applies request-scoped middleware. An integration test verifies the generated files, and a patch changeset documents the update. ChangesParaglide integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to This PR adds the missing locale URL rewrites and server middleware to generated Paraglide TanStack Start projects; no actionable merge-blocking risk remains after the reported validation. Sequence Diagram(s)sequenceDiagram
participant Request
participant GeneratedServer
participant ParaglideMiddleware
participant TanStackHandler
participant Router
Request->>GeneratedServer: fetch(req)
GeneratedServer->>ParaglideMiddleware: wrap request
ParaglideMiddleware->>TanStackHandler: invoke handler.fetch
TanStackHandler->>Router: process URL
Router->>Router: deLocalizeUrl input
Router->>Router: localizeUrl output
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
What changed
paraglideMiddlewareWhy
The Paraglide add-on generated locale-switching UI, but omitted the URL rewrite and server middleware shown in the official TanStack i18n setup. A switch to German navigated to
/de, which the router treated as an unmatched route, while SSR continued rendering the fallback locale. The resulting server/client disagreement caused not-found warnings and hydration failures on every locale switch.Related: opral/paraglide-js#739
Validation
@tanstack/create, and 7 files / 101 tests in@tanstack/clisrc/router.tsxandsrc/server.tsSummary by CodeRabbit
New Features
Tests