Interception routes: build and route resolution failures
#1,364 opened on May 20, 2026
Repository metrics
- Stars
- (8,563 stars)
- PR merge metrics
- (Avg merge 1d 1h) (462 merged PRs in 30d)
Description
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
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
-
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. -
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. -
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.