From bd441821c8951653ad799ebb43805c3ffdd9ff0e Mon Sep 17 00:00:00 2001 From: probe Date: Sat, 24 Oct 2026 01:38:58 +0800 Subject: [PATCH] test(webui): compare the shell screenshot exactly The shell-and-rail screenshot was the only assertion in the package that allowed a difference: `maxDiffPixels: 2`. The allowance was never measured. The commit that added it (4d06e817) also changed the home greeting and the stacking order of the session-row actions. Neither renders into this screenshot. The greeting belongs to the home surface, and this case opens a session; the row actions are `opacity: 0` until their row is hovered or focused, and the case does neither. The baseline was regenerated on the runner's own Chromium at 5dd91b30 and has not been rewritten since, and PR #240's Linux browser gate passed this very baseline with no tolerance at all. Compare the screenshot exactly, the way the other nine baselines are compared. --- packages/webui/test/browser/visual-baselines.spec.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/webui/test/browser/visual-baselines.spec.mjs b/packages/webui/test/browser/visual-baselines.spec.mjs index 8c0128742..c28f8d924 100644 --- a/packages/webui/test/browser/visual-baselines.spec.mjs +++ b/packages/webui/test/browser/visual-baselines.spec.mjs @@ -36,7 +36,7 @@ test("shell and session rail layout baseline", async ({ page }) => { await expect.poll(() => page.locator('img[src^="/assets/"]').evaluateAll((images) => images.every((image) => image instanceof HTMLImageElement && image.complete && image.naturalWidth > 0), )).toBe(true); - await expect(shell).toHaveScreenshot("shell-and-rail.png", { animations: "disabled", maxDiffPixels: 2 }); + await expect(shell).toHaveScreenshot("shell-and-rail.png", { animations: "disabled" }); }); test("transcript and composer layout baseline", async ({ page }) => {