import Link from "next/link"; import AppHeader from "@/components/shell/AppHeader"; import AppRail from "@/components/shell/AppRail"; import TriageView from "@/components/series/TriageView"; import { EmptyState } from "@/components/ui/empty-state"; import { seriesHref } from "@/lib/hrefs"; import { readTriageRunView } from "@/lib/research/triage"; import type { TriageRunView } from "@/lib/research/triage-types"; export const dynamic = "force-dynamic"; // ONE TRIAGE RUN of a recurring report (plans/umtool-redesign.md, R6): its // tiers -- the candidates, each flag and dismissal with its reason, what // escalated and why, the spend per tier -- and the marks // (components/series/TriageView.tsx). Under the series' static segment; a // living report's runs are here too (its schedule's id is its article's). export default async function TriagePage({ params }: { params: Promise<{ id: string; k: string }> }) { const { id: raw, k } = await params; const id = decodeURIComponent(raw); let view: TriageRunView | null = null; let error: { status: number; message: string } | null = null; try { view = await readTriageRunView(id, Number(k)); } catch (e) { error = { status: (e as { status?: number }).status ?? 500, message: (e as Error).message }; } return (