Skip to content

Preserve typed URL checks with root dynamic routes - #852

Merged
cpojer merged 1 commit into
mainfrom
codex/typed-root-route-urls
Nov 17, 2026
Merged

cpojer merged 1 commit into
mainfrom
codex/typed-root-route-urls

Conversation

@yangshun

@yangshun yangshun commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Background

I encountered this in my own app, where I had a root dynamic route and nothing was being typechecked. Then I realized why.

Issue

Root parameter and catch-all routes currently let every absolute path pass routing.typedRoutes, so /abuot is accepted even when the intended route is /about.

Exclude root /[slug], /[...slug], and /[...] patterns from raw URL types while retaining them in the route maps. URLs handled only by these routes use routeUrl() with checked parameters. Ordinary links and scoped dynamic routes keep their existing syntax. Apply the same contract to generated and package declarations, and document the required URL construction.

Regression coverage includes both route syntaxes, trailing slashes, navigation and stream clients, and links across all four adapters.

Validation

  • CI=true vpr test:all passed: 17,433 tests, with 35 skipped; formatting, lint, package/playground builds, artifact checks, and typechecking passed.
  • vp run build:docs passed.
  • Root-route typechecks passed against freshly installed npm and pnpm packages.
  • Packed-consumer smoke builds reached a separate Cloudflare compatibility failure: the newly resolved @cloudflare/vite-plugin@2.0.0-rc.0 writes build output v1, while @cloudflare/build-output-utils@0.9.14 expects v0. The workspace-locked toolchain passed the full verification above.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://codex-typed-root-route-urls-void-cloud.voidzero-docs.workers.dev (commit 38d644d)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://df3122d2-void-cloud.voidzero-docs.workers.dev 38d644d 2026-11-16T12:51:42.983Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://9b66fcb1-void-cloud.voidzero-docs.workers.dev 1ab0d09 2026-11-16T12:40:11.321Z Visit the dashboard ↗

@yangshun
yangshun force-pushed the codex/typed-root-route-urls branch from 1ab0d09 to 38d644d Compare November 16, 2026 12:50

@cpojer cpojer left a comment

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.

👍

@cpojer
cpojer merged commit 363bf31 into main Nov 17, 2026
17 of 19 checks passed
@cpojer
cpojer deleted the codex/typed-root-route-urls branch November 17, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants