fix(webviews): the agent-pane gallery test narrows its frame, so fast gates pass on base
check:browser-lanes fails on feat-cmux-next itself, which fails the Fast gates on the merge step for every PR whose merge touches webviews/. I hit it on #23131 and traced it to base, not to my branch.
The red
test/gallery-agent-pane-entries.test.ts:81: opens a gallery frame without entryPath, so it loads
every gallery entry; use galleryFrame(entry, params) and warmGalleryFrame(vite, entry) from
./support/galleryFrame, or say why it needs them all in a "// gallery-frame-every-entry: <reason>" comment
test/gallery-agent-pane-entries.test.ts:90: (same)
error: script "check:browser-lanes" exited with code 1
Two landed PRs are each fine alone, and the pair is red: #23237 (c1d4c231c63e7) added this test using the old frame.html?entry=… shape, and the support/galleryFrame helpers plus the lane check that requires them arrived separately. No one did anything wrong — this is the same cross-PR interaction shape as #23281/#23286 earlier today, where two individually-correct merges combine into a red.
Evidence it is base and not a branch of mine: the file is byte-identical to base in the worktree where I found it (git diff origin/feat-cmux-next -- webviews/test/gallery-agent-pane-entries.test.ts is empty), none of my commits touch it, and this branch is cut from origin/feat-cmux-next with that one file changed.
The fix
-import { warmViteServer } from "./support/warmDevServer";
+import { galleryFrame, warmGalleryFrame } from "./support/galleryFrame";
- const url = ({ entry, variant }: Case) =>
- `http://127.0.0.1:${…port}/gallery/frame.html?entry=agent-pane.${entry}&variant=${variant}`;
+ const origin = () => `http://127.0.0.1:${…port}`;
+ const url = ({ entry, variant }: Case) => origin() + galleryFrame(`agent-pane.${entry}`, { variant });
- await warmViteServer(vite, "/gallery/frame.html");
browser = await chromium.launch({ headless: true });
+ await warmGalleryFrame(vite, [...new Set(CASES.map((item) => `agent-pane.${item.entry}`))], { browser });
galleryFrame adds the entryPath that narrows the page to the file defining the entry, which is the whole point of the check it was failing: the bare frame starts every *.gallery.ts(x) file's load — about 2,300 modules — and warming it transforms them all again. That cold load is what timed out markdown-selection-drag (#23080).
Warm-up is now once per distinct entry (9) rather than once per case (13), because an entry's variants share its file and the frame's own modules are cached after the first load. The browser launches before the warm-up so it can be reused, rather than the helper starting a Chromium of its own.
Verification
bun run check:browser-lanes→Browser test lane imports checked.(it is the failing check, and it now passes)bun run checkinwebviews/— the whole gate CI runs, all green: layers, type-scale, status-glyphs, system-blue, text-focus, dialog-keys, switch-fetches, catalog-keys,vp check(2148 files correctly formatted,no warnings, lint errors, or type errors in 2080 files), acpmux protocol codegen current.
Observed / Not run
Observed: the two commands above; the CI failure itself in the fast gates log of #23131 (web lint failed on the merge with base fb47146247e7); git diff origin/feat-cmux-next on the test file, empty, proving the violation is base content; git log attributing the file to #23237; support/galleryFrame.ts read in full, which is where the per-entry warm-up and entryPath behavior above come from.
Not run: the browser test itself. gallery-agent-pane-entries.test.ts gates on requireBrowserLane and self-skips outside CI or a Freestyle VM, and I did not force it past that guard on this host. So the behavior change I cannot show locally is the warm-up: warmGalleryFrame fails the warm-up if a stage does not mount, where warmViteServer on the bare frame did not load the stages at all. If one of the nine agent-pane entries is already failing to mount, this PR surfaces it as a warm-up failure instead of a per-case failure. That is what this PR's own react-apps-check shard runs, and I am waiting for it to come back green before merging rather than merging on the lint check alone.
Changelog
none
🤖 Generated with Claude Code
Agent session: big-red
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the check:browser-lanes gate that fails on the base feat-cmux-next branch by updating the agent-pane gallery test to use the galleryFrame helper, which narrows the frame to the entry's file instead of loading every gallery entry.
- Warms up once per distinct entry instead of once per case, since an entry's variants share its file.