Repository navigation
[19.0.x][Flight] Improve transport protocol - #37842
Merged
eps1lon merged 4 commits intoOct 14, 2026
Merged
Conversation
eps1lon/react-secured-mirror#78 eps1lon/react-secured-mirror#80 eps1lon/react-secured-mirror#89 Co-Authored-By: Hendrik Liebau <mail@hendrik-liebau.de> Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
This change partially picks the test-side adjustments from #35127 so that the new detached-buffer tests can run on this branch. The `web-streams-polyfill` override is removed from the Flight Edge test file so it exercises the native Web Streams implementation, and the `should support BYOB binary ReadableStreams` test receives the same PR's buffer-ownership adjustment but is skipped, because the client-side byte stream parsing fix from that PR is not backported to this branch: under native Web Streams, the client loses chunks of embedded byte streams. The `in <stack>` placeholder is dropped from the new tests' `assertConsoleErrorDev` expectations because this branch's test matcher does not support it, and `assertConsoleErrorDev` is now bound in the Edge test file's `beforeEach`, mirroring main. The rejection assertion in `cannot transport multiple buffer-spanning view on the same underlying buffer` is wrapped in an async function because this branch's client settles the root with a lazy wrapper chunk before the stream error propagates, and this Jest version does not assimilate thenables. The five Node variants of the detached-buffer tests are dropped because `server.node` has no `renderToReadableStream` and `client.node` has no `createFromReadableStream` on this branch, and the `supports streamed values whose entries are not contiguous in the body` test is dropped because `server.edge` has no `decodeReplyFromAsyncIterable` on this branch. Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
eps1lon
marked this pull request as ready for review
October 14, 2026 15:50
gnoff
approved these changes
Oct 14, 2026
eps1lon
force-pushed
the
sebbie/flight-transport-protocol/19.0.x
branch
2 times, most recently
from
October 14, 2026 15:58
7344588 to
1b455a2
Compare
gnoff
approved these changes
Oct 14, 2026
eps1lon
force-pushed
the
sebbie/flight-transport-protocol/19.0.x
branch
from
October 14, 2026 16:22
1b455a2 to
1d861b9
Compare
The transport protocol change made Fizz and Flight emit a DEV warning
whenever a zero-byte chunk is written in an environment without
ArrayBuffer.prototype.detached support. Several tests that legitimately
write empty chunks did not assert this warning, and two Flight form
tests asserted it unconditionally even though it only fires when
ArrayBuffer.prototype.detached is unsupported (Node.js < 21, older
browsers).
- Assert the warning, gated on the absence of
ArrayBuffer.prototype.detached, in ReactDOMFizzForm ("can hydrate
hidden fields in the beginning of a form"), ReactDOMFizzServerBrowser
("should stream large contents that might overlow individual
buffers"), and four ReactDOMFizzStaticBrowser prerender tests.
- Gate the existing assertions in ReactFlightDOMForm ("can submit a
multiple complex closure server action without hydrating it",
"useActionState can reuse state during MPA form submission") on the
same condition so they pass on Node.js >= 21.
- Add ReadableByteStreamController to the ESLint globals, fixing
no-undef errors in the new Flight Edge/Node tests.
Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
eps1lon
force-pushed
the
sebbie/flight-transport-protocol/19.0.x
branch
from
October 14, 2026 16:29
1d861b9 to
2773af1
Compare
gnoff
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.