Skip to content

Hide overlay when no sessions are active#21

Open
AsenkoDev wants to merge 1 commit into
hezi:mainfrom
AsenkoDev:feature/hide-overlay-when-idle
Open

Hide overlay when no sessions are active#21
AsenkoDev wants to merge 1 commit into
hezi:mainfrom
AsenkoDev:feature/hide-overlay-when-idle

Conversation

@AsenkoDev
Copy link
Copy Markdown

Adds an opt-in "Hide overlay when no sessions are active" toggle in Settings → Behavior (default off, so existing users see no change). When enabled, the overlay window is orderOut'd while sessionManager.activeSessions is empty and orderFront'd when a session appears.

  • Uses activeSessions.isEmpty, which excludes .complete sessions, so the .ready state (completion card) keeps the overlay visible for its ~8s window before fading out.
  • KVO-backed (@objc dynamic var hideOverlayWhenEmpty: Bool on UserDefaults + Combine .publisher(for:)), so toggling the setting takes effect immediately.
  • Both window modes supported: classic NotchWindow and SystemChromeNotchScene. A small helper overlayWindow() abstracts the cross-mode lookup.
  • refreshNotchWindow() no longer gates createNotchWindow() on !activeSessions.isEmpty — visibility is now solely the concern of updateNotchVisibility(), so switching window mode with no active sessions no longer leaves the overlay permanently orphaned.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant