test(visual): solid white+black window marker to remove subpixel AA drift#31
Merged
Conversation
3 tasks
afonsojramos
added a commit
that referenced
this pull request
May 12, 2026
## Summary After #31 made the fixture window opaque white (to fix GNOME bleed-through), Budgie and Cinnamon started failing: their default panels are at the **bottom** of the screen, and our window snaps to the bottom-right corner (because `tray.getBounds()` returns `{0,0,0,0}` on Linux SNI, so menubar's Positioner falls back). The opaque white window now sits right on top of the tray icon → `exactTray=0`, test fails. KDE Plasma showed the same hang/failure pattern. Previously the window was transparent (Electron default on Linux) so the tray showed through. **Fix**: explicitly `mb.window.setPosition(400, 200)` after `showWindow()`. Mid-screen placement guarantees no overlap with any panel (top or bottom) on any platform. On macOS/Windows the visual diff just moves where the white box appears in the masked screenshot — relative position doesn't matter for diffing. ## Test plan - [ ] Budgie + Cinnamon now pass tray detection - [ ] KDE Plasma completes in normal ~3min instead of hanging - [ ] Other platforms unchanged
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.
Summary
Continuous-improvement step on the visual ROI work. The remaining drift after #28 was 5/14 platforms showing ~1-2% pixel jitter, driven by anti-aliasing at the cyan→yellow boundary line inside the window and the magenta/green checker against macOS's translucent menu bar.
This PR replaces the window content with solid blocks of color:
Tray icon stays as the magenta/green checker — it's the backdrop (macOS menu bar translucency) that causes its drift, which is unfixable without redesigning the icon altogether.
Detection logic moved from "global cyan+yellow pixel count" to "white+black pixel count inside the reported
window.getBounds()rect", which also stops OS chrome white/black text from contributing false-positives. Thresholds: ≥5000 white + ≥500 black inside the rect (out of an expected ~16800 + ~3200 fully visible).Test plan