import Link from "next/link"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { BrandMark } from "@/components/layout/BrandMark"; import { SessionsTable } from "@/components/sessions/SessionsTable"; import { listSessions } from "@/lib/db/queries/sessions"; import { getSessionsSummary } from "@/lib/db/queries/stats"; // Always reflects live DB state for an authenticated, single-tenant app - // never worth prerendering (and the DB file doesn't exist at build time). export const dynamic = "force-dynamic"; export default async function DashboardPage() { const [sessions, summary] = await Promise.all([listSessions(), getSessionsSummary()]); const recentSessions = [...sessions].reverse().slice(0, 5); return (

Welcome back

Scan for nearby devices, take control, and replay completed sessions later - all running directly from your browser over Web Bluetooth.

Completed sessions {summary.count} Total play time {(summary.totalDurationMs / 3_600_000).toFixed(1)}h Replays {summary.totalReplays}
Recent sessions
); }