import { Link, useSearchParams } from "react-router"; import { qs, type ExecutionRow, type Project } from "../api"; import { useFetch, fmtDate } from "../hooks"; import { Badge, Empty, ErrorBox, Loading, Pager, Td } from "../components/ui"; const STATES = ["intent", "running", "succeeded", "failed", "blocked", "quarantined", "unobserved"]; export default function Executions() { const [sp, setSp] = useSearchParams(); const project_id = sp.get("project_id") ?? "", state = sp.get("state") ?? "", offset = Number(sp.get("offset") ?? 0), limit = 50; const { data, error, loading } = useFetch<{ executions: ExecutionRow[]; total: number }>(`executions${qs({ project_id, state, limit, offset })}`); const projects = useFetch<{ projects: Project[] }>("projects"); const set = (k: string, v: string) => setSp((p) => { const n = new URLSearchParams(p); if (v) n.set(k, v); else n.delete(k); if (k !== "offset") n.delete("offset"); return n; }); return (
Every mediated call: intent persisted before the request, outcome after. Blocked and quarantined rows are policy decisions, not errors.
| When | State | Decision | Project | API / AKP | Request | Status | ms | Caller |
|---|---|---|---|---|---|---|---|---|
| {fmtDate(e.created_at)} | {e.project_slug} {e.policy_mode} | {e.akp_id ? `${e.akp_id} v${e.akp_version}` : e.api_name ?? unregistered} | {e.method} {e.url}{e.error && {e.error.slice(0, 120)} } | {e.status_code ?? "—"} | {e.duration_ms ?? "—"} | {e.agent_name ?? e.caller} |