Prune descendant replay paths after a parent postpone #37851

Closed
gnoff opened 6:45pm on October 14, 2026 wanted to merge 103 Ξ” into facebook/react main from
jstory/fizz-prune-overlapping-replay-nodes
Diff Delta:
103
About 177 Diff Delta/hour
Classified as:  Feature Add

gnoff's Description of Work

Follow-up to #37850. Extracting the suspended and aborting children into a component still leaves a nested child replay path beneath a Suspense boundary whose whole content was postponed. Resume rerenders that content but then finds the stale child path, reports a replay mismatch, and leaves the fallback visible.

When recording a whole-content replay slot, clear descendant replay paths already tracked and avoid attaching later paths beneath it. The new regression test wraps the children in a component and verifies that both render after resume.

Tests:
- yarn test ReactDOMFizzStatic --runInBand (60 passed)
- yarn test ReactDOMFizzStatic --prod --runInBand (60 passed)
- yarn test ReactDOMFizzSuspenseList --runInBand (13 passed)
- yarn linc
- node scripts/prettier/index.js check-changed
- yarn flow dom-node

2 total changed files
Loading changes...
Loading changes...
That’s the last hunk
Consider your review checksum validated.