Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Oct 19, 2025

Stacked on #34929

Initial idea was to just filter on the frontend but this is hard to do with the reliance on node weights for virtualization. Removing the part below the slice is trivial since that's just collapsing but the part above is harder.

This implements the slices with a backend filter. During reconciliation, we keep track on the stack whether we're in the Activity slice or not. Activity at the boundaries are included. That way you see which slice you're looking at and have affordances to navigate further down.

Will add the Activity pane to the Components tab in a follow-up. Double clicking an Activity already switches to the slice view. The Activity will not own any Components anyway.

@meta-cla meta-cla bot added the CLA Signed label Oct 19, 2025
@eps1lon eps1lon force-pushed the sebbie/10-17-_devtools_activity_slices branch from 83ee7f9 to 4c7ddf7 Compare October 19, 2025 11:15
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 19, 2025
▾ <Layout>
<Activity name="/blog">
[suspense-root] rects={[{x:1,y:2,width:4,height:1}, {x:1,y:2,width:13,height:1}]}
<Suspense name="Unknown" rects={[{x:1,y:2,width:4,height:1}, {x:1,y:2,width:13,height:1}]}>
Copy link
Collaborator Author

@eps1lon eps1lon Oct 19, 2025

Choose a reason for hiding this comment

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

Name heuristic breaks once the Owner is filtered. Need to think about how to fix this. Only problematic when the Activity and Suspense share the same owner.

@eps1lon eps1lon force-pushed the sebbie/10-17-_devtools_activity_slices branch from 0ab7239 to fe34bef Compare October 19, 2025 11:52
@eps1lon eps1lon changed the title [DevTools] Activity slices in Suspense tab [DevTools] Apply Activity slice filter when double clicking Activity Oct 20, 2025
@eps1lon eps1lon force-pushed the sebbie/10-17-_devtools_activity_slices branch 2 times, most recently from 1e3e641 to ac9430f Compare October 20, 2025 00:21
@eps1lon eps1lon force-pushed the sebbie/10-17-_devtools_activity_slices branch from ac9430f to f8d9db4 Compare October 20, 2025 21:00
@eps1lon eps1lon requested a review from sebmarkbage October 20, 2025 21:03
@eps1lon eps1lon marked this pull request as ready for review October 20, 2025 21:04
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.

1 participant