Skip to content

[DevTools] Only block child Suspense boundaries if the parent has all shared suspenders removed#495

Closed
everettbu wants to merge 2 commits into
mainfrom
sebbie/02-09-_devtools_only_block_child_suspense_boundaries_if_the_parent_has_all_shared_suspenders_removed
Closed

[DevTools] Only block child Suspense boundaries if the parent has all shared suspenders removed#495
everettbu wants to merge 2 commits into
mainfrom
sebbie/02-09-_devtools_only_block_child_suspense_boundaries_if_the_parent_has_all_shared_suspenders_removed

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of facebook/react#35737
Original author: eps1lon


Summary

Stacked on react/react#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?

  • added test (see first commit for current behavior vs 2nd commit for changed behavior)

@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Feb 10, 2026
@greptile-apps

greptile-apps Bot commented Feb 10, 2026

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

This PR tightens the DevTools Suspense “unblocking” logic so child Suspense boundaries are only reconsidered for unblocking after the parent has actually removed the last remaining dependency for a given I/O entry. Previously, unblocking could be triggered even when some children were still suspended on that same I/O, which could incorrectly mark child boundaries as having unique suspenders.

A new store test exercises a stacked outer/inner Suspense scenario to lock in the corrected behavior and prevent regressions.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Change is a small, localized logic fix that aligns the unblock step with the verified removal of the final dependency; the accompanying regression test covers the previously incorrect stacked Suspense case.
  • No files require special attention

Important Files Changed

Filename Overview
packages/react-devtools-shared/src/backend/fiber/renderer.js Moves unblockSuspendedBy() call under the same branch that confirms the IO was fully removed from the Suspense boundary (only after last dependency is deleted), preventing child boundaries from being unblocked prematurely.
packages/react-devtools-shared/src/tests/store-test.js Adds a regression test covering stacked Suspense boundaries to ensure a parent boundary remains blocking until all children suspended on the same removed I/O are removed, and that the inner boundary only becomes unique after the parent’s unique suspenders are fully gone.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

6 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu
everettbu force-pushed the sebbie/02-09-_devtools_only_block_child_suspense_boundaries_if_the_parent_has_all_shared_suspenders_removed branch from eaa0db2 to 4cd0fb6 Compare February 10, 2026 15:40

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Feb 10, 2026
@everettbu
everettbu deleted the sebbie/02-09-_devtools_only_block_child_suspense_boundaries_if_the_parent_has_all_shared_suspenders_removed branch February 10, 2026 17:33
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.

2 participants