feat(tools): screenshot diff against committed baselines, reproducible captures
BRIEF §20.2 asks for visual regression of the --capture screenshots with a pixel-diff tolerance; CI only published them. `Titano.Tools screenshots diff <dir>` compares every PNG with tests/visual/baselines: a pixel differs when a channel moves by more than --tolerance (8 of 255), and a screen fails when more than --max-diff of its pixels differ (0.05 %), when its size changed or when a baseline lost its screen; a screen without a baseline only warns. It writes a diff image per screen with differing pixels (the baseline faded, the differences magenta) and a Markdown summary, also to the GitHub job summary. `screenshots accept <dir>` copies screenshots over the baselines. The baselines folder starts with its README; the pictures come later from ci-screenshots. The captures were not reproducible: the sample's jobs, renders, transfers, cards, trash and remote sequences were dated from the clock, the Library timeline and the Archive heatmap laid out around today, the Uploader captured in the computer's language and an indeterminate bar animated. The sample now dates everything from SampleData.Now, --capture freezes the new AppClock there, formats are English, and the new Motion attached property (off in the captured windows) keeps the indeterminate sweep still in the middle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
15 files changed
+603
-39
No files matched your search
@@ -20,6 +20,9 @@ public sealed class SampleData
|
||||
private const int FileCount = 4_812;
|
||||
private const long FileSize = 20_000_000;
|
||||
|
||||
/// <summary>The sample's "now" (when the failed file failed): fixed, so the screenshots are the same on any day.</summary>
|
||||
private static readonly DateTime Now = new(2026, 9, 28, 19, 2, 0, DateTimeKind.Utc);
|
||||
|
||||
private readonly SampleSession _session = new();
|
||||
private readonly UploadQueue _queue = new();
|
||||
private MainViewModel? _vm;
|
||||
@@ -88,7 +91,7 @@ public sealed class SampleData
|
||||
_queue.Items[2_201].State = UploadItemState.Uploading;
|
||||
_queue.Items[2_201].BytesSent = FileSize * 46 / 100;
|
||||
_queue.Items[2_202].State = UploadItemState.Hashing;
|
||||
_queue.Fail(_queue.Items[2_203], UploadFailure.FileUnreadable, null, DateTime.UtcNow);
|
||||
_queue.Fail(_queue.Items[2_203], UploadFailure.FileUnreadable, null, Now);
|
||||
}
|
||||
|
||||
private sealed class SampleSession : IServerSession
|
||||
|
||||
Reference in new issue
Block a user