next.js
77deebdf - Move App Router execution intent to entrypoints (#96640)

Commit
108 days ago
Move App Router execution intent to entrypoints (#96640) ## Summary App Router execution intent was previously inferred during WorkStore construction from response capabilities and request state. App Page also carried that intent through its handler context and lazy render API before selecting the rendering operation inside app-render. This change moves those decisions to entrypoints where the work is known: - Reusable output, including build-time generation, fallback shells, and runtime revalidation, selects prerendering. - Request-specific and resumed rendering selects request rendering. - App Page exposes distinct render and prerender operations, so execution mode no longer travels through `AppPageRouteHandlerContext` or the lazy render API. - App Route execution derives its intent from whether the response has an ISR cache key. WorkStore still consumes the explicit mode internally as a transitional seam. Follow-up work can migrate downstream behavior to the active WorkUnitStore and remove the mode from WorkStore entirely. Fixes #96519 ## Verification - `pnpm --filter=next types` - `pnpm test-start-turbo test/e2e/app-dir/segment-cache/static-shell-vary-params-regression/static-shell-vary-params-regression.test.ts` - `pnpm test-start-webpack test/e2e/app-dir/segment-cache/static-shell-vary-params-regression/static-shell-vary-params-regression.test.ts` <!-- NEXT_JS_LLM -->
Author
Parents
Loading