CI / Build and test (push) Successful in 9m41s
CI / Windows tests and installer (push) Skipped
CI / YAML check (push) Successful in 9s
Release / Build, test and publish (push) Successful in 14m49s
CI / PostgreSQL 16 integration (push) Successful in 8m51s
CI / PostgreSQL 17 integration (push) Successful in 9m48s
CI / Docker image (push) Successful in 54s
Release / Server image (push) Successful in 1m39s
Owner review 1 R3, R8, R9. A grouped Export step and Render menu; encoding, playback (reverse, boomerang, loops, fades, hold) and still frames; one videos library on the desktop and the server with a verified trash and copies to a videos folder. Closes #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
58 lines
3.8 KiB
Markdown
58 lines
3.8 KiB
Markdown
# Screenshot baselines
|
|
|
|
The approved look of every screen, one PNG per `--capture` screenshot (`<screen>-<theme>.png`, as `Chronos.exe`,
|
|
`Chronos.Uploader.exe` and `Chronos.Setup.exe --capture <dir>` write them). CI compares each new screenshot with the
|
|
file of the same name here (BRIEF §20.2, visual regression with a pixel-diff tolerance):
|
|
|
|
```
|
|
dotnet run --project src/Chronos.Tools -- screenshots diff out/screenshots --out out/screenshot-diff
|
|
```
|
|
|
|
- A pixel differs when one of its channels moves by more than `--tolerance` (default 8 of 255); a screen fails when
|
|
more than `--max-diff` of its pixels differ (default 0.0005, that is 0.05 %), when its size changed, or when a
|
|
baseline here has no screenshot any more.
|
|
- A screenshot without a baseline fails as soon as this folder holds any PNG: a pull request that adds a screen adds its
|
|
baselines too.
|
|
- While this folder holds no PNG nothing is compared: the step passes, with a warning in the log saying that no visual
|
|
change can fail it.
|
|
- `out/screenshot-diff` gets `<screen>-diff.png` for every screen with differing pixels (the baseline faded to grey, the
|
|
differences magenta) and `summary.md`; they stay in the work folder of the Windows runner (Gitea Actions keeps no
|
|
artifacts here), and the job log lists every screen that failed.
|
|
|
|
## The pictures are reproducible
|
|
|
|
The capture runs on sample data whose clock stands at `SampleData.Now` (2026-10-02 10:18 UTC), in English with English
|
|
formats and with animations off, so the same code draws the same pixels on any day. What the screens measure on
|
|
the machine is shown as fixed sample values while the clock is frozen (`AppClock`): free space (1.2 TB), the
|
|
server's response time (12 ms) and the time and duration of the last sync comparison. The capture's data folder is a
|
|
new one in the machine's temporary folder, but the screens show it as a sample user's (`C:\Users\Studio\AppData\Local\Chronos`,
|
|
its sample archive as `D:\ChronosArchive`: `AppEnvironment.Shown`; the videos folder is set to `D:\Videos\Chronos`), so neither the temporary folder nor the user name
|
|
reaches a picture; a path typed over a shown one goes back to the temporary folder (`AppEnvironment.Actual`), so the
|
|
capture writes nowhere else. Two captures made with different `TEMP` folders are identical. Two things still come from the
|
|
machine: the time zone (times are shown in local time; the baselines are made in the development PC's, Europe/Rome,
|
|
which the Windows runner must share) and the fonts and scaling of Windows itself.
|
|
|
|
## Adding or updating baselines
|
|
|
|
Capture them on the development PC, the one where the Windows runner is registered (fonts, scaling and the time zone
|
|
differ per machine), from a Release build of the branch that changes the screens:
|
|
|
|
```
|
|
dotnet build Chronos.slnx -c Release
|
|
src/Chronos.App/bin/Release/net10.0-windows/Chronos.exe --capture out/screenshots
|
|
src/Chronos.Uploader/bin/Release/net10.0-windows/Chronos.Uploader.exe --capture out/screenshots
|
|
src/Chronos.Setup/bin/Release/net10.0-windows/Chronos.Setup.exe --capture out/screenshots
|
|
dotnet run --project src/Chronos.Tools -- screenshots diff out/screenshots
|
|
dotnet run --project src/Chronos.Tools -- screenshots accept out/screenshots
|
|
```
|
|
|
|
`screenshots accept <dir>` copies every PNG of `<dir>` here. Commit only the screens whose change is intended, and delete
|
|
the baseline of a screen that no longer exists. If the Windows runner is ever registered on another PC, accept a new
|
|
set captured there in one commit.
|
|
|
|
## The first baselines
|
|
|
|
The first set (156 screens) was captured on the development PC on 2026-11-04 (owner review 3, R2), at `SampleData.Now`,
|
|
and is committed with the ports fix of `v0.1.0-rc.9`. Until a Windows runner is registered, CI skips the `windows` job
|
|
and nothing compares them: run `screenshots diff` locally before a pull request that touches a screen.
|