Parallel routes: nested slot resolution falls back to `default.tsx` instead of matched page
#1,339 创建于 2026年5月20日
仓库指标
- 星标
- (8,563 个星标)
- PR 合并指标
- (平均合并 1天 1小时) (30 天内合并 462 个 PR)
描述
This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext
mainvs Next.jsv16.2.6, 2026-05-20).
Problem
Parallel route slots render default.tsx content ("default page") instead of the matched page content. In some cases, routes with parallel slots render the not-found page entirely, suggesting the slot resolution fails to find any matching page.
The catch-all slot matching logic does not account for slot-specific route segments, especially within route groups.
Expected: "Hello from Nested"
Received: "default page"
TIMED OUT: /Catcher/
This page could not be found
Estimated Impact
~10 test failures across the deploy suite.
Affected Test Suites
test/e2e/app-dir/parallel-routes-layouts/parallel-routes-layouts.test.tstest/e2e/app-dir/parallel-routes-catchall-groups/parallel-routes-catchall-groups.test.tstest/e2e/app-dir/parallel-routes-catchall-default/parallel-routes-catchall-default.test.tstest/e2e/app-dir/parallel-routes-catchall-specificity/parallel-routes-catchall-specificity.test.tstest/e2e/app-dir/parallel-routes-catchall-dynamic-segment/parallel-routes-catchall-dynamic-segment.test.tstest/e2e/app-dir/parallel-routes-generate-static-params/parallel-routes-generate-static-params.test.tstest/e2e/app-dir/parallel-routes-group-depth/parallel-routes-group-depth.test.tstest/e2e/app-dir/parallel-routes-root-param-dynamic-child/parallel-routes-root-param-dynamic-child.test.ts
Recommendation
-
Reproduce first in vinext's own test suite. Add a test with nested parallel routes (e.g., a
@slotwith pages at different depths) and verify the correct page renders instead ofdefault.tsx. Confirm it fails. -
Study Next.js parallel route resolution. Search
.nextjs-ref/packages/next/src/server/and.nextjs-ref/packages/next/src/client/for how parallel route slots are resolved during navigation and SSR. Pay attention to catch-all matching within slots and route group handling. -
Fix
routing/app-router.ts. The route scanner needs to properly resolve nested parallel route slots. When navigating to a path that matches a specific page within a slot, it should prefer that page overdefault.tsx. Catch-all routes within slots need proper specificity ordering.