mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #1009] Stream Suspense fallbacks during draft mode in App Router #220
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#220
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @github-actions[bot] on GitHub (May 2, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/1009
Upstream change
Next.js fixed a regression where pages rendered with
draftMode().enable()would block on all I/O instead of streaming Suspense fallbacks. Since Next.js does not generate PPR shells for draft-mode requests, the renderer treats them as a static prerender and waits for the entire tree, even though the response is dynamic and could be streamed.The fix adds
isDraftModeto the conditions that opt the request into dynamic HTML rendering (alongside dev mode and non-SSG routes), so Suspense boundaries flush their fallbacks and the page streams normally.github.com/vercel/next.js@aacf6e19e7Relevant diff (
packages/next/src/build/templates/app-page.ts):Why this matters for vinext
vinext renders App Router pages through its own RSC/SSR pipeline (
entries/app-rsc-entry.tsandserver/app-*.tshelpers). When draft mode is enabled we should make sure draft-mode requests are treated as dynamic and that Suspense fallbacks stream, rather than blocking onallReadylike a static prerender. This is a parity item for cache components /"use cache"and any route that mixes draft mode with Suspense.Suggested work
server/app-*.ts, RSC and SSR entries) to confirm draft-mode requests opt into the dynamic / streaming branch and do not wait foronAllReadybefore flushing.test/e2e/app-dir/cache-components/cache-components.draft-mode.test.ts(added in the PR) so we have explicit coverage that draft-mode pages stream theirloading.tsx/ Suspense fallbacks.