next.js
cf4d3ae8 - partial fallbacks: only upgrade shells with remaining prerenderable params (#91158)

Commit
1 day ago
partial fallbacks: only upgrade shells with remaining prerenderable params (#91158) Partial fallback upgrading is currently too broad. Any PPR fallback shell can be treated as upgradeable, including routes with no `generateStaticParams` and shells that are already as specific as prerendering can make them. In practice, that means we preserve `allowQuery` and enable background promotion for shells that should remain as partial fallbacks. That broadens the feature beyond the medium-cardinality case it was meant for and makes the build output imply per-param upgradeability when there are no prerenderable params left to fill. This PR teaches static-path generation to compute `remainingPrerenderableParams` for each fallback shell: the unresolved pathname params that can still be filled by `generateStaticParams` in that branch. We then use that signal to gate partial fallback behavior. With this change: - `partialFallback` is only emitted for shells that still have prerenderable params remaining - `allowQuery` with params is only preserved for those shells Effectively, this limits partial fallback upgrading to shells that can still be made more specific by prerendering.
Author
Parents
Loading