fix: past due meetings are now 8h for ics (#958)

This commit is contained in:
Juan Diego García
2026-04-24 10:32:36 -05:00
committed by GitHub
parent aa7f4cdb39
commit 52888f692f
7 changed files with 119 additions and 18 deletions

View File

@@ -24,6 +24,7 @@ import {
} from "../lib/apiHooks";
import { useRouter } from "next/navigation";
import { formatDateTime, formatStartedAgo } from "../lib/timeUtils";
import { formatJoinError } from "../lib/errorUtils";
import MeetingMinimalHeader from "../components/MeetingMinimalHeader";
import { NonEmptyString } from "../lib/utils";
import { MeetingId, assertMeetingId } from "../lib/types";
@@ -188,6 +189,19 @@ export default function MeetingSelection({
flex="1"
gap={{ base: 4, md: 6 }}
>
{joinMeetingMutation.isError && (
<Box
p={4}
borderRadius="md"
bg="red.50"
borderLeft="4px solid"
borderColor="red.400"
>
<Text color="red.700">
{formatJoinError(joinMeetingMutation.error)}
</Text>
</Box>
)}
{/* Current Ongoing Meetings - BIG DISPLAY */}
{currentMeetings.length > 0 ? (
<VStack align="stretch" gap={6} mb={8}>

View File

@@ -28,6 +28,7 @@ import {
useRoomJoinMeeting,
useMeetingStartRecording,
} from "../../lib/apiHooks";
import { formatJoinError } from "../../lib/errorUtils";
import { omit } from "remeda";
import {
assertExists,
@@ -428,7 +429,7 @@ export default function DailyRoom({ meeting, room }: DailyRoomProps) {
if (joinMutation.isError) {
return (
<Center width="100vw" height="100vh">
<Text color="red.500">Failed to join meeting. Please try again.</Text>
<Text color="red.500">{formatJoinError(joinMutation.error)}</Text>
</Center>
);
}

View File

@@ -13,6 +13,7 @@ import {
import type { components } from "../../reflector-api";
import { useAuth } from "../../lib/AuthProvider";
import { useRoomJoinMeeting } from "../../lib/apiHooks";
import { formatJoinError } from "../../lib/errorUtils";
import { assertMeetingId } from "../../lib/types";
import {
ConsentDialogButton,
@@ -66,7 +67,6 @@ export default function LiveKitRoom({ meeting, room }: LiveKitRoomProps) {
const joinMutation = useRoomJoinMeeting();
const [joinedMeeting, setJoinedMeeting] = useState<Meeting | null>(null);
const [connectionError, setConnectionError] = useState(false);
const [userChoices, setUserChoices] = useState<LocalUserChoices | null>(null);
// ── Consent dialog (same hooks as Daily/Whereby) ──────────
@@ -99,7 +99,7 @@ export default function LiveKitRoom({ meeting, room }: LiveKitRoomProps) {
}
return "";
})();
const isJoining = !!userChoices && !joinedMeeting && !connectionError;
const isJoining = !!userChoices && !joinedMeeting && !joinMutation.isError;
// ── Join meeting via backend API after PreJoin submit ─────
useEffect(() => {
@@ -123,7 +123,6 @@ export default function LiveKitRoom({ meeting, room }: LiveKitRoomProps) {
if (!cancelled) setJoinedMeeting(result);
} catch (err) {
console.error("Failed to join LiveKit meeting:", err);
if (!cancelled) setConnectionError(true);
}
}
@@ -182,10 +181,10 @@ export default function LiveKitRoom({ meeting, room }: LiveKitRoomProps) {
);
}
if (connectionError) {
if (joinMutation.isError) {
return (
<Center h="100vh" bg="gray.50">
<Text fontSize="lg">Failed to connect to meeting</Text>
<Text fontSize="lg">{formatJoinError(joinMutation.error)}</Text>
</Center>
);
}