Skip to content

feat(tile-snap): land 2/3 snap zones + DEV.md cleanup (v7.0.21)#5

Merged
synle merged 3 commits into
mainfrom
chore/devmd-cleanup
May 15, 2026
Merged

feat(tile-snap): land 2/3 snap zones + DEV.md cleanup (v7.0.21)#5
synle merged 3 commits into
mainfrom
chore/devmd-cleanup

Conversation

@synle
Copy link
Copy Markdown
Owner

@synle synle commented May 15, 2026

Summary

  • Re-lands the 2/3 snap zones on macOS feature originally authored as 5a4daf0 for v7.0.8 — never merged, ended up stranded on this branch. build_snap_zones adds two wider drop targets at 12.5% and 87.5% along the bottom edge, mapped to LeftTwoThirds / RightTwoThirds. Corners still win priority. Covered by test_build_snap_zones_bottom_two_thirds and updated counts in test_build_snap_zones_single_display / _three_displays.
  • Carries the DEV.md consolidation commit (3e2604c) that was already on this branch.
  • Bumps version to v7.0.21 (conflict-resolved against current main at v7.0.20).
  • Merge from origin/main to bring the branch current.

Why this PR exists

The original PR #12 was never opened on GitHub (or was deleted pre-merge) — the commit subject (#12) is misleading. Main has been releasing v7.0.9 through v7.0.20 without these snap zones. This PR is purely a "land the dangling work" change, not new feature work.

Test plan

  • CI green on macOS ARM/Intel, Windows, Linux (build.yml)
  • cargo test in src-tauri/ covers test_build_snap_zones_bottom_two_thirds
  • Manual macOS: drag a window to the bottom-left or bottom-right area; verify it snaps to left/right two-thirds (Tile Snap must be enabled in Settings)

🤖 Generated with Claude Code

synle and others added 3 commits May 12, 2026 10:25
## Summary

- Adds `LeftTwoThirds` / `RightTwoThirds` drop-zone markers to the macOS
Tile Snap bottom row, centered at 12.5% and 87.5% with double width
(`corner * 2`) so they read as distinct from the existing 1/3 markers
- Full-width top "maximize" strip is untouched — most common snap target
stays a full-width hit (Fitts' law)
- Bumps to **v7.0.8**

## Why this layout

Option discussion ended on bottom-row over top-row:
- Bottom edge already speaks "horizontal anchor at X%" via the existing
25/50/75 third markers. 2/3 fits the same grammar.
- Splitting the top edge into a narrow center "maximize" + side 2/3
markers would shrink the most-used snap target by ~70%.
- Double width (100px vs 50px) keeps the markers visually distinct from
the 1/3 row while sitting at the same `bottom_y` band.

Hit-test math (1920px display):
- LeftTwoThirds: x = 190..290
- LeftThird: x = 455..505  → ~165px gap, no overlap
- BottomLeftQuarter: x = 0..50 (corners listed first → always win)

## Test plan

- [x] `cargo test --lib` — 240 passed (4 new tests, no regressions)
- [x] `npm test` — 115 passed
- [ ] Manual: drag a window over the 12.5% / 87.5% markers and verify
the left-2/3 / right-2/3 snap fires; verify 1/3 markers still work;
verify corners still beat 2/3 markers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
@synle synle merged commit 7536178 into main May 15, 2026
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.

1 participant