close
Skip to content

[19.0.x][Flight] Improve transport protocol - #37842

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

eps1lon merged 4 commits into
releases/19.0.xfrom
sebbie/flight-transport-protocol/19.0.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:52
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>
@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
@eps1lon
eps1lon force-pushed the sebbie/flight-transport-protocol/19.0.x branch 2 times, most recently from 7344588 to 1b455a2 Compare October 14, 2026 15:58
@eps1lon
eps1lon force-pushed the sebbie/flight-transport-protocol/19.0.x branch from 1b455a2 to 1d861b9 Compare October 14, 2026 16:22
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.0.x branch from 1d861b9 to 2773af1 Compare October 14, 2026 16:29
@eps1lon
eps1lon merged commit 611d921 into releases/19.0.x Oct 14, 2026
179 of 180 checks passed
@eps1lon
eps1lon deleted the sebbie/flight-transport-protocol/19.0.x branch October 14, 2026 16:38
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