Skip to content

Conversation

eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Sep 10, 2025

Stacked on #34456

I wanted to make sure the recent Suspense tree in the backend didn't break older React versions. This revealed one reorder bug for normal elements that broke in c97ec75 which I'm attempting to fix in #34464

preprocessData and timelineProfiler tests are still failing. Both tests were codemodded to modern scheduler/unstable_mock APIs that we need to add a compat layer for but I won't do that here. Probably as a follow-up once the rest is green.

@meta-cla meta-cla bot added the CLA Signed label Sep 10, 2025
@eps1lon eps1lon changed the title Fix DevTools regression test actions and assertions Fix most DevTools regression test actions and assertions Sep 10, 2025
@eps1lon eps1lon changed the title Fix most DevTools regression test actions and assertions Fix some DevTools regression test actions and assertions Sep 10, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Sep 10, 2025
@react-sizebot
Copy link

react-sizebot commented Sep 10, 2025

Comparing: 47664de...f4e1b8c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 530.67 kB 530.67 kB = 93.49 kB 93.49 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 658.22 kB 658.22 kB = 115.79 kB 115.79 kB
facebook-www/ReactDOM-prod.classic.js = 682.38 kB 682.38 kB = 119.83 kB 119.83 kB
facebook-www/ReactDOM-prod.modern.js = 672.81 kB 672.81 kB = 118.14 kB 118.13 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against f4e1b8c

Comment on lines +137 to 138
// @reactVersion >= 16.6
it('should filter Suspense', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

<Suspense> was renamed from unstable_Placeholder in 16.6

Comment on lines +84 to +87
if (
semver.gte(ReactVersionTestingAgainst, '15.0.0') &&
semver.lt(ReactVersionTestingAgainst, '17.0.0')
) {
Copy link
Collaborator Author

@eps1lon eps1lon Sep 10, 2025

Choose a reason for hiding this comment

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

I don't trust how SemVer comparisons works with 0.0.0-experimental ranges so I flipped these branches to only use classic runtime for this particular range. The previousl else branch silently flipped to modern runtime when the defaults changed in Babel.

@eps1lon eps1lon force-pushed the sebbie/09-10-fix_devtools_regression_test_actions_and_assertions branch from 57847e4 to 1aa91f3 Compare September 10, 2025 16:18
Comment on lines +96 to +98
: existingNameElements[0].innerText
// remove trailing colon
.slice(0, -1);
Copy link
Collaborator Author

@eps1lon eps1lon Sep 10, 2025

Choose a reason for hiding this comment

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

Comment on lines +728 to +736
const isLegacySuspense = React.version.startsWith('17');
if (isLegacySuspense) {
expect(commitData[0].fiberActualDurations).toMatchInlineSnapshot(`
Map {
1 => 15,
2 => 15,
3 => 5,
4 => 3,
5 => 2,
Copy link
Collaborator Author

@eps1lon eps1lon Sep 10, 2025

Choose a reason for hiding this comment

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

Need to bisect where the additional node comes from. I suspect something legacy Suspense related similar to the other snapshot tests that had a <Lazy> show up.

Copy link
Collaborator Author

@eps1lon eps1lon Sep 10, 2025

Choose a reason for hiding this comment

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

Changed in 5bbf9be (#34062)

@eps1lon eps1lon requested a review from hoxyq September 10, 2025 20:01
@eps1lon eps1lon marked this pull request as ready for review September 10, 2025 20:01
`,
`
[root]
"[root]
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do these string brackets come from? Can this be solved via formatting? Because we don't append them in other test cases

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to switch to toEqual instead of using toMatchInlineSnapshot to be able to snapshot without the Suspense tree.

@eps1lon eps1lon force-pushed the sebbie/09-10-fix_devtools_regression_test_actions_and_assertions branch from d332d6a to f4e1b8c Compare September 13, 2025 09:52
@eps1lon eps1lon merged commit 3fa927b into facebook:main Sep 15, 2025
241 checks passed
@eps1lon eps1lon deleted the sebbie/09-10-fix_devtools_regression_test_actions_and_assertions branch September 15, 2025 14:00
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.

3 participants