/** * WorthDoing.ai * Author: Simon-Pierre Boucher * Contact: contact@spboucher.ai * File: src/app/history/page.tsx * Description: History page — all investigations with status, phase, outcome and telemetry. */ import Link from "next/link"; import { desc } from "drizzle-orm"; import { db } from "@/lib/db/client"; import { investigations } from "@/lib/db/schema"; import { InvestigationStatusBadge, PhaseBadge } from "@/components/wd/badges"; export const dynamic = "force-dynamic"; export default async function HistoryPage() { const rows = await db.select().from(investigations).orderBy(desc(investigations.createdAt)).limit(100); return (

Investigation history

{rows.length === 0 ? (

No investigations yet

Launch one from the home page.

) : ( )}
); }