Skip to content

Allow smaller to shrink the height of a vertically maximized window - #1807

Open
YuriNachos wants to merge 1 commit into
rxhanson:mainfrom
YuriNachos:fix/smaller-shrinks-height-1737
Open

Allow smaller to shrink the height of a vertically maximized window#1807
YuriNachos wants to merge 1 commit into
rxhanson:mainfrom
YuriNachos:fix/smaller-shrinks-height-1737

Conversation

@YuriNachos

@YuriNachos YuriNachos commented Aug 7, 2026

Copy link
Copy Markdown

Closes #1737.

Problem

Under the combined .smaller command, a vertically-maximized window (Half / full-height) shrinks in width but not in height — it stays pinned to the top and bottom screen edges. .smallerHeight already had an exception for this (added in b97a353 / #1645), but .smaller was left asymmetric, so the combined shortcut cannot shrink a maxed-height window down in both dimensions.

Fix

One-line change in ChangeSizeCalculation: extend the existing againstTopAndBottomScreenEdges guard from params.action != .smallerHeight to ![.smaller, .smallerHeight].contains(params.action). .smaller now mirrors .smallerHeight and lets the height shrink for full-height windows.

Behavior equivalence

This is strictly symmetric with the maintainer's own precedent b97a353 (which did the same for .smallerHeight). .smaller is conceptually .smallerWidth + .smallerHeight, so the height component should honor the same edge exception. An adversarial behavior-equivalence review confirmed FIX_IS_CORRECT — the change is more-correct and does not sacrifice a real use case; the only assertions it invalidated asserted the old (buggy) pinned-height behavior.

Tests

  • Updated the 3 stale ChangeSizeCalculationTests assertions that encoded the old pinned-height behavior (testExplicitZeroDisablesScreenFractionMinimum, testSmallerCanReachExactConfiguredMinimum, testSmallConfiguredScreenFractionAllowsIssueRegressionStep) to the new expected rect (height shrinks by sizeOffset, y adjusts by floor(sizeOffset/2)).
  • Added testSmallerShrinksHeightOfFullHeightWindow — a regression test for Smaller/Larger toggle only change width of the window after "Half" and "Center" Size Adjustments #1737 asserting a full-height Half window shrinks in both dimensions.
  • All ChangeSizeCalculationTests pass (3/3 in the relevant suite).

Note on pre-existing host failures (NOT caused by this PR)

Running the full xcodebuild test suite on this branch shows 21 failures in ActiveSideSplitRatiosCooperativeTests and HalfSplitCornerCalculationTests. These are pre-existing host-environment failures: I ran the identical xcodebuild test on clean upstream/main (no changes) and got the same 21 failures in the same suites. They are unrelated to ChangeSizeCalculation (the only file this PR changes in app code) and are expected to pass on CI's display configuration.


Authored by @YuriNachos. Implementation written by a cccc (Claude Code, GLM-5.2) worker under orchestrator acceptance — an adversarial review swarm (logic + behavior-equivalence + test-integrity lenses) confirmed the fix is correct, and the full-suite red was proven pre-existing by running the gate on clean upstream/main.

Extends the .smallerHeight curtain exemption (b97a353, rxhanson#1645) to the combined .smaller command so a vertically-maximized window shrinks in both width and height instead of only width. Adds testSmallerShrinksHeightOfFullHeightWindow and updates three existing ChangeSizeCalculationTests expectations that encoded the pre-rxhanson#1737 height-pinned behavior.
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.

Smaller/Larger toggle only change width of the window after "Half" and "Center" Size Adjustments

1 participant