fix(hud): keep overlay visible when target enters fullscreen#570
Conversation
The HUD BrowserWindow has no window type, so on macOS it stays on the original Space when the recorded app enters native fullscreen — the overlay vanishes and the primary recording controls become unreachable until the user exits fullscreen. Add type: 'panel' on darwin so the HUD floats over fullscreen Spaces while keeping transparent, alwaysOnTop, focusable: false, and setContentProtection unchanged. setVisibleOnAllWorkspaces relies on the window being focusable (electron#36364), so it cannot fix a focusable: false HUD.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe HUD overlay ChangesmacOS HUD panel overlay
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
Poem
🚥 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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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 |
Summary
type: 'panel'to the HUD BrowserWindow on darwin so the overlay floats over fullscreen Spaces.Why
On macOS, when the recorded app enters native fullscreen via the green title-bar button or
cmd+ctrl+F, the HUD overlay disappears from view. Fullscreen apps live on their own Space, and a transparent alwaysOnTop window without a window type does not follow. The tray icon remains as a fallback, but the primary recording controls — pause, stop, drag — are unreachable until the user exits fullscreen.type: 'panel'is the documented Electron path for floating over fullscreen Spaces.setVisibleOnAllWorkspaces({ visibleOnFullScreen: true })was considered, but it requires the window to be focusable per electron#36364; the HUD is created withfocusable: false.createUpdateToastWindow()already usessetVisibleOnAllWorkspacessuccessfully — that window isfocusable: true, consistent with the electron#36364 constraint.This PR intentionally does not include the area-selector or sourceRect changes from #126 — those are separate, larger PRs.
Verification
setContentProtectionHUD-exclusion from screenshots observed normal during the session.npx tsc --noEmitpasses.Related Issue(s)
Summary by CodeRabbit