Repository navigation
test(mentions): serve the mentions fixture as a build so cold loads fit - #2776
Conversation
Flake check (chromium, 5/9) on PR 2396 failed mentions.spec.mjs:34 in its third repeat with "page.goto: Timeout 15000ms exceeded" while loading tests/fixtures/mentions.html. The trace shows the page already rendered but its load event not yet fired. Each test in the file started its own dev server, which served the fixture as about 1,590 modules, and Tailwind's globals.css alone took 9.3 s to transform. The same cold-load timeout hit dev-served fixture pages on unrelated branches, mostly in Flake check lanes. Build the page once in beforeAll and serve it with build and preview from vite-server.mjs, as voice-notes.spec.mjs has done since #2566. A cold load is now 10 requests. The build keeps development React, so StrictMode's checks still apply. No assertions change, and the navigation timeout is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matt Toohey <contact@matttoohey.com>
28fa666 to
19ed67c
Compare
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord’s automated source review through Wes’s account, integrating independent Rocket, Mantis and Groot review lanes.
No actionable defects found in the fixture-serving change. The four browser cases, assertions, URL modes and navigation budget are retained. The change reuses the existing build/preview helpers and voice-notes lifecycle pattern, while browser contexts and mutable fixture state remain isolated.
Reviewed head 19ed67c0e544a3b6fc3481fad834af64b3d7fba0, target base 3bcf1c4bb1111d924a84d9b710c1da2db80ccf0b, merge-base fd21dba4af2edf63d7b038e3f0f6bdf3703b5df7.
Hosted evidence is now available beyond the PR description’s local measurements: CI run 42217003622 succeeded on synthetic merge d306214cf471dcc891d3faabaae6c5bddc7a4b4d. Its flake-check timing artifacts record all four mentions cases repeated ten times with two workers:
| Engine | Passed | Elapsed wall time | Summed test execution | Slowest case |
|---|---|---|---|---|
| Chromium | 40/40 | 142.6 s | 198.5 s | 11.0 s |
| WebKit | 40/40 | 166.9 s | 247.6 s | 17.6 s |
Both reports have zero failures, skips or flaky results. The slowest case in each is the namesake-selection/publication journey; mentions.spec.mjs is the only selected file. The linked earlier failure log corroborates the 15-second navigation timeout, but its different test selection is not a controlled before/after cost comparison.
Source review and existing CI artifact inspection only: we did not execute the PR or reproduce its local benchmark/fault-injection measurements. These successful repetitions do not prove that every intermittent timeout is eliminated.
…leanup * origin/main: test(mentions): serve the mentions fixture as a build so cold loads fit (#2776) test(browser): let a late publication land after its page closed (#2565) test(relay): wait for the verified owner before a guest edits an agent (#2413) test: wait for the companion default width measurement (#2750) test(browser): preserve conversation scroll while revealing actions (#2715) test(browser): wait for link hit-testing after thread close (#2792) perf(messages): skip micromark for plain prose bodies (#2780) perf(inbox): load the emoji name table on first use (#2774) perf(messages): cut main-thread work while a busy channel is open (#2729) Refine agent Attention cards, watch details, and status controls (#2717) fix(bestie): remove a Bestie from its agent card on any device (#2720) feat(agents): preview Builderlab agent card links with Add to Buzz (#2719)
Co-authored-by: Eva <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Co-authored-by: Tyler Longwell <tlongwell@squareup.com> Signed-off-by: Tyler Longwell <tlongwell@squareup.com> * origin/main: test(messages): wait for the row measurement frame before thread catch-up dwell (#2837) Keep agent coordination history readable after work finishes (#2454) test(mentions): serve the mentions fixture as a build so cold loads fit (#2776) test(browser): let a late publication land after its page closed (#2565) test(relay): wait for the verified owner before a guest edits an agent (#2413) test: wait for the companion default width measurement (#2750) test(browser): preserve conversation scroll while revealing actions (#2715) test(browser): wait for link hit-testing after thread close (#2792) perf(messages): skip micromark for plain prose bodies (#2780) perf(inbox): load the emoji name table on first use (#2774) perf(messages): cut main-thread work while a busy channel is open (#2729) Refine agent Attention cards, watch details, and status controls (#2717) fix(bestie): remove a Bestie from its agent card on any device (#2720) feat(agents): preview Builderlab agent card links with Add to Buzz (#2719) Restore macOS Cmd-W window closing when no tab handles it (#2443) Make agent transcripts quieter and link finished replies to activity (#2424)
…ve-enter * origin/main: (21 commits) Make drafts and sent part of Messages (#2728) fix(canvas): render every Canvas within the save limit (#2839) test(messages): wait for the row measurement frame before thread catch-up dwell (#2837) Keep agent coordination history readable after work finishes (#2454) test(mentions): serve the mentions fixture as a build so cold loads fit (#2776) test(browser): let a late publication land after its page closed (#2565) test(relay): wait for the verified owner before a guest edits an agent (#2413) test: wait for the companion default width measurement (#2750) test(browser): preserve conversation scroll while revealing actions (#2715) test(browser): wait for link hit-testing after thread close (#2792) perf(messages): skip micromark for plain prose bodies (#2780) perf(inbox): load the emoji name table on first use (#2774) perf(messages): cut main-thread work while a busy channel is open (#2729) Refine agent Attention cards, watch details, and status controls (#2717) fix(bestie): remove a Bestie from its agent card on any device (#2720) feat(agents): preview Builderlab agent card links with Add to Buzz (#2719) Restore macOS Cmd-W window closing when no tab handles it (#2443) Make agent transcripts quieter and link finished replies to activity (#2424) fix(channels): wrap unread conversation stepping around the sidebar (#2682) fix(navigation): let bare buzz:// open Buzz without a broken-link notice (#2718) ...
Co-authored-by: BuzzPRReviewAssistant1 <a581a7e8115222acdc32ffb14bfce55d48c24478d98e155f8eba126b69b83c7b@buzz.block.builderlab.xyz> * origin/main: (71 commits) test(activity): scope preview assertions to the request row (#2843) perf(search): fold people names once across palette keystrokes (#2570) fix(github): keep PR watches running when localStorage is full (#2699) Make drafts and sent part of Messages (#2728) fix(canvas): render every Canvas within the save limit (#2839) test(messages): wait for the row measurement frame before thread catch-up dwell (#2837) Keep agent coordination history readable after work finishes (#2454) test(mentions): serve the mentions fixture as a build so cold loads fit (#2776) test(browser): let a late publication land after its page closed (#2565) test(relay): wait for the verified owner before a guest edits an agent (#2413) test: wait for the companion default width measurement (#2750) test(browser): preserve conversation scroll while revealing actions (#2715) test(browser): wait for link hit-testing after thread close (#2792) perf(messages): skip micromark for plain prose bodies (#2780) perf(inbox): load the emoji name table on first use (#2774) perf(messages): cut main-thread work while a busy channel is open (#2729) Refine agent Attention cards, watch details, and status controls (#2717) fix(bestie): remove a Bestie from its agent card on any device (#2720) feat(agents): preview Builderlab agent card links with Add to Buzz (#2719) Restore macOS Cmd-W window closing when no tab handles it (#2443) ... Signed-off-by: Ravneet Arora <rarora@squareup.com>
…ime-hint * upstream/main: (26 commits) Make drafts and sent part of Messages (block#2728) fix(canvas): render every Canvas within the save limit (block#2839) test(messages): wait for the row measurement frame before thread catch-up dwell (block#2837) Keep agent coordination history readable after work finishes (block#2454) test(mentions): serve the mentions fixture as a build so cold loads fit (block#2776) test(browser): let a late publication land after its page closed (block#2565) test(relay): wait for the verified owner before a guest edits an agent (block#2413) test: wait for the companion default width measurement (block#2750) test(browser): preserve conversation scroll while revealing actions (block#2715) test(browser): wait for link hit-testing after thread close (block#2792) perf(messages): skip micromark for plain prose bodies (block#2780) perf(inbox): load the emoji name table on first use (block#2774) perf(messages): cut main-thread work while a busy channel is open (block#2729) Refine agent Attention cards, watch details, and status controls (block#2717) fix(bestie): remove a Bestie from its agent card on any device (block#2720) feat(agents): preview Builderlab agent card links with Add to Buzz (block#2719) Restore macOS Cmd-W window closing when no tab handles it (block#2443) Make agent transcripts quieter and link finished replies to activity (block#2424) fix(channels): wrap unread conversation stepping around the sidebar (block#2682) fix(navigation): let bare buzz:// open Buzz without a broken-link notice (block#2718) ... Signed-off-by: Cheng Peng <cheng@block.xyz> Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary These are fixes for three browser-journey flakes that are failing open PRs which don't touch the code under test. The change is test-only. No browser cases are added or removed, and no assertion is relaxed. The red `Browser journeys (chromium, 3/9)` / `(webkit, 4/14)` shards on most open PRs come from a different problem: `sidebar-geometry.spec.mjs:224` is broken on main. #2945 and #2946 already fix it, so this PR leaves it alone. ### 1. `channel-completion.spec.mjs`: cold dev-server load timed out **Evidence:** `Flake check` on #2935 failed `channel-completion.spec.mjs:7` on both engines with `page.goto: Timeout 15000ms exceeded` on `/tests/fixtures/mentions.html?channels&stream&test-controls` ([chromium](https://github.com/block/buzz-app/actions/runs/42317084302/job/128232679087), [webkit](https://github.com/block/buzz-app/actions/runs/42317084302/job/128232678918)). #2935 doesn't touch that page. **Cause:** this is the same cold load #2776 fixed for `mentions.spec.mjs`. Each test here started its own Vite dev server for the same ~1,600-module fixture. **Fix:** - `beforeAll` builds `mentions.html` once and serves it with `build`/`preview`, using the same config as `mentions.spec.mjs`. - The build keeps the dev server's CSS. Tailwind's optimizer and Vite's CSS minifier each round the 20/14 line-height token to `1.42857`, so line boxes become `19.99998px`. In WebKit that put the popup `4.03125px` above the composer, and the test asserts exactly `4`. I confirmed this locally: it fails 5/5 with either setting left on and passes with both off. Turning both off keeps the geometry the test checked before. ### 2. `profiles.spec.mjs:940`: reopening Members right after closing the profile **Evidence:** `Flake check (webkit, 8/9)` on #2909 failed in repeat 8 of 10 ([job](https://github.com/block/buzz-app/actions/runs/42313241314/job/128219877861)). The trace shows this sequence: 1. `Escape` closes the profile panel. 2. Focus returns to "Manage members of One" within 40ms. 3. `Enter` is pressed 10ms later. 4. The DOM after that `Enter` shows the Profile panel again and no Members dialog, so the next `row.click` times out. **Fix:** after each `Escape`, wait for the address to leave the profile (no `"detail"` in the `#buzz=` hash) before reopening Members. This is a lifecycle barrier, not a delay. One step in this test already waited for the panel to unmount before reopening; the other steps didn't wait at all. **Product follow-up (not fixed here):** the order of a dismissal's history return and a quick reopen matters. - If I delay `history.go` by 300ms, the unpatched test takes a different path: the dismissal's `go(-1)` never runs, and the URL stays on the profile visit under the reopened dialog. - A `browser-history` unit sketch (deferred traversal: `push(channel)`, `push(panel)`, `dismiss([panel])`, then `push(settings)` before the traversal commits) lands on `channel`. The new `settings` visit is undone. Someone who owns navigation should decide whether a push during a pending dismissal return should be deferred or replayed. That is a navigation-history change, not a test fix. ### 3. `timeline.mjs` `edge()`: one wheel gesture stopped short **Evidence:** `Browser journeys (webkit, 6/14)` on #2937 failed `history-prefix.spec.mjs:37` with `wheel reaches timeline edge`, `Received: 199` ([job](https://github.com/block/buzz-app/actions/runs/42320781857/job/128244819852)). The trace shows the one `-3251px` wheel ended with `scrollend` and the geometry then held still, so the poll could never pass. **Fix:** `edge()` repeats the gesture, at most four times, until the edge is reached. Every extra gesture must reduce the distance, so an immobile timeline still fails. `upper()` already follows this rule. The case of already being at the edge is unchanged: it still sends one small wheel so production can start paging. ## Not in this PR, from the same survey of the 40 most recently updated open PRs - `sidebar-geometry.spec.mjs:224` (Drafts & sent row) is broken on main since #2733 + #2728 crossed. #2945 is green and #2946 is in CI; either one fixes it. - `solo-chats.spec.mjs:322` (Share, webkit, on #2927) is being handled in draft #2933. - `layout.spec.mjs:803` on #2916 is already fixed on main by #2750. #2916's merge ref predates it. - #2911 (thread virtualization) and #2918 (per-channel notifications) fail consistently in tests their own changes reach, so those look like regressions for their authors, not flakes. ## Validation All runs were local on macOS with `tests/browser/playwright.ci.config.mjs` and `--no-deps`. These are not hosted CI measurements. - `channel-completion.spec.mjs`, `--repeat-each=5`, both engines: 20/20 passed with the change. Before the CSS settings were added, the built fixture failed WebKit 5/5 (`4.03125`). - `profiles.spec.mjs:940`, `--repeat-each=24 --workers=6`, WebKit: passed. It also passed with `history.go/back/forward` delayed by 300ms, in both engines. - `history-prefix`, `history-loading`, `scroll`, `timeline-setup` and `new-message-boundary` (all callers of `edge()`/`end()`), both engines: 70/70 passed. - Full `history-prefix`, `channel-completion` and `profiles` files, both engines: 43/44 passed. The one failure was `profiles.spec.mjs:6` in WebKit, a test this PR doesn't touch. It then passed 4/4 both with and without this change. **Deferred and remaining gaps:** - I couldn't reproduce the cold-load timeout or the WebKit stopping short locally, so I have no local fail-before for those two. The evidence is the CI traces linked above. - The other `edge()` callers (24 spec files) are left to CI. - A green run doesn't prove these flakes are gone. Signed-off-by: Bradley Axen <baxen@squareup.com> Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
…#2793) ## Summary `typeahead.spec.mjs` now builds its four fixture pages (`mentions`, `typeahead`, `emoji` and `messages`) once per worker in `beforeAll`. It serves the bundle with `build` and `preview` from `vite-server.mjs`. Before this change, it took its `baseURL` from the worker-scoped Vite dev server in `source-fixture.mjs`. The change is test-only: no assertions change, the navigation timeout is unchanged, and no browser cases are added or removed. ### Problem `Flake check (chromium, 11/11)` on #2507 failed `typeahead.spec.mjs:28` "closing-colon emoji conversion restores literal source and caret on undo" twice, with `TimeoutError: page.goto: Timeout 15000ms exceeded` on `/tests/fixtures/mentions.html?test-controls`. Both times it was the first test in the shard's second worker (16.4 s and 16.6 s), and the same worker's next 23 tests passed. #2507 doesn't touch that page's module graph; its `MessageRow` change only selects this spec into the 10× lane. - https://github.com/block/buzz-app/actions/runs/42195228817/job/127817183790 - https://github.com/block/buzz-app/actions/runs/42169660635/job/127734602256 ### Cause The dev server transforms modules on first request. The four pages this spec opens are 1,595 modules, and `mentions.html` alone is 1,589. Whichever page a worker opened first loaded them cold, and on a busy runner that took longer than the 15 s navigation timeout. #2776 describes the same cold load for `mentions.spec.mjs`, and lists this spec under "Remaining gaps". ### Fix - **Build:** `beforeAll` builds the four pages into a temp directory, and `preview` serves them on an OS-assigned port. `afterAll` closes the server and removes the directory. The config matches `voice-notes.spec.mjs` (#2566) and #2776. - **Dev checks kept:** the build defines `import.meta.env.DEV` and `process.env.NODE_ENV` as development, so StrictMode's checks still apply. - **Paths unchanged:** `test.use` points `baseURL` at the preview server, so every `page.goto` path stays the same. - **No conflict with #2776:** only this spec changes, so #2776 still merges cleanly. Once both land, the three copies of the build config could become one helper. ### Validation All runs were local on macOS (16 cores, load average 10–41) with the Playwright CI config. These are not hosted CI measurements. **Fail-before / pass-after.** A temporary `vite-server.mjs` probe (not committed) held the `globals.css` transform for 16 s, in both the dev server and the build: | | main | this branch | | --- | --- | --- | | `:28` (moves to `:83` on this branch) | ✘ `page.goto: Timeout 15000ms exceeded` (Chromium 15.1 s, WebKit 19.8 s) | ✓ 0.96 s Chromium, 0.97 s WebKit | | first `typeahead.html`, `emoji.html`, `messages.html` journeys | ✘ same error, 15.1 s each (Chromium) | ✓ 0.5–1.4 s | | whole file | n/a | 24/24, with the 16 s spent once in `beforeAll` | **Repeat run.** Chromium `--repeat-each=10 --workers=2`, two alternating runs each: | | result | wall time | user CPU | first test per worker | | --- | --- | --- | --- | --- | | main | 240/240 | 3.2 and 3.3 min | 839 s and 855 s | 4.2–4.8 s | | this branch | 240/240 | 2.0 and 1.9 min | 352 s and 339 s | 0.9 s | **Other checks:** - **Full file:** Chromium 24/24, WebKit 24/24. - **`scripts/flake-check.mjs select`:** I ran it for #2507's diff, a `MessageRow.tsx`-only change, `tests/fixtures/mentions.tsx` and `tests/fixtures/mentions.html`. Every selection matches main's, apart from the spec's 55-line shift. The spec still links to all four pages. - **Integration tests:** `tests/integration/flake-check.test.mjs` and `tests/integration/vite-fixture.test.mjs` pass 33/33. - **Biome:** clean. ### Browser coverage No browser cases are added or removed and no assertions change. Only how the fixture pages are served changes. ### Remaining gaps - **Other specs:** specs that load `mentions.html` from `source-fixture.mjs` or their own dev servers can still hit the same cold load. These include `channel-completion`, `completion-work`, `composer-*`, `mention-edit`, `mention-rules` and `mention-selection`. They are not changed here. - **Hosted CI:** it hasn't run on this branch yet, and a green run wouldn't show the flake is gone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
mentions.spec.mjsnow buildstests/fixtures/mentions.htmlonce inbeforeAlland serves the bundle withbuildandpreviewfromvite-server.mjs. Before this change, each of its four tests started its own Vite dev server. This is the same fix #2566 made forvoice-notes.spec.mjs. The change is test-only: no assertions change, the navigation timeout is unchanged, and no browser cases are added or removed.Problem
Flake check (chromium, 5/9)on #2396 failedmentions.spec.mjs:34"actual composer selects namesakes by exact key…" in repeat 3 withTimeoutError: page.goto: Timeout 15000ms exceededat :57. #2396 changes only a comment in this spec.The same cold-load timeout hit dev-served fixture pages on unrelated branches between 2026-11-05 20:10Z and 2026-11-06 08:10Z. All but one of those failures were in Flake check lanes, which repeat each related test 10 times:
mentions.htmlviamention-edit.spec.mjs:3(peon/profile-disk-cache): https://github.com/block/buzz-app/actions/runs/42134373233/job/127621615224mentions.htmlviacompletion-work,composer-recipientsandmention-rules(WebKit, morganm/verified-only-people-search): https://github.com/block/buzz-app/actions/runs/42135492502/job/127624304447mentions.htmlviachannel-completion.spec.mjs(am-115-attention): https://github.com/block/buzz-app/actions/runs/42146757907/job/127660281707mentions.htmlviatypeahead.spec.mjs:28(broken-8): https://github.com/block/buzz-app/actions/runs/42169660635/job/127734602256conversation.html,profiles.htmland/on tho/plugin-member-picker, nexus/add-native-claude-execution-on-blo and peon/r3-header-membersCause
The failing trace shows the page already rendered (composer and toolbar in the snapshot), but its
loadevent had not fired. The per-test dev server served the fixture as 1,590 modules. Tailwind'sglobals.csstook 9.3 s to transform, and the module-by-module waterfall ran until the 15 s budget ran out. Meanwhile, the shard's other worker was runninghuddles.spec.mjs. The first repeat in the same worker passed, but took 26.1 s.Fix
beforeAllbuilds the fixture page into a temp directory, andpreviewserves it on an OS-assigned port.afterAllcloses the server and removes the directory.voice-notes.spec.mjs, the build definesimport.meta.env.DEVandprocess.env.NODE_ENVas development, so StrictMode's checks still apply.watch.ignoredoption is dropped, because a built page has no HMR. Tests 1–3 lose theirtry/finallyblocks, which only closed the server. Test 4 keeps itsfinallyforcontext.close(). Most of the diff is that re-indentation;git diff -wshows +57/−107.moduleGraphstill links the spec totests/fixtures/mentions.html.Validation
All runs were local on macOS (16 cores), Playwright CI config. These are not hosted CI measurements.
Fail-before / pass-after. A temporary
vite-server.mjsprobe (not committed) held theglobals.csstransform for 16 s in both the dev server and the build, the method #1971 used::34✘page.goto: Timeout 15000ms exceeded(16.9 s; CI's failure took 16.7 s):59(the same test) ✓ 3.5 s; the 16 s lands inbeforeAllCold navigation to
mentions.html?test-controls, Chromium, standalone probe:Full file:
--repeat-each=10 --workers=2: main 40/40 in 1.9 min (321 s user CPU); this branch 40/40 in 54.1 s (150 s user CPU).--repeat-each=5 --workers=2: Chromium 20/20 (43.7 s), WebKit 20/20 (48.7 s).tests/integration/vite-fixture.test.mjsandtests/integration/flake-check.test.mjs: 33/33.Browser coverage
No browser cases added or removed and no assertions changed. Only how the fixture page is served changes.
Remaining gaps
mentions.html,conversation.htmlorprofiles.htmlfrom their own dev servers can hit the same cold-load timeout (runs above). They are not changed here.🤖 Generated with Claude Code