webviews: composer-type-scale reads its variants four pages at a time
Summary
webviews/test/composer-type-scale.test.ts timed out on react-apps-check (#23414, job 119233725566: "TIMEOUT test/composer-type-scale.test.ts (limit 120s)" after 32 of 41 tests). The cause is wall time, not a hang:
- The file checks 41 gallery states one at a time. Each opens a fresh page (a fresh browser context), which loads about 700 unbundled dev-server modules again: about 2.2 s per state. The stage's own quiet-window wait is only 250 ms of that.
- Before the states run, a cold warm-up takes about 30 s.
- No single commit is behind it. The list grew from 33 states (10-15) to 41, and the total crept past the runner's 120 s per-file limit.
The fix: four pages now read states at once, each state still in its own page. Each test awaits its own result, so a failure still names its state. The timeout is unchanged.
Not done: one shared browser context would add the HTTP cache, but it saved only 3 s and leaked storage between states (slash-menu failed), so each page keeps its own context.
Testing
Huge Blue, 32 cores, load 10โ23, CMUX_BROWSER_TESTS=1 bun test test/composer-type-scale.test.ts:
| alone | next to 5 other browser test files | |
|---|---|---|
| base (ba108dc720a) | 173 s, 122 s | 134 s |
| this PR | 74 s, 73 s, 73 s, 79 s | 78 s, 84 s |
All 41 pass in every run. A -t slash-menu filtered run also passes. bun run lint is clean.
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Stops webviews/test/composer-type-scale.test.ts from timing out by reading its 41 gallery states in parallel instead of one at a time.
- Each state previously opened a fresh page (~2.2 s after a ~30 s warm-up), running 122โ173 s past the runner's 120 s limit.
- Four pages now read states concurrently, each state still in its own page, and each test awaits its own result so a failure still names its state.
- A shared browser context was rejected: it saved only ~3 s and leaked storage between states.
Agent session: huge-blue
๐ค Generated with Claude Code