import { projectRef } from "@/lib/projects"; import { readinessOf } from "@/lib/inbox/readiness"; export const dynamic = "force-dynamic"; // THE READINESS BAR as JSON (lib/inbox/readiness.ts; the workspace's row under its top bar): GET ?project= -> // { project, pills: [{ id, label, state: bad|count|ok|none, count, title, href }] }. Read-only: it writes nothing. export async function GET(request: Request) { const project = await projectRef(new URL(request.url).searchParams.get("project") ?? ""); if (!project) return Response.json({ error: "no such project" }, { status: 404 }); return Response.json(await readinessOf(project), { headers: { "cache-control": "no-store" } }); }