mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #486] [CLOSED] fix: rewritten pathnames and metadata title resolution #608
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#608
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/486
Author: @JaredStowell
Created: 3/12/2026
Status: ❌ Closed
Base:
main← Head:jstowell/fix-pathname-rewrites-and-metadata-titles📝 Commits (8)
01d8042Update navigation pathname handling4867f38jstowell/fix-nextjs-metadata-and-rewrite-parityc1898dbFix PR 486 parity issues5d5b8c7Fix ISR cache pathname keysaf4491cFix ISR cache keys for rewritten App0dab165fix testad9cab2Fix PR 486 feedbackbaa03d0Fix PR 486 feedback📊 Changes
25 files changed (+838 additions, -282 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+49 -36)📝
packages/vinext/src/shims/metadata.tsx(+75 -37)📝
tests/__snapshots__/entry-templates.test.ts.snap(+269 -196)📝
tests/app-router.test.ts(+93 -1)📝
tests/features.test.ts(+58 -3)➕
tests/fixtures/app-basic/app/nextjs-compat/api/(grouped)/endpoint/nested/route.ts(+3 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/api/cookies-has/route.ts(+10 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/api/permanent-redirect/route.ts(+5 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/isr-rewrite-target/page.tsx(+12 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/isr-rewrite-target/pathname-client.tsx(+9 -0)📝
tests/fixtures/app-basic/app/nextjs-compat/metadata-parent-generate/layout.tsx(+4 -0)📝
tests/fixtures/app-basic/app/nextjs-compat/metadata-parent-generate/page.tsx(+3 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/metadata-socials/page.tsx(+13 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/metadata-title-template/extra/inner/deep/page.tsx(+3 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/metadata-title-template/extra/inner/page.tsx(+9 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/metadata-title-template/extra/layout.tsx(+12 -0)➕
tests/fixtures/app-basic/app/nextjs-compat/metadata-title-template/use-layout-title/page.tsx(+3 -0)➕
tests/fixtures/app-basic/app/not-found/page.tsx(+3 -0)📝
tests/fixtures/app-basic/middleware.ts(+6 -1)📝
tests/fixtures/app-basic/next.config.ts(+15 -0)...and 5 more files
📄 Description
This fixes two App Router parity gaps with Next.js and hardens the related coverage.
usePathname()reflects the source URL, not the rewritten destination.generateMetadata(_, parent), includingtitle.absoluteandtitle.template, instead of collapsing parent titles to a plain string.Testing
pnpm test tests/features.test.ts -t "metadata title templates"pnpm test tests/nextjs-compat/hooks.test.ts tests/nextjs-compat/metadata.test.ts tests/entry-templates.test.tspnpm run fmtpnpm run typecheck🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.