Skip to content

[pull] main from facebook:main#462

Merged
pull[bot] merged 6 commits intocode:mainfrom
facebook:main
Feb 3, 2026
Merged

[pull] main from facebook:main#462
pull[bot] merged 6 commits intocode:mainfrom
facebook:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 3, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

hoxyq and others added 6 commits February 3, 2026 12:44
Fixes #31463,
#30114.

When switching between roots in the profiler flamegraph, the commit
index was preserved from the previous root. This caused an error
"Invalid commit X. There are only Y commits." when the new root had
fewer commits than the selected index.

This fix resets the commit index to 0 (or null if no commits) when the
commitData changes, which happens when switching roots.
#35598)

Currently, IO that finished before the request started is not considered
IO:

https://github.com/facebook/react/blob/6a0ab4d2dd62dfdf8881ba1c3443c6d5acedc871/packages/react-server/src/ReactFlightServer.js#L5338-L5343
This leads to loss of debug info when a flight stream is deserialized
and serialized again.
We can solve this by allowing "when the the request started" to be set
to a point in the past, when the original stream started by doing

```js
const startTime = performance.now() + performance.timeOrigin
// ... stuff happens and time passes...
ReactServer.renderToReadableStream(..., { startTime })
```
Allows Server Components to import Context from a `"use client'` module
and render its Provider.

Only tricky part was that I needed to add `REACT_CONTEXT_TYPE` handling
in mountLazyComponent so lazy-resolved Context types can be rendered.
Previously only functions, REACT_FORWARD_REF_TYPE, and REACT_MEMO_TYPE
were handled.

Tested in the Flight fixture.

ty bb claude

Closes #35340

---------

Co-authored-by: Sophie Alpert <git@sophiebits.com>
@pull pull bot locked and limited conversation to collaborators Feb 3, 2026
@pull pull bot added the ⤵️ pull label Feb 3, 2026
@pull pull bot merged commit 6853d7a into code:main Feb 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments