fix: auto-end Stay when meeting ends - #9
Merged
Merged
Conversation
avatarneil
enabled auto-merge (squash)
May 13, 2026 23:58
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.
Stay now turns itself off when the protected meeting ends, including native-app paths where Zoom returns to Home or another Zoom shell after the call closes. The classifier is more conservative about native meeting apps: app identity alone is no longer enough when the active window is a known non-meeting shell, while browser meetings still lock on other tabs and end when the protected meeting tab/window stops matching a meeting.
The desktop shell now gets out of the way after PIN setup and other idle-ready transitions, using the macOS app hide/show path so Stay itself does not remain the foreground window and block focus polling. When macOS reports a native app like Zoom with an empty CGWindow title, the platform adapter enriches that snapshot from the focused Accessibility window title before classification; this keeps Zoom Home filtered while allowing a live
Zoom Meetingwindow to prompt correctly. Prompt/lock windows also raise and focus when they need user attention.Native meeting-app end signals from a different window now require confirmation on consecutive polls. That keeps a transient Zoom shell/window observation during app switching from ending the Stay, while still allowing a repeated Zoom Home/Workplace signal to auto-end after the meeting is actually gone. High-confidence cases where the protected meeting window itself stops matching still end immediately.
This follows the shape used by stronger meeting tools: prefer high-confidence signals such as calendar/video links, live audio/call activity, and explicit supported-app state; when Stay only has foreground app/title/window metadata, treat native app shell titles as low confidence instead of prompting on them, and use platform-specific metadata enrichment where the generic provider is incomplete.
Tested with
cargo fmt --all --check,cargo test --workspace,bun run test, andbun run typecheck.