fix(react-devtools): count render work across sibling subtrees
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 / DevTools | Previous render total | New render total | Commits over 16 ms |
|---|---|---|---|
| 18.3.1 / 6.1.5 | 9.837 ms | 27.825 ms | 0 → 1 |
| 19.2.0 / 7.0.1 | 9.484 ms | 27.646 ms | 0 → 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.

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