Skip to content

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Aug 19, 2025

Only implements document-order reveal for now (root order determines document order).
Doesn't handle what happens if new Suspense boundaries are added while stepping through timeline (e.g. Suspense within Suspense fallback).

Current implementation leverages input[type="range"] since that matches the final UX pretty closely. The styling is certainly not final.

This removes the scuffed Suspense treelist which will be replaced by Activity slices. The timeline and rects are a sufficient replacement for debugging.

CleanShot.2025-08-19.at.21.24.56.mp4

@meta-cla meta-cla bot added the CLA Signed label Aug 19, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Aug 19, 2025
@eps1lon eps1lon changed the title [DevTools] Scuffed version of Suspense timeline [DevTools] Initial version of Suspense timeline Aug 19, 2025
Only implements document-order reveal for now.
Doesn't handle what happens if new Suspense boundaries are added
while stepping through timeline.

Current implementation leverages `input[type="range"]` since
that matches the final UX pretty closely. The styling
is certainly not final.

This removes the scuffed Suspense treelist which
will be replaced by Activity slices. The timeline
and rects are sufficient replacement for debugging.
@eps1lon eps1lon force-pushed the sebbie/08-19-_devtools_scuffed_version_of_suspense_timeline branch from 01ad906 to 7957356 Compare August 20, 2025 09:00
@eps1lon eps1lon force-pushed the sebbie/08-19-_devtools_scuffed_version_of_suspense_timeline branch from 7957356 to 71aba15 Compare August 20, 2025 09:06
@eps1lon eps1lon requested review from sebmarkbage and hoxyq August 20, 2025 09:07
@eps1lon eps1lon marked this pull request as ready for review August 20, 2025 09:07
Comment on lines +100 to +103
if (value > max) {
// TODO: Handle timeline changes
setValue(max);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is not handled in handleChange func?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the change event it can't happen since that's constrained by the DOM. This is dealing with a change in the timeline on re-render e.g. you have 5 nodes, select the last one and then we re-render with only 4 nodes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Timeline changes need their own consideration. The timeline probably needs to live somewhere different. If we consider a document-order reveal, inserting a node before the milestone should immediately suspend it. But for random reveal, it's probably fine to just append the new node.

I feel like the timeline state is best kept in the renderer and then updates to the tree can be immediately reconciled with the timeline. Otherwise we have to reconcile the suspense tree, update it on the frontend, reconcile the timeline and send back the suspense overrides.

@eps1lon eps1lon merged commit 75dc002 into facebook:main Aug 25, 2025
244 checks passed
@eps1lon eps1lon mentioned this pull request Aug 25, 2025
@eps1lon eps1lon deleted the sebbie/08-19-_devtools_scuffed_version_of_suspense_timeline branch August 25, 2025 16:28
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