Skip to content

[Flight] Don't block on debug channel if it's not wired up #33757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 15, 2025

Conversation

sebmarkbage
Copy link
Collaborator

React Elements reference debug data (their stack and owner) in the debug channel. If the debug channel isn't wired up this can block the client from resolving.

We can infer that if there's no debug channel wired up and the reference wasn't emitted before the element, then it's probably because it's in the debug channel. So we can skip it.

This should also apply to debug chunks but they're not yet blocking until #33665 lands.

@sebmarkbage sebmarkbage requested a review from unstubbable July 10, 2025 20:53
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Jul 10, 2025
@@ -1353,6 +1353,26 @@ function waitForReference<T>(
map: (response: Response, model: any, parentObject: Object, key: string) => T,
path: Array<string>,
): T {
if (
__DEV__ &&
// TODO: This should check for the existence of the "readable" side, not the "writable".
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We never pass anything into the response when there's a readable. We could maybe add a boolean just for this.

@react-sizebot
Copy link

react-sizebot commented Jul 10, 2025

Comparing: 56d0dda...129c003

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.70 kB 530.70 kB = 93.70 kB 93.70 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.11% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 655.25 kB 655.25 kB = 115.40 kB 115.40 kB
facebook-www/ReactDOM-prod.classic.js = 675.13 kB 675.13 kB = 118.75 kB 118.75 kB
facebook-www/ReactDOM-prod.modern.js = 665.56 kB 665.56 kB = 117.11 kB 117.11 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +0.51% 160.92 kB 161.74 kB +0.69% 36.75 kB 37.00 kB
oss-stable/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +0.51% 160.95 kB 161.77 kB +0.69% 36.77 kB 37.02 kB
oss-experimental/react-server-dom-esm/esm/react-server-dom-esm-client.browser.development.js +0.41% 197.41 kB 198.23 kB +0.54% 43.59 kB 43.83 kB

Generated by 🚫 dangerJS against 129c003

@sebmarkbage sebmarkbage merged commit 2f0e7e5 into facebook:main Jul 15, 2025
241 of 242 checks passed
sebmarkbage added a commit to sebmarkbage/react that referenced this pull request Jul 19, 2025
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