cloudflare/vinext

Interception routes: build and route resolution failures

Geschlossen

#1.364 geöffnet am 20.05.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (384 Forks)github user discovery
adapter-api-e2ehelp wanted

Repository-Metriken

Stars
 (8.625 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 1T 1h) (462 gemergte PRs in 30 T)

Beschreibung

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.

Contributor Guide