Skip to content

Fix Settings screenshots reporting changes behind the panel - #726

Merged
hannesa2 merged 1 commit into
masterfrom
mask-the-settings-screenshot-corners
Sep 25, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
mask-the-settings-screenshot-corners

Conversation

@goneng

@goneng goneng commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Keep what shows through the Preferences panel's rounded corners out of
its screenshot, so a PR that changes the main window stops being
reported as a Settings change.

Details

Example: #723 changes only the sidebar, yet its comparison flagged
settings-general.png
(#723 (comment)). All
223 differing pixels are in the panel's corners, where the main window
shows through.

  • Paint everything outside an inset rounded rect white before saving
    the Settings captures; the inset and radius cover the Tahoe corner,
    which runs further along each edge than a plain circle
  • Attach the masked image as PNG data, which the extractor accepts
  • Link AppKit into GitXUITests for the bitmap drawing

Screenshot from #723

image

Test plan

  • Replayed the mask on [Worktree] Prune worktrees, and lock or unlock them (part 3) #723's old and new captures: 0 differing
    pixels, dialog content unchanged
  • This PR's own comparison should flag both Settings images once, with
    white corners only, since the master baseline is unmasked
  • Later PRs that change the main window should report no Settings diff

Keep what shows through the Preferences panel's rounded corners out of
its screenshot, so a PR that changes the main window stops being
reported as a Settings change.

- Paint everything outside an inset rounded rect white before saving
  the Settings captures; the inset and radius cover the Tahoe corner,
  which runs further along each edge than a plain circle
- Attach the masked image as PNG data, which the extractor accepts
- Link AppKit into GitXUITests for the bitmap drawing
@hannesa2

Copy link
Copy Markdown
Contributor

Screenshot differs: emulatorApi=arm64 with 2 screenshot(s)

setpoint (old) | diff | actual screenshot (new)

settings-general.pngscreenshot

settings-integration.pngscreenshot

@goneng
goneng marked this pull request as ready for review September 25, 2026 18:56
@goneng goneng added the test Test related label Sep 25, 2026
@hannesa2
hannesa2 merged commit e08d3a3 into master Sep 25, 2026
3 checks passed
@hannesa2
hannesa2 deleted the mask-the-settings-screenshot-corners branch September 25, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants