Skip to content

fix(hud): keep overlay visible when target enters fullscreen#570

Open
wyddy7 wants to merge 1 commit into
webadderallorg:mainfrom
wyddy7:pr/hud-fullscreen
Open

fix(hud): keep overlay visible when target enters fullscreen#570
wyddy7 wants to merge 1 commit into
webadderallorg:mainfrom
wyddy7:pr/hud-fullscreen

Conversation

@wyddy7
Copy link
Copy Markdown

@wyddy7 wyddy7 commented May 22, 2026

Summary

  • Add type: 'panel' to the HUD BrowserWindow on darwin so the overlay floats over fullscreen Spaces.
  • No changes to recording pipeline, IPC, or Windows/Linux paths.

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 with focusable: false. createUpdateToastWindow() already uses setVisibleOnAllWorkspaces successfully — that window is focusable: 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

  • Manual run on macOS 14, single display:
    • HUD remains visible when another window enters native fullscreen via the green title-bar button.
    • Drag, click-through passthrough, popover buttons, and setContentProtection HUD-exclusion from screenshots observed normal during the session.
    • Recording start → stop produces a valid file; editor opens on stop.
  • npx tsc --noEmit passes.

Related Issue(s)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed HUD overlay window to properly display over fullscreen applications on macOS.

Review Change Stack

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.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f20348e6-545d-4f62-b511-6bf22352255f

📥 Commits

Reviewing files that changed from the base of the PR and between 48b48dc and 6ca3ce7.

📒 Files selected for processing (1)
  • electron/windows.ts

📝 Walkthrough

Walkthrough

The HUD overlay BrowserWindow on macOS is configured with type: "panel" to enable it to float as an always-on-top transparent overlay across native fullscreen applications that occupy separate Spaces. Non-macOS platforms retain their existing window options.

Changes

macOS HUD panel overlay

Layer / File(s) Summary
macOS panel window type configuration
electron/windows.ts
HUD overlay BrowserWindow options now include a platform-conditional type: "panel" setting on macOS, leaving non-macOS behavior unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

Checked

Poem

🐰 A panel floats across the Space,
No longer hiding in fullscreen's race,
macOS users now see the HUD so bright,
Recording flows smooth through day and night! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a fix to keep the HUD overlay visible when the target app enters fullscreen on macOS.
Description check ✅ Passed The description covers the key sections: Summary, Motivation (Why), Verification, and Related Issue. However, the Type of Change checkbox and Screenshots sections from the template are not completed.
Linked Issues check ✅ Passed The code changes directly address issue #569 by adding type: 'panel' to the HUD BrowserWindow on macOS to keep the overlay visible in fullscreen Spaces, meeting all stated coding objectives.
Out of Scope Changes check ✅ Passed All changes are in-scope: the modification is limited to the HUD window configuration on macOS, with no changes to recording pipeline, IPC, or Windows/Linux paths.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HUD overlay vanishes when target enters native fullscreen on macOS

1 participant