import Link from "next/link"; import AppHeader from "@/components/shell/AppHeader"; import AppRail from "@/components/shell/AppRail"; import BoardView from "@/components/research/BoardView"; import { EmptyState } from "@/components/ui/empty-state"; import { caseView } from "@/lib/research/boards"; import { researchHref } from "@/lib/research/hrefs"; import type { CaseView } from "@/lib/research/case-types"; export const dynamic = "force-dynamic"; // A RESEARCH BOARD (plans/umtool-redesign.md, R2; canvas "Research board"): // one case, umtool-side under REPORTS_ROOT/.umtool/research//. The // static segments beside it (archive, and R3's runs) win over this one, and // the case store reserves their names. The board is the client's // (components/research/BoardView.tsx); this reads the case for the first frame. export default async function CasePage({ params }: { params: Promise<{ case: string }> }) { const { case: id } = await params; let view: CaseView | null = null; let error: { status: number; message: string } | null = null; try { view = await caseView(decodeURIComponent(id)); } catch (e) { error = { status: (e as { status?: number }).status ?? 500, message: (e as Error).message }; } return (
{view ? ( ) : ( <>
{error?.message}{" "} Research
)}
); }