import { listActivity, runningActivity } from "@/lib/activity"; export const dynamic = "force-dynamic"; // The dashboard's one poll. Both registries, one shape, no-store. The per-route // GETs (/api/report/build?job=, /api/mix/render?job=) are untouched: they carry // the log and the events, which this deliberately does not. export async function GET(request: Request) { const url = new URL(request.url); const n = Math.max(1, Math.min(50, Number(url.searchParams.get("n") ?? 8) || 8)); return Response.json( { running: runningActivity(), jobs: listActivity(n) }, { headers: { "cache-control": "no-store" } }, ); }