Skip to content

fix(window-adjust): size center-80 (Almost Maximize) preset to 80% - #642

Open
YuriNachos wants to merge 1 commit into
SuperCmdLabs:mainfrom
YuriNachos:YuriNachos/w11-supercmd-center80
Open

fix(window-adjust): size center-80 (Almost Maximize) preset to 80%#642
YuriNachos wants to merge 1 commit into
SuperCmdLabs:mainfrom
YuriNachos:YuriNachos/w11-supercmd-center80

Conversation

@YuriNachos

Copy link
Copy Markdown

Summary

The center-80 preset (UI label "Almost Maximize") sized the window to 90% of the usable screen instead of the intended 80%.

Root cause

adjustedFrame computed the target as area.width * 0.9 / area.height * 0.9, contradicting the preset name and its 80% keyword.

Fix

Use 0.8 so the preset matches its label and the other presets' convention.

Tests

Adds a headless --print-frame self-test path (deterministic, no Accessibility or live window) and scripts/test-window-adjust-center80.mjs asserting the preset sizes to ~80%. The production call path never enables the test path.

The center-80 preset (UI label "Almost Maximize") sized the focused
window to 90% of the usable screen (area.width * 0.9) instead of the
intended 80%, contradicting its name and its 80% keyword. Use 0.8 so the
preset matches its label and the other presets' convention.

Adds a headless --print-frame self-test path (forceUseForcedArea) so the
preset sizing can be asserted deterministically without Accessibility or
a live window; the production call path never sets it.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant