From 26cf1204b504384f8822e08ea13c8b84c26ea44a Mon Sep 17 00:00:00 2001 From: Lotus CI Date: Sat, 17 Oct 2026 20:03:40 -0400 Subject: [PATCH] fix(calls): the call-failed screen gets a Try again button (#301) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "The call failed to load… try again" only offered Back, so the user had to back out and press Join again. Try again starts a fresh embed for the same room with the same mic/camera/sound (which disposes the hung one); Back stays as the secondary action. Fixes #301 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5 --- src/app/features/call/CallView.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/features/call/CallView.tsx b/src/app/features/call/CallView.tsx index f4e21a5ab..5973d9bf6 100644 --- a/src/app/features/call/CallView.tsx +++ b/src/app/features/call/CallView.tsx @@ -6,12 +6,13 @@ import { useCallJoined, useCallEmbedPlacementSync, useCallLoadError, + useCallStart, } from '../../hooks/useCallEmbed'; import { callEmbedAtom } from '../../state/callEmbed'; import { ContainerColor } from '../../styles/ContainerColor.css'; import { PrescreenControls } from './PrescreenControls'; import { usePowerLevelsContext } from '../../hooks/usePowerLevels'; -import { useRoom } from '../../hooks/useRoom'; +import { useIsDirectRoom, useRoom } from '../../hooks/useRoom'; import { useRoomCreators } from '../../hooks/useRoomCreators'; import { useRoomPermissions } from '../../hooks/useRoomPermissions'; import { useMatrixClient } from '../../hooks/useMatrixClient'; @@ -160,6 +161,16 @@ function CallLoadErrorMessage() { // prescreen, where they can choose to join again. const dismiss = () => setCallEmbed(undefined); + // [Gitea #301] Try again: start a fresh embed for the same room with the + // same mic/camera/sound choices (starting one disposes the hung one). + const callEmbed = useCallEmbed(); + const startCall = useCallStart(useIsDirectRoom()); + const retry = () => { + if (!callEmbed) return; + const { room, control } = callEmbed; + startCall(room, { microphone: control.microphone, video: control.video, sound: control.sound }); + }; + return ( +