fix(react-devtools): count render work across sibling subtrees

PL
2h ago
+114-45

Summary

Fixes #5401. React DevTools reports the largest independently updated subtree as the commit duration. The profiler now sums each fiber’s self time into workMs, including unnamed fibers. The summary, commit ranking, and slow-commit findings use total work. Commit JSON preserves the original durationMs. Saved recordings use the same calculation.

Before / after

I recorded three sibling state updates in one synchronous React DOM commit and compared the same recording on base and head.

React / DevToolsPrevious render totalNew render totalCommits over 16 ms
18.3.1 / 6.1.59.837 ms27.825 ms0 → 1
19.2.0 / 7.0.19.484 ms27.646 ms0 → 1

The second recording’s fiber self times were 9.423, 9.117, and 9.106 ms. The regression test exercises profile stop and saved commit readback with those timings.

Validation

Tested 14964123ac7ea1fd30c1717d46c7f7454d121429 on Linux. The build, type check, lint, formatting, layering, Fallow, documentation checks, and 440 related tests passed. The built CLI returned both metrics for both recordings.

The full unit run had 22,949 passes, 73 skips, and 11 failures. I reran the five affected test files on unchanged base 202d135063 and confirmed the same 11 failures. The local affected-check receipt records failure at the unit stage. Hosted CI is pending.


Test this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.