Unverified Commit bfb0d3c1 authored by Zack Tanner's avatar Zack Tanner Committed by GitHub

Remove obsolete shouldWaitOnAllReady render option (#96401)

## Summary

`shouldWaitOnAllReady` previously allowed an otherwise dynamic App
Router render to wait for every Suspense boundary before sending the
response. After [#96367](https://github.com/vercel/next.js/pull/96367),
no caller enables this behavior anymore.

This removes the unused option and makes `supportsDynamicResponse` the
sole signal for whether App Router generates static HTML. Static
generation still waits for `allReady`, while dynamic responses continue
streaming.

<!-- NEXT_JS_LLM -->
parent a49f1c97
......@@ -870,7 +870,6 @@ export function createAppPageEntrypoint({
page: srcPage,
postponed,
allowEmptyStaticShell,
shouldWaitOnAllReady: false,
serveStreamingMetadata,
supportsDynamicResponse:
typeof postponed === 'string' || supportsDynamicResponse,
......
......@@ -130,7 +130,6 @@ async function requestHandler(
params,
page: srcPage,
postponed: undefined,
shouldWaitOnAllReady: false,
serveStreamingMetadata: true,
supportsDynamicResponse: true,
buildManifest,
......
......@@ -3290,7 +3290,6 @@ async function renderToStream(
page,
reactMaxHeadersLength,
setReactDebugChannel,
shouldWaitOnAllReady,
subresourceIntegrityManifest,
supportsDynamicResponse,
cacheComponents,
......@@ -3887,8 +3886,7 @@ async function renderToStream(
tracingMetadata: tracingMetadata,
})
const generateStaticHTML =
supportsDynamicResponse !== true || !!shouldWaitOnAllReady
const generateStaticHTML = supportsDynamicResponse !== true
const appElement = (
<App
......@@ -4031,8 +4029,7 @@ async function renderToStream(
tracingMetadata: tracingMetadata,
})
const generateStaticHTML =
supportsDynamicResponse !== true || !!shouldWaitOnAllReady
const generateStaticHTML = supportsDynamicResponse !== true
const appElement = (
<App
......@@ -4209,8 +4206,7 @@ async function renderToStream(
}
try {
const generateStaticHTML =
supportsDynamicResponse !== true || !!shouldWaitOnAllReady
const generateStaticHTML = supportsDynamicResponse !== true
const { stream: errorHtmlStream, allReady: errorAllReady } =
await workUnitAsyncStorage.run(
......@@ -4308,8 +4304,7 @@ async function renderToStream(
}
try {
const generateStaticHTML =
supportsDynamicResponse !== true || !!shouldWaitOnAllReady
const generateStaticHTML = supportsDynamicResponse !== true
const { stream: errorHtmlStream, allReady: errorAllReady } =
await workUnitAsyncStorage.run(
......
......@@ -187,12 +187,6 @@ export interface RenderOptsPartial {
}
postponed?: string
/**
* Should wait for react stream allReady to resolve all suspense boundaries,
* in order to perform a full page render.
*/
shouldWaitOnAllReady?: boolean
/**
* A prefilled resume data cache. This was either generated for this page
* during dev warmup, or when a page with defined params was previously
......
......@@ -65,7 +65,6 @@ export type WorkStoreContext = {
RenderOpts,
| 'assetPrefix'
| 'supportsDynamicResponse'
| 'shouldWaitOnAllReady'
| 'isBuildTimePrerendering'
| 'isDraftMode'
| 'isDebugDynamicAccesses'
......@@ -115,7 +114,6 @@ export function createWorkStore({
* coalescing, and ISR continue working as intended.
*/
const isStaticGeneration =
!renderOpts.shouldWaitOnAllReady &&
!renderOpts.supportsDynamicResponse &&
!renderOpts.isDraftMode &&
!renderOpts.isPossibleServerAction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment