cloudflare/vinext

Interception routes: build and route resolution failures

已关闭

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

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

仓库指标

星标
 (8,625 个星标)
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.

贡献者指南