fix: detect browser meetings on macOS, prevent duplicate popups (#562)#618
Open
prakhar1605 wants to merge 3 commits into
Open
fix: detect browser meetings on macOS, prevent duplicate popups (#562)#618prakhar1605 wants to merge 3 commits into
prakhar1605 wants to merge 3 commits into
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested live on macOS — single correctly-labeled popup confirmed.