Visual Regression deterministically red after ca43e69f70: electron-chat-dark-sidebar baseline no longer matches the sidebar
維護者通常 3 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 半天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- github-actions, typescript
- 領域
- testing
研究方向
Start with the Visual Regression workflow and the sidebar assertion in apps/vscode-e2e/src/visual/electron.visual.ts, then check the provider/model scenario set in sceneController.ts (lines 105-109). Confirm the mismatch against the electron-chat-dark-sidebar.png baseline, then regenerate the VS Code visual baselines with the pinned VS Code version. Done when the Visual Regression workflow passes on main with the regenerated images. The request to require baseline updates for sidebar-visible model/provider changes is a policy question for maintainers, not part of this fix.
由索引模型根據 Issue 內容生成。
描述
What happens
The Visual Regression workflow now fails on every branch, including branches that touch no UI code. The failing assertion is the sidebar screenshot in apps/vscode-e2e/src/visual/electron.visual.ts (electron-chat-dark-sidebar.png; the masks cover only the token-count and message-time regions). The Playwright annotation reports 397 pixels (ratio 0.01 of all), and the highlighted region sits directly under the task title (bounding box x 17..125, y 85..141 in the crop).
Deterministic, not flaky
- Across three separate runs the produced
actual.pngis byte-identical and the produceddiff.pngis byte-identical, and theexpected.pnginside the artifact is byte-identical to the committed baseline. The mismatch is stable; the committed baseline is what no longer fits. - Decoding the diff image ourselves yields exactly the 397 highlighted pixels the annotation reports.
- Newest 30 runs of the workflow: 27 completed, 27 failed (100%), across 16 different branches, none of which edit
apps/vscode-e2e.
Where it starts
- Last green: run
45545919003, completed 2026-11-25T04:31:57Z. First red: run45548006445, created 2026-11-25T04:37:04Z. The onlymaincommit inside that bracket isca43e69f700173e7a238f4c19d21f18d485d0006("Retire Gemini CLI, correct OpenRouter costs, and verify provider usage", #2673, committed 04:20:55Z). - That commit touches no file under
apps/vscode-e2e, no.png, and not the pinned VS Code version the workflow installs. It does change provider/model selection surfaces (src/api/providers/openrouter.ts,webview-ui/src/components/settings/utils/useSelectedModel.ts) and removespackages/types/src/providers/gemini-cli.ts. - The scenario pins provider
openrouterwith modelopenai/gpt-4.1against the aimock base URL (sceneController.ts105-109), so the changed row is model/provider metadata in the sidebar. - The baselines were last regenerated in
e943530c84(#2223, 2026-11-05); earlier changes that altered visible UI shipped with regenerated baselines.
What we ask
- Regenerate the VS Code visual baselines against the current sidebar, or otherwise re-anchor them, so the suite stops reporting a stable mismatch as a regression.
- Consider requiring regenerated baselines whenever a change alters sidebar-visible model/provider metadata. Today the visual red is uniform across all PRs, so a real UI regression cannot be told apart from the standing mismatch.
We are not proposing to change the test, the locators or the masks: the assertion is doing its job, and the artifact shows a stable produced image. Two unrelated lanes hit the same red, which is how we saw that it is shared rather than local.
baseline at upstream/main electron-chat-dark-sidebar.png 28,998 B sha256-16 47ad509b278ab68f
expected.png (artifact) 28,998 B sha256-16 47ad509b278ab68f (identical)
actual.png (3 runs identical) 133,131 B sha256-16 abe77509286af481
diff.png (3 runs identical) 37,347 B sha256-16 bb5dc9432ac755aa
artifact 15035141973 zip 18,227,047 B sha256-16 498d2d0335ae28d5
onset bracket: only main commit ca43e69f70 (PR #2673; 35 files, 1130+/167-, zero apps/vscode-e2e files, zero .png)
workflow id 290993158; newest 30 runs: 27 completed / 27 failed; 16 branches
A second, disjoint mismatch on the same screenshot
The 397-pixel measurement above describes rows 85..142 of the 300x743 capture - directly under the task title, which matches the recorded bounding box. A second, disjoint mismatch was measured on two heads of our chain at rows 237..309: there the check reports 5061 pixels (ratio 0.03 of all image pixels) are different, and a per-pixel ARGB scan of the uploaded artifact places every differing pixel inside that one band (2,308 / 6,229 / 3,768 / 1,600 when bucketed by 25 rows). That band is the task-completion actions row - the "See New Changes" and "Restore Changes" buttons plus the mask block directly beneath it.
Measurement rules, written out so the numbers are not mixed: Playwright reports 397 and 5,061 under its own antialiasing threshold; a strict per-pixel ARGB inequality scan of the same two pairs yields 734 and 13,905. The two row ranges are disjoint, and both runs carry the same stored expectation - expected.png, 28,998 B, sha256-16 47ad509b278ab68f, byte-identical to the committed file in this repository - so one baseline is currently failing in two independent places.
Provenance of the lower band: job 139687440589 (2026-11-26) and job 133379248501 (2026-11-16). Across those two runs, ten days and four main commits apart, the artifacts' actual.png (32,757 B, sha256-16 b8b22a6a12682140), diff.png (26,863 B, 953f705b200bd60e) and expected.png are byte-identical, and their error-context.md files report the same 5,061 line. The strings for those buttons exist only in webview-ui/src/i18n/locales/en/chat.json, and git log -S"See New Changes" over the base tip and over the tested head returns the same four commits; the one that introduced them is 0084cc8991 (2026-06-25, "Add completion change actions", PR 633). PR numbers here carry no leading hash on purpose, so this edit creates no new cross-references; the SHAs are the citations.
Recorded as an open question rather than answered: in the run described in the first section, rows 237..309 do not differ at all - only rows 85..142 do. The size and location of the mismatch depend on which head is under test; its existence does not. What makes each band drift is a separate question from why nothing reports either of them.
The onset bracket covers one band, not the whole problem
The bracket in "Where it starts" (last green run 45545919003, completed 2026-11-25T04:31:57Z; first red run 45548006445, created 2026-11-25T04:37:04Z; only main commit in between: ca43e69f700173e7a238f4c19d21f18d485d0006) brackets the newest runs of this workflow, and it lines up with the rows 85..142 mismatch. It does not cover the second band: on our branch the same assertion, the same snapshot and the same locator were already failing with the 5,061-pixel band on 2026-11-16 (job 133379248501, run 43890267172), nine days before ca43e69f70. The bracket is therefore the onset of one band, not of the sidebar-baseline problem.
Why nothing on main reports either band
.github/workflows/visual-regression.yml is triggered by workflow_dispatch and pull_request only - there is no push trigger - and the file records that there is deliberately no paths filter, because the workflow backs the required webview-visual check. So extension-host-visual never runs against main: a baseline can drift against main's own UI code, nothing on main reports it, and every later pull request that comes near that UI inherits a red check it did not cause and has to spend a round explaining it. The job pins its environment - Playwright container pinned by image digest (playwright:v1.64.1-noble@sha256:47b510dd…), VS Code version taken from @types/vscode and cached under that version key, LANG/LC_ALL/TZ fixed, CSS animations disabled during capture, fonts awaited - which is consistent with the byte-identical renders across ten days: the render is stable, the stored expectation is what disagrees with the code.
One addition to "What we ask": run this job against main, on push or on a schedule, so drift is detected where it happens instead of being paid for by unrelated pull requests. Items 1 and 2 above already cover regeneration; without a main run, regeneration has no signal telling it when it is needed.
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 301
- 平均合併
- 3 天 14 小時
- 30 天內合併 PR
- 103
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Zoo-Code-Org/Zoo-Code 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 則留言 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
維護者通常 3 天內回覆
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on Windows可能已有人在做 @easonLiangWorldedtech 於 16 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
維護者通常 3 天內回覆
-
[BUG] search_files hides matching text on long lines可能已有人在做 @DananjayaNadun 於 9 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 則留言 · 已指派 1 人 ·
維護者通常 3 天內回覆
查看 Zoo-Code-Org/Zoo-Code 的全部 Issue
相似的 Issue
-
enhancement
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
ci
難度 2/5 1-3 小時 新手友好度 78/100
ClickHouse/clickhouse-js#1248 ·
維護者通常 1 天內回覆
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechselt未關閉technik
難度 2/5 1-3 小時 新手友好度 78/100
-
bug
難度 2/5 1-3 小時 新手友好度 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
維護者通常 1 天內回覆
-
enhancement good first issue
難度 2/5 1-3 小時 新手友好度 84/100
AhmedNAgy25/analysor#25 ·
維護者通常 1 天內回覆