
Windows Layout Validation
- 1 installs
- Updated August 1, 2026
- erickson558/monitorreminder
Validate monitor detection, window profile capture and restore math, fuzzy window finding, and Windows packaging assumptions in the monitorreminder project.
About
Reviews and tests the monitorreminder window manager: three-pass fuzzy window matching, SetWindowPlacement restore logic, and UIPI elevation detection. A developer uses it when changing restore behavior or verifying Windows-specific assumptions before packaging.
- Documents the three-pass fuzzy title/class/process matching strategy
- Covers SetWindowPlacement primary with SetWindowPos fallback and elevation checks
Windows Layout Validation by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,750 of 2,153 Testing & QA skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/erickson558/monitorreminder --skill windows-layout-validationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| Last updated | August 1, 2026 |
| Repository | erickson558/monitorreminder ↗ |
What it does
Validate monitor detection, window profile capture and restore math, fuzzy window finding, and Windows packaging assumptions in the monitorreminder project.
Files
Windows Layout Validation
When to Use
- Checking monitor-aware profile behavior
- Reviewing restore logic after backend changes
- Verifying Windows-specific assumptions before packaging
- Validating fuzzy window-finding behavior for apps with dynamic titles
Key components
_find_window — three-pass fuzzy strategy
Located in src/monitorreminder/window_manager.py.
| Pass | Match condition | Handles |
|---|---|---|
| 1 | Exact title + class_name + process_name | All apps (original behaviour) |
| 2 | Best shared trailing segment on " - " title parts | VSCode, Edge, Brave, Foxit PDF, Postman — apps with dynamic title prefixes |
| 3 | Unique candidate of same class + process | Apps that changed title completely |
When validating: confirm that a window captured as "foo.py - project - Visual Studio Code" is found when the current title is "bar.py - other - Visual Studio Code" (one shared suffix segment: "Visual Studio Code").
_restore_window — SetWindowPlacement primary, SetWindowPos fallback
SetWindowPlacement is called with (flags=0, showCmd, ptMin=(-1,-1), ptMax=(-1,-1), rcNormalPosition=(left,top,right,bottom)).
showCmd = SW_SHOWMAXIMIZED(3) for maximized,SW_SHOWMINIMIZED(2) for minimized,SW_SHOWNORMAL(1) otherwise.- Falls back to
SW_RESTORE → SetWindowPos → ShowWindowwhenSetWindowPlacementraises.
UIPI / elevation detection
After _restore_window, for non-maximized, non-minimized windows the engine reads back GetWindowRect and compares to the target within RECT_TOLERANCE = 12 px. If the position did not change and _is_process_elevated returns True, the window is counted as failed and a warning is logged. Elevated apps: Taskmgr.exe, Omen Gaming Hub, Hard Disk Sentinel, any UAC-elevated process.
To move elevated windows, MonitorReminder must itself run as Administrator.
Procedure
1. Inspect src/monitorreminder/window_manager.py and related tests in tests/test_window_manager.py. 2. Validate monitor-relative math with the narrowest test possible. 3. For fuzzy-matching changes: add a test that confirms a renamed title is still found via suffix match. 4. For UIPI changes: mock _is_process_elevated and GetWindowRect to simulate a blocked move and assert failed_count. 5. Run pytest tests/ -v — all 14 tests must pass. 6. Document any new Windows API limitation or fallback behavior in docs/specification.md acceptance checks.