[DevTools] Only block child Suspense boundaries if the parent has all shared suspenders removed#35737
Conversation
There was a problem hiding this comment.
What is the definition of a unique suspender for boundary? This wording is a bit confusing to me, because there are 2 boundaries and they have the same suspender, but the statement is that both these boundaries have unique suspenders.
There was a problem hiding this comment.
Yeah I forgot to mention that we currently don't model going from some unique suspenders to none at all i.e. true -> false. Only false -> true.
Clarified that in the comment and switched to using present tense to make it clear the comment isn't talking about the previous snapshot.
A boundary has a unique suspender if that suspender does not suspend any ancestor boundary. We use that flag to filter out boundaries that can't show their fallback. If the same suspender appears in ancestor and a descendant boundary, the descendant will also be revealed when the ancestor is revealed. React will never reveal the ancestor but leave the descendant fallback in place. They'll always reveal together if the descendant suspenders are a subset of the ancestor suspenders.
… shared suspenders removed
eaa0db2 to
4cd0fb6
Compare
… shared suspenders removed (facebook#35737) DiffTrain build for [57b79b0](facebook@57b79b0)
… shared suspenders removed (facebook#35737) DiffTrain build for [57b79b0](facebook@57b79b0)
Summary
Stacked on #35736
A Suspense boundary is considered unblocked by I/O removal if no more children (until the next Suspense boundary) are blocked on the same I/O. However, we used to unblock if at least one children with this I/O was removed. Now we check if no more children are blocked on the same I/O.
This was probably an oversight. The unblocking should happen in the same codeblock that checks if all dependencies are removed.
Found with Claude + Opus 4.6
How did you test this change?