Skip to content

Conversation

@sebmarkbage
Copy link
Collaborator

Right now it's possible for things like server environments to appear before other content in the timeline just because it's in a different document order.

Ofc the order in production is not guaranteed but we can at least use the timing information we have as a hint towards the actual order.

Unfortunately since the end time of the RSC stream itself is always after the content that resolved to produce it, it becomes kind of determined by the chunking. Similarly since for a clean refresh, the scripts and styles will typically load after the server content they appear later. Similarly SSR typically finishes after the RSC parts. Therefore a hack here is that I artificially delay everything with a non-null environment (RSC) so that RSC always comes after client-side (Suspense). This is also consistent with how we color things that have an environment even if children are just Suspense.

To ensure that we never show a child before a parent, in the timeline, each child has a minimum time of its parent.

@sebmarkbage sebmarkbage requested a review from eps1lon October 29, 2025 18:52
@meta-cla meta-cla bot added the CLA Signed label Oct 29, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 29, 2025
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