cloudflare/vinext

Interception routes: build and route resolution failures

已關閉

#1,364 建立於 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

Interception routes (using (.), (..), (...), and (..)(..) notation) fail at build time or resolve to the wrong page at runtime. The route scanner does not properly handle the interception segment notation combined with dynamic segments and parallel route slots.

All tests in the interception suites fail with build errors (Custom deploy script failed), indicating the build pipeline cannot process the route structure.

Estimated Impact

~22 test failures across multiple interception route suites.

Affected Test Suites

  • test/e2e/app-dir/interception-dynamic-segment/interception-dynamic-segment.test.ts (14 failures)
  • test/e2e/app-dir/interception-dynamic-single-segment/interception-dynamic-single-segment.test.ts (5 failures)
  • test/e2e/app-dir/interception-routes-multiple-catchall/interception-routes-multiple-catchall.test.ts (5 failures)
  • test/e2e/app-dir/interception-dynamic-segment-middleware/interception-dynamic-segment-middleware.test.ts (3 failures)
  • test/e2e/app-dir/interception-segments-two-levels-above/interception-segments-two-levels-above.test.ts (3 failures)

Recommendation

  1. Reproduce first in vinext's own test suite. Add a test with an interception route (e.g., app/@modal/(.)photo/[id]/page.tsx) and verify the build succeeds and the route resolves correctly. Confirm it fails.

  2. Study Next.js interception route handling. Search .nextjs-ref/packages/next/src/ for interception route parsing, the (.) notation, and how interception segments affect route matching.

  3. Fix routing/app-router.ts. The route scanner needs to recognize (.), (..), (...), and (..)(..) directory names as interception markers rather than treating them as malformed route segments. The interception notation should be stripped for route matching purposes while preserving the interception behavior for client-side navigation.

貢獻者指南