@samitouri / QOS-React / commits / c552618a82

flags: make enableAsyncDebugInfo dynamic for www (#34430)

As titled. This adds dev-only debugging information to Fizz / Flight that could be used for tracking Promise's stack traces in "suspended by" section of DevTools.

Ruslan Lesiutin committed Sep 26, 2025 at 11:43 UTC c552618a8203866a8bf80324f6efa708d4bdb146
3 files changed +4 -2
packages/react-server-dom-webpack/src/__tests__/ReactFlightDOM-test.js
+2 -1
@@ -3021,7 +3021,8 @@ describe('ReactFlightDOM', () => {
3021 expect(getMeaningfulChildren(container)).toEqual(<div>loading...</div>);
3022 });
3023
3024 - // @gate enableHalt
3024 + // This could be a bug. Discovered while making enableAsyncDebugInfo dynamic for www.
3025 + // @gate experimental && (enableHalt || (enableAsyncDebugInfo && __DEV__))
3026 it('will leave async iterables in an incomplete state when halting', async () => {
3027 let resolve;
3028 const wait = new Promise(r => (resolve = r));
packages/shared/forks/ReactFeatureFlags.www-dynamic.js
+1
@@ -36,6 +36,7 @@ export const enableComponentPerformanceTrack: boolean = __VARIANT__;
36 export const enableScrollEndPolyfill: boolean = __VARIANT__;
37 export const enableFragmentRefs: boolean = __VARIANT__;
38 export const enableFragmentRefsScrollIntoView: boolean = __VARIANT__;
39 +export const enableAsyncDebugInfo: boolean = __VARIANT__;
40
41 // TODO: These flags are hard-coded to the default values used in open source.
42 // Update the tests so that they pass in either mode, then set these
packages/shared/forks/ReactFeatureFlags.www.js
+1 -1
@@ -34,6 +34,7 @@ export const {
34 enableScrollEndPolyfill,
35 enableFragmentRefs,
36 enableFragmentRefsScrollIntoView,
37 + enableAsyncDebugInfo,
38 } = dynamicFeatureFlags;
39
40 // On WWW, __EXPERIMENTAL__ is used for a new modern build.
@@ -94,7 +95,6 @@ export const passChildrenWhenCloningPersistedNodes: boolean = false;
95
96 export const enablePersistedModeClonedFlag: boolean = false;
97
97 -export const enableAsyncDebugInfo: boolean = false;
98 export const disableClientCache: boolean = true;
99
100 export const enableReactTestRendererWarning: boolean = false;