mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #879] [codex] Fix wrangler dev suspense streaming #917
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#917
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?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/879
Author: @southpolesteve
Created: 4/24/2026
Status: 🔄 Open
Base:
main← Head:codex/fix-wrangler-suspense-streaming📝 Commits (1)
b08ce9afix wrangler dev suspense streaming📊 Changes
8 files changed (+397 additions, -52 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+3 -23)📝
packages/vinext/src/server/app-router-entry.ts(+2 -2)📝
packages/vinext/src/server/app-ssr-stream.ts(+40 -27)➕
packages/vinext/src/server/flight-hints.ts(+134 -0)📝
packages/vinext/src/server/worker-utils.ts(+36 -0)📝
tests/app-ssr-stream.test.ts(+77 -0)📝
tests/deploy.test.ts(+55 -0)📝
tests/rsc-streaming.test.ts(+50 -0)📄 Description
Summary
Content-Encoding: identityfor streamed loopback App Router responses without explicit body headers.Root Cause
wrangler dev/Miniflare buffers streamed non-SSE responses unless compression is explicitly avoided. The behavior reproduces with a plainReadableStreamroute, outside React and vinext rendering. SettingContent-Encoding: identityrestores chunk delivery locally.This aligns with upstream Cloudflare workers-sdk issue #8004, which describes Miniflare aggressively buffering responses and lists
Content-Encoding: identityas the workaround.Validation
npx vp test run tests/app-ssr-stream.test.ts tests/rsc-streaming.test.ts tests/deploy.test.ts -t "applyLocalDevStreamingHeaders|host timers|createFlightHintFixTransform"npx vp check packages/vinext/src/server/worker-utils.ts packages/vinext/src/server/app-router-entry.ts packages/vinext/src/server/app-ssr-stream.ts packages/vinext/src/server/flight-hints.ts packages/vinext/src/entries/app-rsc-entry.ts tests/app-ssr-stream.test.ts tests/rsc-streaming.test.ts tests/deploy.test.tsnpx vp run vinext#build/streamingbuffered until ~830ms; after the workaround the fallback arrived at ~47ms and resolved content at ~834ms.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.