Skip to content

fix: detect browser meetings on macOS, prevent duplicate popups (#562)#618

Open
prakhar1605 wants to merge 3 commits into
feat/meeting-detect-popup-arjun2from
fix/meeting-detect-mac
Open

fix: detect browser meetings on macOS, prevent duplicate popups (#562)#618
prakhar1605 wants to merge 3 commits into
feat/meeting-detect-popup-arjun2from
fix/meeting-detect-mac

Conversation

@prakhar1605

Copy link
Copy Markdown
Collaborator
  • probe-macos.ts: match NoIdleSleepAssertion (Chrome's WebRTC signal) so browser meetings are detected; tighten PreventUserIdle regex to drop caffeinate/powerd noise
  • browser-match.ts: tighten Slack/Teams rules to require real in-call URLs; prioritize google-meet/zoom/teams/webex over slack-huddle when multiple tabs match
  • suppression.ts: 90s per-app notify cooldown to stop repeat popups when the WebRTC assertion flickers mid-meeting

Tested live on macOS — single correctly-labeled popup confirmed.

- probe-macos.ts: match NoIdleSleepAssertion (Chrome's WebRTC signal) so
  browser meetings are detected; tighten PreventUserIdle regex to drop
  caffeinate/powerd noise
- browser-match.ts: tighten Slack/Teams rules to require real in-call URLs;
  prioritize google-meet/zoom/teams/webex over slack-huddle when multiple
  tabs match
- suppression.ts: 90s per-app notify cooldown to stop repeat popups when
  the WebRTC assertion flickers mid-meeting

Tested live on macOS — single correctly-labeled popup confirmed.
The pmset probe used execFile, which in a packaged .app launched from
Finder (no controlling terminal) has no valid stdin file descriptor.
execFile wires the child's stdio to that invalid fd, and because the
probe fires repeatedly from the detector's background poll loop, the
spawn fails with `EBADF` (errno -9). This never reproduces in dev,
where launching from a terminal provides a valid stdin.

Switch to spawn with stdio ['ignore', 'pipe', 'pipe'] so the child's
stdin points at /dev/null and no invalid parent descriptor is ever
inherited. parseAssertions (and its tests) are unchanged.
Both async variants (execFile and Promise-wrapped spawn) fail with spawn EBADF
(errno -9) in a Finder-launched packaged .app, every detector tick. execFileSync
uses the sync child_process path, already proven in this packaged app
(main.ts uses it at startup). parseAssertions and tests unchanged.
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