Repository navigation
Move thirds and fourths to the adjacent display on repeat - #1937
Conversation
|
Thanks! This would be a departure from how Rectangle has behaved for quite some time, and could break the way that many people have been using the app. I think the most correct path forward is to change from a single selection for |
# Conflicts: # RectangleTests/RectangleTests.swift
Repeating Left or Right Third, or First or Last Fourth, with "Move to adjacent display" as the repeated command moves the window to the adjacent display only when the thirdsAndFourthsAcrossDisplays default is set. Without it, repeats keep cycling on the same display, as before. Agent: claude
With traverseSingleScreen on, a lone display is its own adjacent screen. With thirdsAndFourthsAcrossDisplays on, repeating Left Third or First Fourth then jumped straight to the opposite action on that same display, skipping the cycle. Only move across displays when the adjacent screen is a different display, and cycle otherwise. Agent: claude
|
Thanks for the review, and sorry for the surprise. The change is now behind a Terminal setting, |
Keeps both sets of tests appended at the end of RectangleTests.swift: the adjacent-display tests from rxhanson#1937 and this branch's Todo reflow tests. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Keeps both sets of tests appended at the end of RectangleTests.swift: the adjacent-display tests from rxhanson#1937 and this branch's fullscreen gate tests. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Merging main into the new-window-action branch for #1945 dropped the closing braces of testAStaleFailureDoesNotDropAReplacedObservation and NewWindowActionManagerTests, so EdgeActionsAcrossDisplaysTests from #1937 ended up nested inside the test method and the RectangleTests target no longer compiles. The app target still builds, which is why CI passes. Puts the two braces back; the test block now matches #1945's original commit exactly. Co-authored-by: Claude Opus 5.5 <[email protected]>
Fixes #1317
With "Move to adjacent display on left or right" selected, repeating Left Third, Right Third, First Fourth or Last Fourth cycles through positions on the same display. Only the half actions move to the other display. The cycling in
FirstThirdCalculation,LastThirdCalculation,FirstFourthCalculationandLastFourthCalculationonly checks for "do nothing", so this mode falls through to it.As requested in review, the new behaviour is behind a hidden Terminal setting, off by default:
With it on, a repeated first-edge action moves to the opposite edge of the previous display, and a repeated last-edge action to the first edge of the next display, mirroring Left/Right Half. The shared logic is
calculateAcrossDisplaysinOrientationAware.swift. It only moves when the adjacent screen is a different display, so with one display (including with "traverse single screen" on) these actions keep cycling. With the setting off, behaviour is unchanged. The setting is documented inTerminalCommands.md.Two-thirds, three-fourths and smaller-fraction actions are unchanged. The Repeated commands redesign can be a separate PR.
Callers checked:
Rectangle/WindowCalculation/,Rectangle/Snapping/,Rectangle/andRectangleTests/, through the test suite.Ran live: agent-run
xcodebuild test -scheme Rectangleon macOS, on 165ee3e (run on cfdbff5, which has the same files). A Stage Manager check was stubbed in the test build only. Not checked on two physical displays.AI disclosure: written and checked with Claude Code (tests and live run agent-run); I take responsibility for it.