fix(window-adjust): size center-80 (Almost Maximize) preset to 80% - #642
Open
YuriNachos wants to merge 1 commit into
Open
fix(window-adjust): size center-80 (Almost Maximize) preset to 80%#642YuriNachos wants to merge 1 commit into
YuriNachos wants to merge 1 commit into
Conversation
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>
3 tasks
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
The
center-80preset (UI label "Almost Maximize") sized the window to 90% of the usable screen instead of the intended 80%.Root cause
adjustedFramecomputed the target asarea.width * 0.9/area.height * 0.9, contradicting the preset name and its 80% keyword.Fix
Use
0.8so the preset matches its label and the other presets' convention.Tests
Adds a headless
--print-frameself-test path (deterministic, no Accessibility or live window) andscripts/test-window-adjust-center80.mjsasserting the preset sizes to ~80%. The production call path never enables the test path.