Skip to content

fix Paraglide Start scaffold integration - #503

Open
samuelstroschein wants to merge 1 commit into
TanStack:mainfrom
samuelstroschein:codex/fix-paraglide-start-integration
Open

fix Paraglide Start scaffold integration#503
samuelstroschein wants to merge 1 commit into
TanStack:mainfrom
samuelstroschein:codex/fix-paraglide-start-integration

Conversation

@samuelstroschein

@samuelstroschein samuelstroschein commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Disclaimer: This PR has been created with GTP 5.6 Sol after investigating opral/paraglide-js#739.

What changed

  • generate TanStack Router URL rewrites when the Paraglide add-on is selected
  • generate a TanStack Start server entry wrapped in paraglideMiddleware
  • add regression coverage for both integration points and a patch changeset

Why

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

  • repository pre-commit hook: all 10 project builds passed
  • unit suites: 32 files / 251 tests in @tanstack/create, and 7 files / 101 tests in @tanstack/cli
  • blocking Playwright suite: 7 tests passed
  • generated a local React + Paraglide scaffold and verified src/router.tsx and src/server.ts

Summary by CodeRabbit

  • New Features

    • Added Paraglide localization support for TanStack Router URL rewrites.
    • Added request-scoped server middleware to localize incoming and outgoing requests.
    • Generated applications now support localized routing with server-side rendering.
  • Tests

    • Added coverage verifying localized router and server middleware generation.
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 683b0a4e-0afd-4058-bf83-68d3e26195c1

📥 Commits

Reviewing files that changed from the base of the PR and between 3f38875 and 4b15b47.

📒 Files selected for processing (4)
  • .changeset/fuzzy-ravens-route.md
  • packages/create/src/frameworks/react/add-ons/paraglide/assets/src/server.ts.ejs
  • packages/create/src/frameworks/react/project/base/src/router.tsx.ejs
  • packages/create/tests/paraglide-addon.test.ts

📝 Walkthrough

Walkthrough

The 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.

Changes

Paraglide integration

Layer / File(s) Summary
Generated routing and server runtime
packages/create/src/frameworks/react/project/base/src/router.tsx.ejs, packages/create/src/frameworks/react/add-ons/paraglide/assets/src/server.ts.ejs
Paraglide-enabled routers import URL localization helpers and rewrite incoming and outgoing URLs. The generated server entry applies paraglideMiddleware before calling the TanStack handler.
Integration validation and release metadata
packages/create/tests/paraglide-addon.test.ts, .changeset/fuzzy-ravens-route.md
The integration test verifies generated routing and server middleware wiring. The changeset records a patch release for @tanstack/create.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Mergeability Score: ⚪ Minimal · up to 4b15b

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
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing Paraglide integration in TanStack Start scaffolds.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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

Labels

None yet

1 participant