Clarify screen capture availability probing
Summary
Clarifies the screen capture watcher so it no longer treats Electron's source enumeration as active screen sharing detection.
Electron's desktopCapturer.getSources() can confirm whether screen/window capture sources can be enumerated, but it does not reliably indicate whether another app is currently sharing the screen. This change makes that distinction explicit by tracking capture availability separately from screen sharing mode.
What Changed
- Adds explicit screenCaptureStatus state with available, lastError, and lastCheckedAt
- Prevents overlapping capture availability checks
- Keeps isScreenBeingShared unchanged when capture enumeration fails
- Exposes capture availability through getWindowStats()
- Updates logs to distinguish capture availability from screen sharing mode
Why
The previous implementation implied that desktopCapturer.getSources() detected active screen sharing. In practice, it only verifies that Electron can enumerate capture sources. Treating that probe as screen sharing detection could produce misleading state and confusing logs.
This keeps the existing screen sharing mode behavior intact while making the periodic probe accurate and observable.
Validation
- Ran node -c src/managers/window.manager.js
- Ran git diff --check
- Confirmed only src/managers/window.manager.js is included in the commit