Stop rewriting screenshots that did not meaningfully change

Recording rewrote every screenshot unconditionally, so renderer noise far below
the verification tolerance produced large "Update screenshots" commits.

Use `app.cash.paparazzi.overwriteOnMaxPercentDifference` to keep screenshots that
are within tolerance. Existing screenshots are no longer deleted before recording;
obsolete ones are pruned afterwards, only when their preview produced no
screenshot at all.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benoit Marty
2026-10-01 15:44:26 +02:00
parent fd60ba1018
commit 73b3282939
3 changed files with 89 additions and 8 deletions
+6
View File
@@ -65,3 +65,9 @@ android.r8.gradual.support=true
# Enabled parallel sync for Gradle 9.4+
org.gradle.tooling.parallel=true
# When re-recording, keep the existing screenshot if it differs by less than `maxPercentDifference`
# (see PaparazziPreviewRule in tests/uitests/.../base/ScreenshotTest.kt). Without this, recording has
# no tolerance at all while verification has one, so renderer noise far below the threshold that
# `verifyPaparazziDebug` accepts still rewrites the Git LFS blob of every affected screenshot.
app.cash.paparazzi.overwriteOnMaxPercentDifference=true