Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

This lets us pass a writable on the server side and readable on the client side to send debug info through a separate channel so that it doesn't interfere with the main payload as much. The main payload refers to chunks defined in the debug info which means it's still blocked on it though. This ensures that the debug data has loaded by the time the value is rendered so that the next step can forward the data.

This will be a bit fragile to race conditions until #33665 lands. Another follow up needed is the ability to skip the debug channel on the receiving side. Right now it'll block forever if you don't provide one since we're blocking on the debug data.

The "D" chunks are blocking the resolution of the actual value and we need
to know that there might be something coming from the other channel so we
know to block.
This is now just the same as have two sources. We don't need to distinguish
which source the data is coming from. Each source has its own StreamState.
Instead of Uint8Array chunks. We could potentially always allow streams
with variable chunk types even in prod and non-debug channels.
@sebmarkbage sebmarkbage requested a review from unstubbable July 10, 2025 15:03
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jul 10, 2025
@react-sizebot
Copy link

react-sizebot commented Jul 10, 2025

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against c4a2c60

Instead we wait for the debug channel to close before we close.
That's always expected to stay open longer.
This event is fired if we're the ones closing it.

Instead we let it close naturally when we finish after closing the debug channel.
Copy link
Collaborator

@unstubbable unstubbable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sebmarkbage sebmarkbage merged commit eb7f8b4 into facebook:main Jul 10, 2025
241 checks passed
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.

4 participants