webviews: the composer strip test loads its three entries alone, not the whole gallery (timeout flake)

Merged
TE
15d ago
+21-2

The flake: test/composer-location-strip.test.ts was killed at the runner's 120 s per-file limit after eight passing cases (job 119080446280). Nothing was stuck. Every page opened frame.html without entryPath, so each loaded all ~150 gallery entries (~2,300 modules), and warmViteServer(vite, "/gallery/frame.html") followed the registry's lazy glob into all of them before the first case. It's the same cause transcript-removals found for markdown-selection-drag (#23080).

The fix (test only, timeouts unchanged):

  • Every page names its entry file (entryPath) for the three entries the file opens: composer-strip, composer-context and new-tab.
  • The warm-up covers those three files and frame/agentPane.ts, which lazily imports acpmux/main. Without that last one, the first page compiled the agent pane cold, Vite's dep optimizer reran, and the mount failed with "Failed to fetch dynamically imported module". A warm-up that finds no imports throws, so a path mistake fails loudly instead of warming nothing.

CI (head 21386ca): all 24 cases ran in shard 4, taking 1.2 to 5 s each. Only the two "marks line up" cases failed; they are base reds and #22902 (merged) fixes them. The independent review passed. It caught that composer-context mounts through frame/component.tsx, so that file is warmed too.

Local runs (cmux16, heavily loaded):

  • Base: the frame warm-up passed its own 100 s limit and no case ran (368 s, 0 pass).
  • Head: 24 cases in 54 s.
  • The 3 cases that still fail are not this PR's. The two "marks line up" cases also fail on base CI and #22902 fixes them. "340 px folder cuts" passes on CI's Linux fonts and fails only on macOS fonts.

Agent session: cmux16

🤖 Generated with Claude Code


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


Summary by cubic

Fixes the composer location strip test timing out in CI by loading only its three entries instead of the entire gallery.

  • Each test page now names its entry file (entryPath) for the three entries the test opens, and the warm-up covers those files plus their mount hosts (frame/agentPane.ts and frame/component.tsx) instead of frame.html, whose registry loads all ~150 gallery entries (~2,300 modules).
  • A warm-up that compiles no imports now throws, so a wrong path fails loudly rather than warming nothing.
  • Locally the suite went from timing out during warm-up (368 s, 0 cases) to 24 cases in 54 s. The three cases that still fail are unrelated: the two "marks line up" cases fail on base CI too (#22902 fixes them), and "340 px folder cuts" only fails on macOS fonts.