Style dashboard's Recent sessions as a real table

Reuse SessionsTable (same component as the Sessions page) instead of a
bespoke flex/hairline list, so status badges, replay/delete actions,
and column layout match the rest of the app.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzyfRyA7h5rs5SCAahLAWd
This commit is contained in:
2026-08-30 20:39:43 +02:00
co-authored by Claude Sonnet 5
parent d5a8cb81cf
commit 7643e9d509
+4 -14
View File
@@ -2,6 +2,7 @@ import Link from "next/link";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { BrandMark } from "@/components/layout/BrandMark"; import { BrandMark } from "@/components/layout/BrandMark";
import { SessionsTable } from "@/components/sessions/SessionsTable";
import { listSessions } from "@/lib/db/queries/sessions"; import { listSessions } from "@/lib/db/queries/sessions";
import { getSessionsSummary } from "@/lib/db/queries/stats"; import { getSessionsSummary } from "@/lib/db/queries/stats";
@@ -55,21 +56,10 @@ export default async function DashboardPage() {
<Card className="bp-glass"> <Card className="bp-glass">
<CardHeader> <CardHeader>
<CardTitle>Recent sessions</CardTitle> <CardTitle className="text-base">Recent sessions</CardTitle>
</CardHeader> </CardHeader>
<CardContent className="flex flex-col"> <CardContent className="flex flex-col gap-3">
{recentSessions.length === 0 && <p className="text-sm text-muted-foreground">No sessions yet.</p>} <SessionsTable sessions={recentSessions} />
{recentSessions.map((s, i) => (
<Link key={s.id} href={`/sessions/${s.id}`} className="group">
{i > 0 && <div className="bp-hairline" />}
<div className="flex items-center justify-between px-1 py-2 text-sm">
<span className="group-hover:text-primary">{s.name ?? `Session #${s.id}`}</span>
<span className="bp-readout text-xs text-muted-foreground">
{new Date(s.startedAt).toLocaleDateString()}
</span>
</div>
</Link>
))}
</CardContent> </CardContent>
</Card> </Card>
</div> </div>