mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### Why? Current behavior: https://github.com/vercel/next.js/actions/runs/28225010081/job/83615571987?pr=95184#step:31:8732 For a minimal-mode resume request carrying the Instant Navigation testing cookie, Next.js skips the postponed render so the test receives only the prefetched static shell. The resulting empty continuation was represented as `PAGES`, but the App Page handler requires `APP_PAGE`, causing error: ``` Error: Invariant app-page handler received invalid cache entry PAGES ``` ### How? Return an empty `APP_PAGE` response with the correct HTML or RSC content type and postponed metadata. If the document continuation has no `<head>` chunk, insert the Instant Navigation bootstrap while flushing the stream. Add production regression coverage for document and RSC-prefetch resume requests using build-generated postponed state. <!-- NEXT_JS_LLM_PR -->
19 lines
390 B
TypeScript
19 lines
390 B
TypeScript
import { Suspense } from 'react'
|
|
import { connection } from 'next/server'
|
|
|
|
async function DynamicContent() {
|
|
await connection()
|
|
return <p id="dynamic">dynamic content</p>
|
|
}
|
|
|
|
export default function Page() {
|
|
return (
|
|
<main>
|
|
<p id="shell">static shell</p>
|
|
<Suspense fallback={<p id="fallback">loading</p>}>
|
|
<DynamicContent />
|
|
</Suspense>
|
|
</main>
|
|
)
|
|
}
|