react/fixtures
Sebastian Markbåge 2a911f27dd
[Flight] Send the awaited Promise to the client as additional debug information (#33592)
Stacked on #33588, #33589 and #33590.

This lets us automatically show the resolved value in the UI.

<img width="863" alt="Screenshot 2025-06-22 at 12 54 41 AM"
src="https://github.com/user-attachments/assets/a66d1d5e-0513-4767-910c-5c7169fc2df4"
/>

We can also show rejected I/O that may or may not have been handled with
the error message.

<img width="838" alt="Screenshot 2025-06-22 at 12 55 06 AM"
src="https://github.com/user-attachments/assets/e0a8b6ae-08ba-46d8-8cc5-efb60956a1d1"
/>

To get this working we need to keep the Promise around for longer so
that we can access it once we want to emit an async sequence. I do this
by storing the WeakRefs but to ensure that the Promise doesn't get
garbage collected, I keep a WeakMap of Promise to the Promise that it
depended on. This lets the VM still clean up any Promise chains that
have leaves that are cleaned up. So this makes Promises live until the
last Promise downstream is done. At that point we can go back up the
chain to read the values out of them.

Additionally, to get the best possible value we don't want to get a
Promise that's used by internals of a third-party function. We want the
value that the first party gets to observe. To do this I had to change
the logic for which "await" to use, to be the one that is the first
await that happened in user space. It's not enough that the await has
any first party at all on the stack - it has to be the very first frame.
This is a little sketchy because it relies on the `.then()` call or
`await` call not having any third party wrappers. But it gives the best
object since it hides all the internals. For example when you call
`fetch()` we now log that actual `Response` object.
2025-06-23 10:12:45 -04:00
..
art Bump canary versions to v19-canary (#28646) 2024-03-26 15:31:57 -04:00
attribute-behavior React DOM: Add support for Popover API (#27981) 2024-05-20 22:01:39 +02:00
concurrent/time-slicing Bump follow-redirects from 1.15.4 to 1.15.6 in /fixtures/concurrent/time-slicing (#28572) 2024-03-18 11:56:04 -04:00
devtools Rename "next" prerelease channel to "canary" (#26761) 2023-05-03 12:10:32 -04:00
dom Add dispatchEvent to fragment instances (#32813) 2025-05-07 14:00:59 -04:00
eslint-v6 feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -04:00
eslint-v7 feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -04:00
eslint-v8 feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -04:00
eslint-v9 feat(eslint-plugin-react-hooks): merge rule from eslint-plugin-react-compiler into react-hooks plugin (#32416) 2025-03-12 21:43:06 -04:00
expiration Bump browserify-sign from 4.0.4 to 4.2.2 in /fixtures/expiration (#27600) 2023-11-01 19:31:28 +00:00
fiber-debugger Rename yarn start to yarn dev and yarn start:prod to yarn start (#26209) 2023-02-21 14:18:21 -05:00
fizz Clear bundler cache before bundling fixtures (#33426) 2025-06-03 21:10:13 +02:00
fizz-ssr-browser [UMD] Remove umd builds (#28735) 2024-04-17 11:15:27 -07:00
flight [Flight] Send the awaited Promise to the client as additional debug information (#33592) 2025-06-23 10:12:45 -04:00
flight-esm Clear bundler cache before bundling fixtures (#33426) 2025-06-03 21:10:13 +02:00
flight-parcel [Flight Parcel] Implement findSourceMapURL (#32294) 2025-02-04 14:17:13 -05:00
legacy-jsx-runtimes Bump braces from 3.0.2 to 3.0.3 in /fixtures/legacy-jsx-runtimes (#29844) 2024-06-11 11:36:36 -04:00
nesting docs: fix typo in fixtures/nesting/README.md (#27507) 2024-04-06 19:11:19 +02:00
owner-stacks Clear bundler cache before bundling fixtures (#33426) 2025-06-03 21:10:13 +02:00
packaging Bump browserify-sign from 4.0.4 to 4.2.2 in /fixtures/packaging/brunch/prod (#27598) 2023-11-01 19:30:25 +00:00
scheduler [flags] Delete enableSchedulerDebugger (#31826) 2024-12-18 13:29:22 -05:00
ssr Replace Implicit Options on SuspenseList with Explicit Options (#33424) 2025-06-03 17:40:30 -04:00
ssr2 Bump canary versions to v19-canary (#28646) 2024-03-26 15:31:57 -04:00
stacks Bump braces from 3.0.2 to 3.0.3 in /fixtures/stacks (#29843) 2024-06-11 11:35:40 -04:00
view-transition [Fizz] Ignore error if content node is gone before reveal (#33531) 2025-06-20 14:21:57 +02:00