fix(panel): clamp panel to visible screen when menu bar auto-hides#557
Conversation
When the macOS menu bar is set to auto-hide, the tray icon rect sits above the visible screen, so the panel anchored to its bottom edge rendered partially off-screen with the header clipped. Clamp the panel's top edge to the monitor's top edge. Behavior with a visible menu bar is unchanged, since the anchor already lands below the bar. Fixes robinebers#556 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR fixes a bug where the panel is clipped at the top of the screen when the macOS menu bar is set to auto-hide. The ChangesPanel Y Position Clamping
🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #556
Root cause
position_panel_at_tray_iconanchors the panel's top edge to the bottom of the tray icon rect. When the macOS menu bar is set to auto-hide and is currently hidden, the bar — and the status item in it — sits above the visible screen, sotray.rect()reports a rect above the monitor's top edge. The computedpanel_ylands off-screen and nothing clamps it, so the panel header renders clipped above the screen top.Fix
Clamp the panel's top edge to the monitor's top edge (one line, plus comment). Behavior with a visible menu bar is unchanged: the anchor already lands below the bar in that case, so the clamp never engages.
Testing
bun run buildandbun run testpass (64 files, 1090 tests)🤖 Generated with Claude Code
Summary by cubic
Clamp the panel’s top edge to the monitor top when the macOS menu bar auto-hides, so the panel stays fully visible instead of clipping off-screen. Behavior is unchanged when the menu bar is visible.
Written for commit d4c4f45. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes