Skip to content

fix: remove a stale .diff.png once the comparison no longer fails - #416

Merged
FRSgit merged 1 commit into
feat/major-5from
fix/remove-stale-diff
Sep 21, 2026
Merged

FRSgit merged 1 commit into
feat/major-5from
fix/remove-stale-diff

Conversation

@FRSgit

@FRSgit FRSgit commented Sep 21, 2026

Copy link
Copy Markdown
Member

When a run failed and wrote foo_#0.diff.png, that file stayed around forever once the next run passed (or created/updated the baseline). Nothing was left to review, but the diff kept showing up in the screenshots folder and in anything that lists diff images.

Now the sibling .diff.png gets deleted whenever a comparison ends without an error. The path derivation bails out when the name has no .actual suffix, so a hand-picked matchAgainstPath file can't be touched by accident.

The upcoming run manifest (#414) reports images.diff.path based on what's on disk, so it needs this to be able to promise null for passed entries.

馃 Generated with Claude Code

A `.diff.png` written by an earlier failed run stayed on disk when the next
run passed, created or updated the baseline for the same screenshot. It
kept showing up in the screenshots folder (and in anything that lists diff
images) although there was nothing left to review.

Delete the sibling `.diff.png` whenever the comparison ends without an
error. The derivation is skipped when the path carries no `.actual` suffix,
so hand-picked `matchAgainstPath` files are never touched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@FRSgit
FRSgit changed the base branch from feat/major-5 to main September 21, 2026 23:49
@FRSgit
FRSgit changed the base branch from main to feat/major-5 September 21, 2026 23:49
@FRSgit
FRSgit added this pull request to stack #419 September 21, 2026 23:49
@FRSgit
FRSgit removed this pull request from stack #419 September 21, 2026 23:52
@FRSgit
FRSgit merged commit 58b47f7 into feat/major-5 Sep 21, 2026
5 checks passed
@FRSgit
FRSgit deleted the fix/remove-stale-diff branch September 21, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant