Skip to content

fix(pages-router): normalize repeated URL slashes - #3367

Open
james-elicx wants to merge 1 commit into
codex/fix-pages-object-asfrom
codex/pages-router-url-normalization
Open

james-elicx wants to merge 1 commit into
codex/fix-pages-object-asfrom
codex/pages-router-url-normalization

Conversation

@james-elicx

@james-elicx james-elicx commented Sep 22, 2026

Copy link
Copy Markdown
Member

Depends on #3354.

Scope

Repeated-slash/backslash normalization at public Pages Router and Link inputs, plus relative Link target resolution. This removes the older Link-local normalization scaffolding.

Changes

  • Share one Next.js-compatible public-input normalizer between Link and router methods.
  • Resolve relative string and object Link href/as against the current route and visible URL; normalized hash-only strings retain the visible rewritten path and search.
  • Normalize hidden href and displayed as independently while preserving query/hash-only object identity.
  • Leave internally generated middleware/HTML redirect URLs outside public-input normalization.

Next.js references

Validation

The revised stack passed 1,774 focused unit/integration tests, an isolated Pages Router browser navigation check, vp check, package build, Next.js type sync, and public shim-type checks. Exact-head CI and Big Bonk re-review are running; this PR remains draft until both are clean.

@james-elicx

Copy link
Copy Markdown
Member Author

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@pkg-pr-new

pkg-pr-new Bot commented Sep 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

@vinext/cloudflare

npm i https://pkg.pr.new/@vinext/cloudflare@3367

create-vinext-app

npm i https://pkg.pr.new/create-vinext-app@3367

@vinext/types

npm i https://pkg.pr.new/@vinext/types@3367

vinext

npm i https://pkg.pr.new/vinext@3367

@cloudflare/workers-response-store

npm i https://pkg.pr.new/@cloudflare/workers-response-store@3367

commit: 6b1d5f7

@github-actions

github-actions Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared 6b1d5f7 against base 380d1dd using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.3 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.7 KB 130.4 KB ⚫ +0.6%
Dev server cold start vinext 2.51 s 2.48 s ⚫ -1.0%
Production build time vinext 2.73 s 2.74 s ⚫ +0.2%
RSC entry closure size (gzip) vinext 127.5 KB 127.9 KB ⚫ +0.2%
Server bundle size (gzip) vinext 225.6 KB 226.3 KB ⚫ +0.3%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
response-store-demo preview production
workers-cache preview production
kv preview production
static-export preview production
web preview production

Comment thread packages/vinext/src/shims/link.tsx Outdated
Comment thread packages/vinext/src/shims/router.ts Outdated
@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Posted 2 actionable inline findings.

github run

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from dd9f046 to c231666 Compare September 22, 2026 10:48
@james-elicx

Copy link
Copy Markdown
Member Author

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@james-elicx

Copy link
Copy Markdown
Member Author

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Comment thread packages/vinext/src/shims/router.ts Outdated
Comment thread packages/vinext/src/shims/router.ts
@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Posted 2 actionable inline findings. Focused router test passed.

github run

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from 96fa2e2 to 1fe784b Compare September 22, 2026 10:57
@james-elicx

Copy link
Copy Markdown
Member Author

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from 1fe784b to ccf42ba Compare September 22, 2026 11:01
Comment thread packages/vinext/src/shims/router.ts Outdated
@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from ccf42ba to 0a7e75e Compare September 22, 2026 11:02
@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Posted 1 actionable inline finding. Focused router/link tests passed.

github run

@james-elicx

Copy link
Copy Markdown
Member Author

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from db2f64e to 21411f8 Compare September 22, 2026 19:45
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@james-elicx

Copy link
Copy Markdown
Member Author

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

@james-elicx Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from 21411f8 to a3d9201 Compare September 22, 2026 20:01
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from a3d9201 to 4f76c94 Compare September 22, 2026 20:44
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx
james-elicx force-pushed the codex/pages-router-url-normalization branch from 4f76c94 to 090541a Compare September 22, 2026 20:56
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

1 similar comment
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

Comment thread packages/vinext/src/shims/router.ts
@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Posted 1 actionable inline finding.

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

Comment thread packages/vinext/src/shims/router.ts Outdated
@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Posted 1 actionable inline finding.

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

Comment thread packages/vinext/src/shims/router.ts
@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Posted 1 actionable inline finding.

github run

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Time limit: 8 minutes. Complete the review and post all findings within that limit.

@ask-bonk

ask-bonk Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

LGTM!

github run

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.

1 participant