close
Skip to content

[19.1.x][Flight] Improve transport protocol - #37843

Merged
eps1lon merged 4 commits into
releases/19.1.xfrom
sebbie/flight-transport-protocol/19.1.x
Oct 14, 2026
Merged

eps1lon merged 4 commits into
releases/19.1.xfrom
sebbie/flight-transport-protocol/19.1.x

Conversation

@eps1lon

@eps1lon eps1lon commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

eps1lon and others added 3 commits October 8, 2026 17:34
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. 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, so there is no byte-stream path in the Node build for them to exercise.

Co-Authored-By: Claude Code (kimi-k3[1m]) <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed label Oct 14, 2026
@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Oct 14, 2026
@eps1lon
eps1lon requested a review from gnoff October 14, 2026 15:50
@eps1lon
eps1lon marked this pull request as ready for review October 14, 2026 15:50
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
eps1lon force-pushed the sebbie/flight-transport-protocol/19.1.x branch from a405db3 to 5d2fa1c Compare October 14, 2026 16:30
@eps1lon
eps1lon merged commit 249ac87 into releases/19.1.x Oct 14, 2026
240 checks passed
@eps1lon
eps1lon deleted the sebbie/flight-transport-protocol/19.1.x branch October 14, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants