fix(macos): stop HUD dialogs painting a grey rectangle over the desktop - #733
EtienneLescot wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 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 (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe change adds shared message-box owner selection. On macOS, marked sheetless windows are not used as owners. HUD, source-selector, and countdown-overlay windows are marked, and the main-process wrapper uses the new helper. ChangesMessage Box Ownership
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Merge Risk: ⚪ Minimal · up to On macOS, dialogs for marked transparent overlays avoid using those overlays as owners, addressing the reported dimming behavior. The hidden-window fallback is preserved, and no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, fix, platform behavior, and testing results. However, it does not use the required template sections and omits the required type of change, release impact, desktop impact, and screenshots or video sections. The related issue is also not formatted with the required reference syntax. Resolution Rewrite the description using the repository template. Include Summary, Related issue, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing sections. Select the applicable checkboxes and use an accepted issue reference such as "Refs
✨ 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 |
On macOS an owned message box is a sheet, and AppKit dims the whole owning window behind it. The HUD is a ~907x696 transparent window around a ~60px bar, so every dialog it owned greyed a large invisible area of the desktop. On macOS the transparent overlays (HUD, source selector, countdown) no longer own their message boxes: an unowned alert is app-modal and sits above their floating level. Windows and Linux keep the owner, where an unowned dialog opens behind the always-on-top HUD. The two permission dialogs this first covered in ipc/handlers.ts are gone since #735 replaced them with the permissions window; what remains are main.ts's dialogs (About, updates, diagnostics), all of which fall back to the HUD as their owner.
4099a32 to
65fcd70
Compare
Problem
On macOS, every message box owned by the HUD shows up as a sheet, and AppKit dims the whole owning window behind a sheet. The HUD is a ~907×696 transparent window around a ~60 px bar, so each dialog it owns greys out a large, otherwise invisible area of the desktop. This covers the screen and accessibility permission dialogs, and every
showMessageBoxinmain.tsthat falls back tomainWindow.Found while testing #302 on a Mac.
Fix
A new
electron/messageBox.tsdecides which window owns a message box:main.ts'sshowMessageBoxgives the dialog an owner in the first place).The three windows are marked in
windows.ts, andmain.ts'sshowMessageBox(About, updates, diagnostics) goes throughshowMessageBoxOver.Verified
tsc,biome check,vitest run electron(822 passed), plus new unit tests for the owner decision.Rebased onto #735
#735 replaced the two permission dialogs this PR first touched in
ipc/handlers.tswith the permissions window, so that part of the diff is gone. What is left ismain.ts's dialogs.Summary by CodeRabbit