Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
erickson558 avatar

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-validation

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedAugust 1, 2026
Repositoryerickson558/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

SKILL.mdMarkdownGitHub ↗

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.

PassMatch conditionHandles
1Exact title + class_name + process_nameAll apps (original behaviour)
2Best shared trailing segment on " - " title partsVSCode, Edge, Brave, Foxit PDF, Postman — apps with dynamic title prefixes
3Unique candidate of same class + processApps 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_windowSetWindowPlacement 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 → ShowWindow when SetWindowPlacement raises.

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.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.