From f2eabed7aec67120e57adb8e46eb74de517bc62f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 29 Sep 2026 11:51:29 +0100 Subject: [PATCH] Say "Server unavailable" for signal-only reconnects instead of muting the call When the SFU drops the signalling WebSocket, livekit-client resumes it while the peer connection stays up and media keeps flowing. EC treated this as a full reconnect: playback volume zeroed on every remote tile, remote video hidden, and the non-dismissable Reconnecting scrim shown, so a 2 s blip silenced the whole call. LocalMember now exposes signalReconnecting$ separately and no longer counts SignalReconnecting as a disconnect, so reconnecting$ (and with it pretendToBeDisconnected$, the hands/reactions pause and the reconnect analytics) only fires for a real Reconnecting, a disconnect or a homeserver problem. InCallView shows a scrimless, non-modal "Server unavailable" toast for the signal-only case so the user still gets told what is going on, per the review of the first attempt. --- locales/en/app.json | 1 + src/room/InCallView.tsx | 13 +++++ .../__snapshots__/InCallView.test.tsx.snap | 20 ++++---- src/state/CallViewModel/CallViewModel.ts | 6 +++ .../localMember/LocalMember.test.ts | 49 +++++++++++++++++++ .../CallViewModel/localMember/LocalMember.ts | 21 +++++++- 6 files changed, 99 insertions(+), 11 deletions(-) diff --git a/locales/en/app.json b/locales/en/app.json index e31c7d50a..3c7adaf3c 100644 --- a/locales/en/app.json +++ b/locales/en/app.json @@ -117,6 +117,7 @@ "room_creation_restricted": "Failed to create call", "room_creation_restricted_description": "Call creation might be restricted to authorized users only. Try again later, or contact your server admin if the problem persists.", "screen_share_failed": "Could not start screen sharing", + "server_unavailable": "Server unavailable", "sticky_events_required": "Homeserver does not support Matrix 2.0 calls", "sticky_events_required_description": "This deployment is configured to use Matrix 2.0 call mode, but the homeserver does not advertise support for sticky events (MSC4354). Ask your server admin to upgrade, or switch the deployment to a compatible mode.", "unexpected_ec_error": "An unexpected error occurred (<0>Error Code: <1>{{ errorCode }}). Please contact your server admin." diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index b8d7ab89d..01e11c7b8 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -299,6 +299,7 @@ export const InCallView: FC = ({ const audioParticipants = useBehavior(vm.livekitRoomItems$); const participantCount = useBehavior(vm.participantCount$); const reconnecting = useBehavior(vm.reconnecting$); + const signalReconnecting = useBehavior(vm.signalReconnecting$); const screenShareError = useBehavior(vm.screenShareError$); const layout = useBehavior(vm.layout$); const edgeToEdge = useBehavior(vm.edgeToEdge$); @@ -462,6 +463,17 @@ export const InCallView: FC = ({ ); + // Media is still flowing, so no scrim and nothing paused: just say so + const serverUnavailableToast = ( + + {t("error.server_unavailable")} + + ); + const earpieceOverlay = ( = ({ {reconnectingToast} + {serverUnavailableToast} {screenShareToast} {earpieceOverlay} diff --git a/src/room/__snapshots__/InCallView.test.tsx.snap b/src/room/__snapshots__/InCallView.test.tsx.snap index b7f8b3fe3..674ce9fd5 100644 --- a/src/room/__snapshots__/InCallView.test.tsx.snap +++ b/src/room/__snapshots__/InCallView.test.tsx.snap @@ -172,7 +172,7 @@ exports[`InCallView > rendering > renders 1`] = ` class="_settingsLogoContainer_20b7b4" >