Repository navigation
Keep the Todo window on screen when its app enforces a wider minimum width - #1950
Merged
rxhanson merged 1 commit intoNov 3, 2026
Merged
Conversation
…width An app can refuse a width below its minimum. The Todo window was placed at the sidebar's origin and kept the wider size, so with the sidebar on the right it extended past the screen edge (rxhanson#1307). After the usual placement, moveTodoWindow reads the frame back and, when the app kept a wider or taller window, moves it so that it ends flush with the outer edge of its zone and stays on screen as far as it fits, writing only the position, as BestEffortWindowMover does for the other actions. The remaining windows are still reflowed around the configured sidebar width. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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.
Closes #1307
When the Todo app refuses to shrink to the sidebar width because its minimum width is larger, the Todo window kept the wider size at the sidebar's origin, so with the sidebar on the right it extended past the screen edge. You asked on the issue whether the window could not be resized to the Todo area, and the reporter confirmed that was the case.
What changes
TodoManager.moveTodoWindowstill issues the samesetFrame. It then reads the frame back once and, only when the app kept a wider (or taller) window than its zone, moves it so that it ends flush with the outer edge of the zone, the screen edge or the gap in front of it, and stays within the visible frame. Only the position is written, throughsetImmediateFrame, with the size the app accepted: the alignment to the zone's outer edge followsClampedWindowAligner, as the edge-aligning movers do, and the position-only write is the oneBestEffortWindowMoveruses after the other actions.WindowManagerchange, no HUD.Tests
TodoWindowMinimumSizeTestsdrivesmoveTodoWindowwith a window double that enforces a minimum width: a window that accepts the width is placed once; a wider minimum keeps a right sidebar flush with the screen edge with a single position-only write; gaps keep it in front of the outer edge; a left sidebar is left alone, and moves to the screen edge only when that is the one way to fit; a window wider than the screen keeps its leading edge on screen on either side; a taller minimum height ends with the visible frame, and a window taller than the screen keeps its top; an unreadable frame is left alone. The existingTodoWindowPlacementTestsnow also record any correction, so they would notice an unintended one.The full
RectangleTestssuite passes: 662 tests, 0 failures, on macOS 27.0.1 / Xcode 27. I have not yet tried it with a real Todo app that enforces a minimum width; happy to do so and report before merge if you would like.