Skip to content

Add regression coverage for Todo placement on offset displays - #1919

Merged
rxhanson merged 1 commit into
rxhanson:mainfrom
culpen90:test/todo-display-placement
Oct 18, 2026
Merged

rxhanson merged 1 commit into
rxhanson:mainfrom
culpen90:test/todo-display-placement

Conversation

@culpen90

@culpen90 culpen90 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Todo placement must preserve the target display's vertical offset when converting from AppKit to Accessibility coordinates. Extract the existing placement step and allow the primary display's top edge to be supplied explicitly so tests can verify the frame sent to Accessibility without arranging physical displays. Existing placement behavior is preserved.

Add seven regression tests covering displays above and below the primary display, horizontally arranged displays with vertical offsets, both sidebar sides, gaps, Dock/menu insets, and percentage widths.

Validation: the Debug app builds and all 12 focused tests pass with:

xcodebuild -project Rectangle.xcodeproj -scheme Rectangle -configuration Debug \
  -destination 'platform=macOS' CODE_SIGN_IDENTITY=- CODE_SIGNING_ALLOWED=NO \
  -only-testing:RectangleTests/TodoWindowPlacementTests \
  -only-testing:RectangleTests/ScreenFlippedTests test

Fixes #535. The coordinate correction is already present; these tests protect it from regression.

@culpen90
culpen90 marked this pull request as ready for review October 17, 2026 16:34
@rxhanson
rxhanson merged commit 83b76a3 into rxhanson:main Oct 18, 2026
1 check passed
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.

Todo mode app window moves to unexpected location when triggering todo mode

2 participants