mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 16:35:46 +02:00
[GH-ISSUE #730] App Router interception resolution is not source-aware when multiple intercepting routes share the same target #159
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#159
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?
Originally created by @Debbl on GitHub (Mar 31, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/730
While working on the
targetPatterndedupe change, I noticed what looks like a separate runtime issue in vinext.With a route structure like this:
both source routes navigate to the same target URL, but they should activate different intercepting routes depending on where the navigation started.
Expected behavior:
navigating from
/feedto/photo/123should renderapp/feed/@modal/(..)photo/[id]/page.tsxnavigating from
/profileto/photo/123should renderapp/profile/@modal/(..)photo/[id]/page.tsxdirectly loading
/photo/123should renderapp/photo/[id]/page.tsxCurrent vinext behavior:
vinext does not appear to resolve the interception using source-route context
in my testing, it ended up rendering
app/photo/[id]/page.tsxinstead of the source-specific intercepted routeThis seems separate from the route-scanning / validation change around deduping targetPatterns. Even if targetPattern dedupe is fine, runtime interception still needs to distinguish between multiple intercepting routes that share the same target.
My current guess is that interception resolution needs to be source-aware, rather than matching only by the target pathname.
I’m putting together a small demo to compare the behavior between Next.js and vinext and will add more concrete notes once I have that verified.