@@ -26,6 +26,7 @@ import type {SuspenseContext} from './ReactFiberSuspenseContext.old';
2626import type {
2727 OffscreenProps ,
2828 OffscreenState ,
29+ OffscreenQueue ,
2930} from './ReactFiberOffscreenComponent' ;
3031import type {
3132 Cache ,
@@ -256,6 +257,7 @@ import {
256257 getSuspendedCache ,
257258 pushTransition ,
258259 getOffscreenDeferredCache ,
260+ getSuspendedTransitions ,
259261} from './ReactFiberTransition.old' ;
260262
261263const ReactCurrentOwner = ReactSharedInternals . ReactCurrentOwner ;
@@ -2160,6 +2162,16 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
21602162 renderLanes ,
21612163 ) ;
21622164 workInProgress . memoizedState = SUSPENDED_MARKER ;
2165+ if ( enableTransitionTracing ) {
2166+ const currentTransitions = getSuspendedTransitions ( ) ;
2167+ if ( currentTransitions !== null ) {
2168+ const primaryChildUpdateQueue : OffscreenQueue = {
2169+ transitions : currentTransitions ,
2170+ } ;
2171+ primaryChildFragment . updateQueue = primaryChildUpdateQueue ;
2172+ }
2173+ }
2174+
21632175 return fallbackFragment ;
21642176 } else if (
21652177 enableCPUSuspense &&
@@ -2280,6 +2292,15 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
22802292 prevOffscreenState === null
22812293 ? mountSuspenseOffscreenState ( renderLanes )
22822294 : updateSuspenseOffscreenState ( prevOffscreenState , renderLanes ) ;
2295+ if ( enableTransitionTracing ) {
2296+ const currentTransitions = getSuspendedTransitions ( ) ;
2297+ if ( currentTransitions !== null ) {
2298+ const primaryChildUpdateQueue : OffscreenQueue = {
2299+ transitions : currentTransitions ,
2300+ } ;
2301+ primaryChildFragment . updateQueue = primaryChildUpdateQueue ;
2302+ }
2303+ }
22832304 primaryChildFragment . childLanes = getRemainingWorkInPrimaryTree (
22842305 current ,
22852306 renderLanes ,
@@ -2321,6 +2342,17 @@ function updateSuspenseComponent(current, workInProgress, renderLanes) {
23212342 current ,
23222343 renderLanes ,
23232344 ) ;
2345+
2346+ if ( enableTransitionTracing ) {
2347+ const currentTransitions = getSuspendedTransitions ( ) ;
2348+ if ( currentTransitions !== null ) {
2349+ const primaryChildUpdateQueue : OffscreenQueue = {
2350+ transitions : currentTransitions ,
2351+ } ;
2352+ primaryChildFragment . updateQueue = primaryChildUpdateQueue ;
2353+ }
2354+ }
2355+
23242356 // Skip the primary children, and continue working on the
23252357 // fallback children.
23262358 workInProgress . memoizedState = SUSPENDED_MARKER ;
0 commit comments