Repository navigation
Fix tab hover landing on the first tab - #257
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Caution Review failedAn error occurred during the review process. Please try again later. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe tab geometry registry now intersects each tab’s visible rectangle with its bounds. New tests check hover resolution for unscrolled tabs and visible-frame clipping after scrolling. ChangesTab Hover Geometry
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No outstanding issue is identified that would prevent merging the tab-hover fix after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Regression from #253. With the pointer anywhere on the tab strip, the first tab showed the hover background and close button, and the tab under the pointer showed nothing.
`visibleFrames` used each tab hit-region view's `visibleRect`. Since macOS 14 `clipsToBounds` defaults to false, and `visibleRect` clips only at ancestors that clip, so for these views it returned the whole strip (600 pt wide for a 97 pt tab). Every tab's hover region covered the bar and the resolver picked the first tab. The fix intersects `visibleRect` with the view's `bounds`.
Commit 1 adds window-hosted tests that fail on main: hovering each tab's center must resolve to that tab, and a tab scrolled past the leading edge must have no hover region. Commit 2 is the fix. `swift test`: 230 tests pass.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Fixes a regression from #253 where hovering anywhere on the tab strip highlighted the first tab instead of the one under the pointer.
visibleFramesrelied on each tab'svisibleRect, which since macOS 14 spans the entire strip becauseclipsToBoundsnow defaults to false; the fix intersects that rect with the tab's ownbounds.Tests
Written for commit 7409ace. Summary will update on new commits.
Summary by CodeRabbit