next.js
2cb6a3d1 - Refactor `findNavigationsToValidate` to use URL-based navigation boundaries

Commit
2 days ago
Refactor `findNavigationsToValidate` to use URL-based navigation boundaries The navigation parent tracking in `findNavigationsToValidate` previously treated every layout as a navigation boundary, including route group layouts. But route group layouts don't contribute to the URL — they always mount together with the next URL-contributing segment. A user can never navigate "into" a route group layout independently, so treating it as a separate boundary created redundant validation tasks. This changes `navigationParents.push()` to only include layouts at URL-contributing segments (not route groups, `__PAGE__`, or `__DEFAULT__`). Route group layouts still have their configs processed — if a route group layout has `unstable_instant`, a validation task is created from the parents above it — but they don't advance the boundary for deeper segments. This also adds a guard that skips task creation when `navigationParents` is empty, which naturally deduplicates the case where both a route group layout and the URL-contributing layout below it have configs.
Author
Committer
Parents
Loading