Files
reflector/www/app/[roomName]/wait/[eventId]/page.tsx
Mathieu Virbel 98e05e484a feat: complete calendar integration with UI improvements and code cleanup
Calendar Integration Tasks:
- Update upcoming meetings window from 30 to 120 minutes
- Include currently happening events in upcoming meetings API
- Create shared time utility functions (formatDateTime, formatCountdown, formatStartedAgo)
- Improve ongoing meetings UI logic with proper time detection
- Fix backend code organization and remove excessive documentation

UI/UX Improvements:
- Restructure room page layout using MinimalHeader pattern
- Remove borders from header and footer elements
- Change button text from "Leave Meeting" to "Leave Room"
- Remove "Back to Reflector" footer for cleaner design
- Extract WaitPageClient component for better separation

Backend Changes:
- calendar_events.py: Fix import organization and extend timing window
- rooms.py: Update API default from 30 to 120 minutes
- Enhanced test coverage for ongoing meeting scenarios

Frontend Changes:
- MinimalHeader: Add onLeave prop for custom navigation
- MeetingSelection: Complete layout restructure with shared utilities
- timeUtils: New shared utility file for consistent time formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 08:51:40 -06:00

58 lines
1.4 KiB
TypeScript

import {
Box,
Spinner,
Text,
VStack,
Button,
HStack,
Badge,
} from "@chakra-ui/react";
import MinimalHeader from "../../../components/MinimalHeader";
import { Metadata } from "next";
import WaitPageClient from "./WaitPageClient";
interface WaitPageProps {
params: {
roomName: string;
eventId: string;
};
}
// Generate dynamic metadata for the waiting page
export async function generateMetadata({
params,
}: WaitPageProps): Promise<Metadata> {
const { roomName } = params;
try {
const response = await fetch(
`${process.env.NEXT_PUBLIC_REFLECTOR_API_URL}/v1/rooms/name/${roomName}`,
{
headers: {
"Content-Type": "application/json",
},
},
);
if (response.ok) {
const room = await response.json();
const displayName = room.display_name || room.name;
return {
title: `Waiting for Meeting - ${displayName}'s Room`,
description: `Waiting for upcoming meeting in ${displayName}'s room on Reflector.`,
};
}
} catch (error) {
console.error("Failed to fetch room for metadata:", error);
}
return {
title: `Waiting for Meeting - ${roomName}'s Room`,
description: `Waiting for upcoming meeting in ${roomName}'s room on Reflector.`,
};
}
export default function WaitPage({ params }: WaitPageProps) {
return <WaitPageClient params={params} />;
}