mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #458] [MERGED] fix: skip synthetic slot sub-routes without parent default fallback #586
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#586
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/458
Author: @JaredStowell
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/12/2026
Merged by: @james-elicx
Base:
main← Head:jstowell/fix-app-router-nested-slot-subroutes📝 Commits (3)
a407051Fix nested parallel slot routesa1d4c02Fix nested parallel slot discovery151082cFix parallel slot routing parity📊 Changes
2 files changed (+37 additions, -0 deletions)
View changed files
📝
packages/vinext/src/routing/app-router.ts(+1 -0)📝
tests/routing.test.ts(+36 -0)📄 Description
Summary
Fix App Router synthetic parallel-slot sub-route discovery when the parent segment is missing the implicit
childrenfallback.Before this change,
discoverSlotSubRoutes()could generate a synthetic route like/inbox/profilewithpagePath: nullwhen the parent directory had nodefault.tsx. That route would then fail at render time with a page export error instead of being rejected during routing.This PR now skips synthetic nested slot routes unless the parent segment has a
default.tsxfor the implicitchildrenslot.Changes
@slotsub-route generation when the parent segment has nodefault.tsxchildrenfallback existschildren-default casediscoverParallelSlots()behavior when an@slotroot has no ownpage.tsxordefault.tsxNotes
The original nested-only slot-root case remains unchanged by this PR:
discoverParallelSlots()still filters out@modalwhen the slot root has no ownpage.tsx,default.tsx, or intercepting route. That behavior is now explicitly covered by test and can be addressed separately if we decide to change it.Testing
pnpm test tests/routing.test.tspnpm test tests/app-router.test.tspnpm testpnpm run fmtpnpm run typecheck🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.