Repository navigation
Web UI smoke: a screenshot that differs from its baseline is reported, not failed (#5931) - #5935
Merged
Merged
Conversation
erikdarlingdata
marked this pull request as ready for review
October 16, 2026 10:44
There was a problem hiding this comment.
Verdict: LGTM
Claims
- VERIFIED —
runShotsnow returns{ problems, shots }, with one{ name, differing, pct }per compared page — tools/ui-smoke/shots.mjs:135-240 (push at :226) - VERIFIED — a differing screenshot prints a NOTICE, still writes baseline/actual/diff images, and is not pushed to
problems— tools/ui-smoke/shots.mjs:227-230 - VERIFIED — the
update_baselinespath (UI_SMOKE_SHOTS=update) is untouched — tools/ui-smoke/shots.mjs:202-206 (unchanged branch) - VERIFIED —
smoke.mjsprints thescreenshots: N matched, M differ (advisory), K problemsline, compare mode only — tools/ui-smoke/smoke.mjs:232-236 - VERIFIED —
report.jsonis now{ pages, screenshotProblems, screenshots }— tools/ui-smoke/smoke.mjs:238 - VERIFIED — exit code logic unchanged: only page problems and
screenshotProblemsgive exit 1 — tools/ui-smoke/smoke.mjs:245 (failed.length || shotProblems.length) - VERIFIED — new "Screenshot compare summary" step is
if: always(), runs right after the smoke step, and readsreport.jsondirectly (nothing parsed from the log) — .github/workflows/darling-ui-smoke.yml:139-154 - VERIFIED — the existing
darling-ui-smokeupload step only had its display name changed; no new secrets/permissions/triggers, paths filter and draft skip untouched — diff shows only thename:line changed on that step,on:/permissions:blocks untouched - VERIFIED — the pre-existing
Upload screenshot differencesstep (if: failure(), artifactdarling-ui-smoke-screenshot-diffs) was deliberately left alone, and its images are already covered by the always-ondarling-ui-smokeartifact — confirmed no diff to that step (darling-ui-smoke.yml:189-196) and thatui-smoke\out\*(always-on upload) already includesshot-failures\*.png - UNVERIFIED — the dispatched CI runs (38887769491, 38888443595) came back green with the four NOTICE lines and the quoted job-summary table — these are live GitHub Actions run logs/artifacts, not checkable from a read-only tree
- UNVERIFIED —
node --checkpasses on both files — sandbox blocked runningnodein this session; the diff is small and type-safe-looking JS, but it was not executed
Riskiest lines
- tools/ui-smoke/shots.mjs:227 —
differing > MAX_DIFF_PIXELS(0) now only logs a NOTICE instead of failing the run; this is the crux of the behavior change — UNPINNED (no unit test exists for this tool; verified only by reading the code and the cited live CI run in the PR body) - tools/ui-smoke/smoke.mjs:238 —
report.jsonshape change (screenshotsfield added) that the new workflow step depends on by field name — UNPINNED, but the workflow step is defensive (Test-Path,.Count -eq 0guards) so a shape drift degrades to "nothing printed," not a crash - .github/workflows/darling-ui-smoke.yml:145 —
$shots = @((...).screenshots)wraps the parsed JSON in@()to guard PowerShell's single-element-array unwrapping — UNPINNED, but correctly anticipates a real PowerShell/ConvertFrom-Json gotcha
Traps near this diff
dorny/paths-filter v4 evaluates each pattern as an INDEPENDENT predicate...— does not apply — this diff adds no paths-filter patterns;darling-ui-smoke.yml'son.pull_request.pathsblock is untouched.Under set -euo pipefail, a bare $(gh api …) assignment that fails kills the step...— does not apply — the new step ispwsh, not bash, and makes nogh apicalls; it readsreport.jsonviaGet-Content/ConvertFrom-Jsonwith an explicitTest-Pathguard (darling-ui-smoke.yml:144).gh api --paginate --jq runs the filter once PER PAGE...— does not apply — nogh apiusage anywhere in this diff.A summary helper reading "$1" truncates every message whose echo wraps with a trailing backslash...— does not apply — the new summary step builds$linesas a PowerShell array and joins it withAdd-Content, noecho/"$1"shell-argument pattern involved (darling-ui-smoke.yml:147-154).claude-code-action refuses to run when .github/workflows/claude-review.yml differs from the DEFAULT branch's copy...— does not apply — this PR does not touchclaude-review.yml.Lite and Darling ship in parity...— does not apply —tools/ui-smokeis Darling-only web-UI tooling (there is no Lite web UI to keep in parity; Lite's own smoke tooling lives intools/ui-smoke-wpf, untouched here).- Ruling (#5833): tests are load-bearing — does not apply as a violation — no new test was added or needed to be; this tool has no existing unit-test suite (confirmed: no
*.test.*undertools/ui-smoke/), and the PR body says so plainly ("The script has no unit test or dry mode").
Divergence (blind read vs PR body)
None — the body's account matches the diff on every code claim graded above. One thing I flagged independently in the blind read (the now-largely-redundant Upload screenshot differences / if: failure() step, since a screenshot diff can no longer fail the job) turned out to be a point the PR body addresses explicitly and by design ("I left the existing Upload screenshot differences step... alone. The same images are in darling-ui-smoke on every run.") — a documented tradeoff, not an omission, so it stays a comment rather than a finding.
Reviewer checklist
- Confirm the cited CI dispatch runs (38887769491, 38888443595) are actually green and that the job summary renders the table as shown in the PR body — not checkable from this read-only tree.
This was referenced Oct 16, 2026
Closed
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.
Claude posting for Erik Darling.
Fixes #5931.
Why
The Darling web UI smoke compared four page screenshots pixel for pixel and failed the job on any difference. One sidebar link (#5929) turned the check red on every open web-UI PR. Erik ruled on 2026-10-16 that the compare is advisory: a differing screenshot is reported, real breakage still fails.
What changes
tools/ui-smoke/shots.mjsrunShotsnow returns{ problems, shots }.shotshas one{ name, differing, pct }per compared page.NOTICE screenshot <page>: <n> pixels differ (<pct>%); baseline, actual and diff are in shot-failures, still writes the baseline, actual and diff images, and is not a problem.update_baselinespath (UI_SMOKE_SHOTS=update) is unchanged.tools/ui-smoke/smoke.mjs(the caller, needed for the exit code and summary line)screenshots: N matched, M differ (advisory), K problemsafter the PROBLEM lines (compare mode only).report.jsonis now{ pages, screenshotProblems, screenshots }.screenshotProblemsgive exit 1..github/workflows/darling-ui-smoke.ymlif: always(), right after the run step) readsreport.jsonand appends a table of per-page pixel counts, plus the sentence that the images are in thedarling-ui-smokeartifact, to$GITHUB_STEP_SUMMARY. Nothing is parsed from the log.darling-ui-smokeupload already hadif: always(); I renamed it to "Upload logs, screenshot differences and traces". No new secrets, permissions or triggers. Paths filter and draft skip are untouched.tools/ui-smoke/README.md: says the compare is advisory, lists what still fails the job, and how to refresh baselines (update_baselines=truedispatch, copy the PNGs fromdarling-ui-smoke-new-baselines, commit).What fails the job now, and what only reports
Still fails (exit 1, as before):
expectrequires that is missing or empty;Only reports: a screenshot whose pixels differ from its baseline (NOTICE, images, summary row).
I left the existing
Upload screenshot differencesstep (if: failure(), artifactdarling-ui-smoke-screenshot-diffs) alone. The same images are indarling-ui-smokeon every run.Test plan
node --check tools/ui-smoke/shots.mjsandsmoke.mjspass. The script has no unit test or dry mode.NOTICE lines in the log: fleet 5789 (0.565%), ui-sql-overview 5494 (0.537%), ui-sql-queries 5494 (0.537%), admin-servers 6378 (0.623%).
screenshots: 0 matched, 4 differ (advisory), 0 problems."Screenshot compare summary" step ran green. I could not read the rendered job summary through the API, so I ran the step's own script locally on that run's
report.json. It wrote:Artifact
darling-ui-smokewas uploaded on the green run. Downloaded run 38887769491:ui-smoke/out/shot-failuresholds baseline, actual and diff PNGs for all four pages, andui-smoke/out/report.jsonhas thescreenshotsarray. The summary sentence namesui-smoke/out/shot-failures.screenshotProblemsexit logic insmoke.mjsis unchanged.update_baselinesdispatch (that code path is untouched).For the coordinator
tools/ui-smoke/baselines/.CHANGELOG entry
SECTION: Fixed (the Unreleased section has Added and Fixed only, no Changed section)
ENTRY: - The web UI smoke check reports a screenshot difference instead of failing on it ([#5935]) - A page that differs from its screenshot baseline no longer fails the job. It prints a NOTICE with the pixel count, writes the baseline, actual and diff images to the
darling-ui-smokeartifact, and adds a table to the job summary. A page that does not load, a console or page error and a missing panel still fail the job.REF: [#5935]: #5935