cloudflare/vinext

Parallel routes: nested slot resolution falls back to `default.tsx` instead of matched page

已关闭

#1,339 创建于 2026年5月20日

 (1 条评论) (0 个反应) (0 位负责人)TypeScript (371 个派生)github user discovery
adapter-api-e2ehelp wanted

仓库指标

星标
 (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 main vs Next.js v16.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.ts
  • test/e2e/app-dir/parallel-routes-catchall-groups/parallel-routes-catchall-groups.test.ts
  • test/e2e/app-dir/parallel-routes-catchall-default/parallel-routes-catchall-default.test.ts
  • test/e2e/app-dir/parallel-routes-catchall-specificity/parallel-routes-catchall-specificity.test.ts
  • test/e2e/app-dir/parallel-routes-catchall-dynamic-segment/parallel-routes-catchall-dynamic-segment.test.ts
  • test/e2e/app-dir/parallel-routes-generate-static-params/parallel-routes-generate-static-params.test.ts
  • test/e2e/app-dir/parallel-routes-group-depth/parallel-routes-group-depth.test.ts
  • test/e2e/app-dir/parallel-routes-root-param-dynamic-child/parallel-routes-root-param-dynamic-child.test.ts

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test with nested parallel routes (e.g., a @slot with pages at different depths) and verify the correct page renders instead of default.tsx. Confirm it fails.

  2. 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.

  3. 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 over default.tsx. Catch-all routes within slots need proper specificity ordering.

贡献者指南