ci: install only the headless Chromium shell - #5187
Open
orangeCatDeveloper wants to merge 1 commit into
Open
Conversation
The Storybook smoke always launches headless, and Playwright picks its executable by headedness, so the full Chrome build was downloaded on every Storybook-selected run and never opened. Generated-by: Claude Code
orangeCatDeveloper
force-pushed
the
ci/playwright-only-shell
branch
from
September 11, 2026 06:59
70c7b98 to
f349d78
Compare
me2seeks
approved these changes
Sep 11, 2026
me2seeks
left a comment
Contributor
There was a problem hiding this comment.
PR 5187 Review
结论
APPROVE
--only-shell 改动的消费方核实无误:ci.yml 该安装步骤只服务 storybook smoke(scripts/storybook-visual-smoke.mjs:391,headless: process.env.SMOKE_HEADED !== '1',CI runner 上恒为 headless),而 headed 的 scripts/perf/storybook.mjs:26(headless: false)由独立 workflow performance-frontend.yml:40 自己 playwright install chromium,不受本改动影响。Desktop e2e 用 Electron 自带 Chromium(apps/desktop/e2e/playwright.config.ts 不配 browserType),也不依赖系统 chromium 构建。
发现
无
不确定性(不发到 GitHub 的疑虑)
SMOKE_HEADED=1在 CI runner 上从此必失败(PR 描述已承认"only ever meaningful locally")。若有人真在 CI 里想开 headed 验证,需手工装完整 chromium——可接受,文档化于注释。- 注释中 "The headed consumer (perf/storybook.mjs) self-installs" 措辞上 perf 脚本本身不含 install 命令,是 perf workflow 自己装;不影响正确性。
✅ 对抗性审查(第一性原理 + 奥卡姆剃刀 + 证据核对)通过:未发现真实的 P0–P3 问题。@me2seeks 请把关是否 merge。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Storybook smoke always launches headless, and Playwright picks its executable
by headedness, so
playwright install chromiumdownloaded the full Chrome buildon every Storybook-selected run and never opened it.
--only-shellinstalls onlythe build the smoke uses.
No behavior change — the smoke was already launching
chromium-headless-shell.SMOKE_HEADED=1stops working on a runner; it was only ever meaningful locally,where developers install their own browsers.
Verification
Download per Storybook-selected run:
Before from job 102913386594 on
main, after from this PR's own run. The install after the change, and thesmoke's exact launch call against it:
Ran locally:
npm run format:check,node --test scripts/ci-workflow-policy.test.mjs(43 pass). Editing
ci.ymlselects every surface, so this PR's owntestrunexercises the changed step.
AI use
Select exactly one:
Tool(s) and scope: Claude Code found the unused download while profiling CI step
timings, wrote the change and ran the verification above. Codex (gpt-5.6-sol) and
a second independent Claude session reviewed the diff. Review below is human.
Checklist
install flag; a wrong flag fails the Storybook smoke outright
Does this PR entail a change in behavior?