Skip to content

[DevTools] Revert Measure the Rectangle of Suspense boundaries as we reconcile#170

Open
everettbu wants to merge 1 commit into
mainfrom
revert-34090
Open

[DevTools] Revert Measure the Rectangle of Suspense boundaries as we reconcile#170
everettbu wants to merge 1 commit into
mainfrom
revert-34090

Conversation

@everettbu

@everettbu everettbu commented Dec 12, 2025

Copy link
Copy Markdown

Mirror of facebook/react#34956
Original author: meet-student


Close:

  • #34942
  • #34866

After investigation, the problem appeared in this PR #34090 .
Measure the Rectangle of Suspense boundaries as we reconcile

I think this change release should be rolled back. After confirming that there are no issues with the subsequent plan, it can be changed again to ensure that the impact on users is reduced

@sebmarkbage @eps1lon @hoxyq

@greptile-apps

greptile-apps Bot commented Dec 12, 2025

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

This PR reverts DevTools backend logic that measured Suspense boundary rectangles during reconciliation (both at mount time and when consuming unchanged Suspense nodes). The net effect is that SuspenseNode.rects is no longer eagerly updated in mountFiberRecursively/reconcile cleanup paths, restoring the earlier behavior prior to the regression mentioned in the PR description.

Within the codebase, this primarily affects the Suspense overlay/visualization plumbing in packages/react-devtools-shared/src/backend/fiber/renderer.js, by reducing when recordSuspenseResize can be triggered and leaving rect updates to other existing measurement paths.

Confidence Score: 4/5

  • This PR is largely safe to merge; it is a focused revert with low blast radius.
  • Changes only remove measurement calls/logic for Suspense rectangles in the DevTools backend renderer. No new control flow is introduced, and remaining measurement helpers are still present. The main risk is behavioral (less frequent rect updates), which is intended by the revert; the only concrete fix needed is a now-stale comment that no longer matches behavior.
  • packages/react-devtools-shared/src/backend/fiber/renderer.js (stale comment about measuring Suspense nodes)

Important Files Changed

Filename Overview
packages/react-devtools-shared/src/backend/fiber/renderer.js Reverts recent Suspense boundary rectangle measurement during reconciliation by removing mount-time and unchanged-node measurement calls; leaves a now-misleading comment about measuring Suspense nodes.

@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.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@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.

Additional Comments (1)

  1. packages/react-devtools-shared/src/backend/fiber/renderer.js, line 3453-3510 (link)

    style: measureUnchangedSuspenseNodesRecursively is now unused (its only call was removed on line 3552). Consider removing this dead code.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@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.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps

greptile-apps Bot commented Feb 9, 2026

Copy link
Copy Markdown
Additional Comments (1)

packages/react-devtools-shared/src/backend/fiber/renderer.js
Dead/incorrect comment block
After this revert, the block comment at mountFiberRecursively still says “Measure this Suspense node…”, but the measuring logic it describes was removed in this PR. This is misleading (and suggests newSuspenseNode.rects is set here when it no longer is), which makes future maintenance/error triage harder.

Suggestion: delete or update this comment to reflect the current behavior (i.e. rect measurement is not happening at mount time here).

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/react-devtools-shared/src/backend/fiber/renderer.js
Line: 4133:4138

Comment:
**Dead/incorrect comment block**
After this revert, the block comment at `mountFiberRecursively` still says “Measure this Suspense node…”, but the measuring logic it describes was removed in this PR. This is misleading (and suggests `newSuspenseNode.rects` is set here when it no longer is), which makes future maintenance/error triage harder.

Suggestion: delete or update this comment to reflect the current behavior (i.e. rect measurement is not happening at mount time here).

How can I resolve this? If you propose a fix, please make it concise.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions Bot added the Resolution: Stale Automatically closed due to inactivity label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants