-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[DevTools] Show the Suspense boundary name in the rect if there's no overlap #34918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+387
−91
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exclude the root rects since they won't take up visual space.
… rects Use it to render the name of the Suspense boundary.
Meaning a child can still print its title when its parent rect is around it.
Comparing: b485f7c...80dd316 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
This depends on the zoom of the view.
17f7921
to
689376d
Compare
They're esm.
689376d
to
1ce0a99
Compare
eps1lon
approved these changes
Oct 20, 2025
They may up being larger when zoomed into the rect view
sebmarkbage
pushed a commit
to vercel/next.js
that referenced
this pull request
Oct 20, 2025
[diff facebook/react@58bdc0bb...f6a48828](facebook/react@58bdc0b...f6a4882) <details> <summary>React upstream changes</summary> - facebook/react#34918 - facebook/react#34916 - facebook/react#34912 </details>
hoxyq
added a commit
that referenced
this pull request
Oct 20, 2025
Full list of changes: * Text layout fixes for stack traces with badges ([eps1lon](https://github.com/eps1lon) in [#34925](#34925)) * chore: read from build/COMMIT_SHA fle as fallback for commit hash ([hoxyq](https://github.com/hoxyq) in [#34915](#34915)) * fix: dont ship source maps for css in prod builds ([hoxyq](https://github.com/hoxyq) in [#34913](#34913)) * Lower case "rsc stream" debug info ([sebmarkbage](https://github.com/sebmarkbage) in [#34921](#34921)) * BuiltInCallSite should have padding-left ([sebmarkbage](https://github.com/sebmarkbage) in [#34922](#34922)) * Show the Suspense boundary name in the rect if there's no overlap ([sebmarkbage](https://github.com/sebmarkbage) in [#34918](#34918)) * Don't attach filtered IO to grandparent Suspense ([eps1lon](https://github.com/eps1lon) in [#34916](#34916)) * Infer name from stack if it's the generic "lazy" name ([sebmarkbage](https://github.com/sebmarkbage) in [#34907](#34907)) * Use same Suspense naming heuristics when reconnecting ([eps1lon](https://github.com/eps1lon) in [#34898](#34898)) * Assign a different color and label based on environment ([sebmarkbage](https://github.com/sebmarkbage) in [#34893](#34893)) * Compute environment names for the timeline ([sebmarkbage](https://github.com/sebmarkbage) in [#34892](#34892)) * Don't highlight the root rect if no roots has unique suspenders ([sebmarkbage](https://github.com/sebmarkbage) in [#34885](#34885)) * Highlight the rect when the corresponding timeline bean is hovered ([sebmarkbage](https://github.com/sebmarkbage) in [#34881](#34881)) * Repeat the "name" if there's no short description in groups ([sebmarkbage](https://github.com/sebmarkbage) in [#34894](#34894)) * Tweak the rects design and create multi-environment color scheme ([sebmarkbage](https://github.com/sebmarkbage) in [#34880](#34880)) * Adjust the rects size by one pixel smaller ([sebmarkbage](https://github.com/sebmarkbage) in [#34876](#34876)) * Remove steps title from scrubber ([sebmarkbage](https://github.com/sebmarkbage) in [#34878](#34878)) * Include some sub-pixel precision in rects ([sebmarkbage](https://github.com/sebmarkbage) in [#34873](#34873)) * Don't pluralize if already plural ([sebmarkbage](https://github.com/sebmarkbage) in [#34870](#34870)) * Don't try to load anonymous or empty urls ([sebmarkbage](https://github.com/sebmarkbage) in [#34869](#34869)) * Add inspection button to Suspense tab ([sebmarkbage](https://github.com/sebmarkbage) in [#34867](#34867)) * Don't select on hover ([sebmarkbage](https://github.com/sebmarkbage) in [#34860](#34860)) * Don't highlight on timeline ([sebmarkbage](https://github.com/sebmarkbage) in [#34861](#34861)) * The bridge event types should only be defined in one direction ([sebmarkbage](https://github.com/sebmarkbage) in [#34859](#34859)) * Attempt at a better "unique suspender" text ([sebmarkbage](https://github.com/sebmarkbage) in [#34854](#34854)) * Track whether a boundary is currently suspended and make transparent ([sebmarkbage](https://github.com/sebmarkbage) in [#34853](#34853)) * Don't hide overflow rectangles ([sebmarkbage](https://github.com/sebmarkbage) in [#34852](#34852)) * Measure text nodes ([sebmarkbage](https://github.com/sebmarkbage) in [#34851](#34851)) * Don't measure fallbacks when suspended ([sebmarkbage](https://github.com/sebmarkbage) in [#34850](#34850)) * Filter out built-in stack frames ([sebmarkbage](https://github.com/sebmarkbage) in [#34828](#34828)) * Exclude Suspense boundaries in hidden Activity ([eps1lon](https://github.com/eps1lon) in [#34756](#34756)) * Group consecutive suspended by rows by the same name ([sebmarkbage](https://github.com/sebmarkbage) in [#34830](#34830)) * Preserve the original index when sorting suspended by ([sebmarkbage](https://github.com/sebmarkbage) in [#34829](#34829)) * Don't show the root as being non-compliant ([sebmarkbage](https://github.com/sebmarkbage) in [#34827](#34827)) * Ignore suspense boundaries, without visual representation, in the timeline ([sebmarkbage](https://github.com/sebmarkbage) in [#34824](#34824)) * Explicitly say which id to scroll to and only once ([sebmarkbage](https://github.com/sebmarkbage) in [#34823](#34823)) * devtools: fix ellipsis truncation for key values ([sophiebits](https://github.com/sophiebits) in [#34796](#34796)) * fix(devtools): remove duplicated "Display density" field in General settings ([Anatole-Godard](https://github.com/Anatole-Godard) in [#34792](#34792)) * Gate SuspenseTab ([hoxyq](https://github.com/hoxyq) in [#34754](#34754)) * Release `<ViewTransition />` to Canary ([eps1lon](https://github.com/eps1lon) in [#34712](#34712))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This shows the title in the top corner of the rect if there's enough space.
The complex bit here is that it can be noisy if too many boundaries occupy the same space to overlap or partially overlap.
This uses an R-tree to store all the rects to find overlapping boundaries to cut the available space to draw inside the rect. We use this to compute the rectangle within the rect which doesn't have any overlapping boundaries.
The roots don't count as overlapping. Similarly, a parent rect is not consider overlapping a child. However, if two sibling boundaries occupy the same space, no title will be drawn.
We might also consider drawing the "Initial Paint" title at the root but that's less interesting. It's interesting in the beginning before you know about the special case at the root but after that it's just always the same value so just adds noise.