Originally created by: kristofferR
Chatpane has no call-specific handling. When a call comes in while Chatpane is hidden in the tray, minimized, or behind other apps, the only signal is whatever Messenger's page does on its own: an in-page dialog nobody can see and a ringtone played by the webview. A hidden webview may be throttled or suspended (see [#232] for how WebKit's suspend policy behaves on macOS), so it is not clear the ringtone or any page notification reliably reaches the user. Calls can be missed without anyone noticing.
inject/src/messenger/lib/calls.ts only checks whether the engine supports WebRTC. Nothing detects an incoming call.
An incoming call is impossible to miss when Chatpane is not in front, and the user can answer or decline it without first finding the window.
Before designing the UI, establish on each platform what actually happens today when a call arrives with the main window hidden, minimized, and behind another app:
Notification for the call, and does it currently go through chatpane:notify (and therefore get silenced by Mute Notifications)?chatpane:incoming-call / chatpane:call-ended), separate from message notifications.UserAttentionType::Critical, which keeps the Dock icon bouncing; message notifications use Informational, a single bounce.scenario="incomingCall" stays on screen, loops a ringtone (ms-winsoundevent:Notification.Looping.Call) and shows large Answer and Decline buttons. Built on the existing windows/toast.rs.timeSensitive interruption level gets through Focus even when the caller isn't on the allowed list. Needs the com.apple.developer.usernotifications.time-sensitive entitlement and macOS 12+. It doesn't stay on screen, so the Dock bounce matters.urgency critical (2), which most daemons keep on screen until dismissed, plus action buttons.