docs: refresh visual tray rendering table#38
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
afonsojramos
added a commit
that referenced
this pull request
Jun 3, 2026
## Summary The Visual Tray workflow opens a PR (e.g. #38) on nearly every push to `main`, even when nothing visually changed. The screenshots are not byte-stable: the PNGs carry no metadata, but the *decoded pixels* differ run to run. Two distinct sources: - **macOS (14, 15):** sub-pixel anti-aliasing on the window's rounded corners. ~400 pixels differ but **0** survive a 2% fuzz — invisible, yet enough to make every capture a new file. - **Windows:** genuine render variance — the popover window settles a few pixels off between runs (windows-2025), and the tray marker only paints once Explorer has finished repainting the promoted icon (windows-2022). Then the `update-platforms` job did `rm -f *.png; cp *.png` unconditionally and `create-pull-request` opened a PR on any byte change — so AA jitter alone produced a churn PR. ## Changes 1. **Gate screenshot updates on a meaningful pixel diff.** Compare each new capture against the committed one with `compare -metric AE -fuzz 2%` and only overwrite when more than 100 pixels differ. Cosmetic AA jitter (0 px) is ignored; real tray/window changes still land. Dimension changes and new platforms fall through to an update. (Adds an ImageMagick install step to the job.) 2. **Wait longer for the Windows window to settle** before capture (`VISUAL_POST_READY_DELAY_MS=6000`), so the frameless fixture window is at its pinned `(400,200)` position rather than caught mid-move. 3. **Extend the Explorer repaint wait** (6s -> 10s) so the promoted magenta/green tray marker renders reliably instead of falling back to a generic glyph. ## Verification Ran the exact gated-sync shell against the real PR #38 artifacts with the actual `compare` binary: | file | diff @2% fuzz | outcome | | --- | --- | --- | | macos-14 / macos-15 | 0 px | keep (no churn) | | windows-2022 (marker) | 256 px | update | | windows-2025 (shift) | 2438 px | update | | identical capture | 0 px | keep | | dimension change | large / non-numeric | update | `shellcheck` clean on the embedded script; workflow YAML validated. ## Notes - **Behavior change:** the sync no longer deletes committed screenshots — strictly safer, since the old `rm` would have wiped a good screenshot whenever a platform job produced no PNG (transient failure). Trade-off: a platform removed from the matrix leaves an orphaned (unreferenced) screenshot to clean up manually. - Change 1 fully fixes the macOS churn (provably 0 px). Changes 2-3 are determinism mitigations for the Windows diffs; I had a single before/after to work from, so their effect should be confirmed across a few real `main` runs. If windows-2025 still churns, the deeper fix is to re-read `getBounds()` immediately before capture in `tests/visual/run.ts`.
ea59a07 to
7489b76
Compare
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.
Auto-generated update to
PLATFORMS.mdfrom the latest visual tray rendering run onmain.Source: Visual Tray workflow run.