Visual Regression deterministically red after ca43e69f70: electron-chat-dark-sidebar baseline no longer matches the sidebar
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, typescript
- Ambito
- testing
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 2k
- Fork
- 301
- Merge medio
- 3g 14h
- PR unite (30g)
- 103
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Zoo-Code-Org/Zoo-Code
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Zoo-Code-Org/Zoo-Code#2773 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Zoo-Code-Org/Zoo-Code#2717 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
Zoo-Code-Org/Zoo-Code#2515 ·
I maintainer di solito rispondono entro 3 giorni
-
fix(scripts): stryker-diff.mjs spawns the extensionless .bin shim and cannot run on WindowsForse già presa @easonLiangWorldedtech l’ha presa 15 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Zoo-Code-Org/Zoo-Code#2514 ·
I maintainer di solito rispondono entro 3 giorni
-
[BUG] search_files hides matching text on long linesForse già presa @DananjayaNadun l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Zoo-Code-Org/Zoo-Code#2496 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di Zoo-Code-Org/Zoo-Code
Issue simili
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EPPIcenter/sampledb3#162 ·
-
Particle-1 modelAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
tashfeenahmed/freellmapi#2169 ·
I maintainer di solito rispondono entro 1 giorno
-
via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
🎙️ task - feat(mechanic): pave git.pull.close, a close of a superseded pull with its why on recordAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ehmpathy/rhachet-roles-ehmpathy#1576 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
vercel-labs/ui#1563 ·
I maintainer di solito rispondono entro 1 giorno