You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add overlap offset for grid position cycling (#1762)
* Add CLAUDE.md with codebase documentation for AI assistants
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add cycling overlap offset for grid position cycling
When cycling through grid positions (sixths, eighths, ninths, twelfths,
sixteenths, or quarters with quadrant cycling mode), windows that land
on a position already occupied by another window now receive a small
offset so the user can see there is a window underneath.
The feature is off by default and enabled via hidden preference:
defaults write com.knollsoft.Rectangle cyclingOverlapOffset -bool true
Configurable options:
- cyclingOverlapOffsetSize (default 11pt) controls the offset distance
- cyclingOverlapMaxCascade (default 1) controls max cascade layers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add settings checkbox and make overlap offset universal
- Add "Offset cycling position on overlap" checkbox to the Grid
Positions section of the extra settings popover
- Apply overlap detection to all window actions, not just cycling
- Match on origin point instead of exact frame, so mixed sizes at
the same grid position (e.g. quarter + eighth) trigger the offset
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add hover count badge for overlapping window stacks
Show a live count badge when the mouse hovers over a grid position
with multiple stacked windows. Uses timer-based polling (200ms) of
NSEvent.mouseLocation for reliable hover detection that survives
sleep/wake cycles. The count is queried live via Accessibility APIs
on each hover, so it always reflects the current window state.
Also updates default offset to 11pt and changes overlap detection
to origin-point matching for mixed-size windows at the same grid
position.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address multi-model review findings
- Re-add positionCycles guard to skip AX enumeration on non-grid
actions (maximize, restore, center, etc.)
- Guard overlapOffset <= 0 to prevent silent no-op or corner-shoving
- Cap maxCascade at 5 to prevent spin loops with extreme values
- Cap stackedRegions at 20 entries to prevent unbounded growth
- Call OverlapCountBadge.clearAll() when feature is toggled off
- Add three new defaults to Defaults.array for config export/import
- Remove imageHugsTitle from checkbox (no-op on standard checkboxes)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add unit tests for overlap offset feature
23 tests covering:
- positionCycles property: grid actions return true, non-grid false
- OverlapCountBadge: record, deduplicate, remove, clearAll, max cap
- screenFlipped: self-inverse property, null handling, negative coords
- Defaults.array: all 3 overlap prefs included for config export
- Offset guards: maxCascade clamping, screen boundary clamping on
primary and secondary monitor coordinate spaces
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove hover count badge for separate PR
The overlap count badge (OverlapCountBadge.swift) has architectural
issues with stale window state tracking that cause incorrect badge
positioning and counts. The core overlap offset feature is solid and
well-tested independently. The badge will be reworked and submitted
as a separate PR.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Remove CLAUDE.md per maintainer preference
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Broaden positionCycles to cover all grid snap actions
Invert the logic: instead of listing which actions cycle, exclude
the non-positional actions (maximize, restore, center, move, resize,
display changes). This ensures halves, thirds, fourths, quarters,
and all grid sizes get overlap detection.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments