From c54a3fe277053bbbd61b88ee7504c4d558106ea0 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 21 Mar 2026 21:14:52 -0700 Subject: [PATCH] fix(admin-web): fix agent-evals run endpoint + disable delete (no backend) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - B18: POST /agent-evals/suites/:id/run → /suites/:id/runs (plural) - B19: DELETE /agent-evals/suites/:id has no backend endpoint — disabled with TODO Q3 --- .../src/app/(dashboard)/agent-evals/page.tsx | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/dashboards/admin-web/src/app/(dashboard)/agent-evals/page.tsx b/dashboards/admin-web/src/app/(dashboard)/agent-evals/page.tsx index 22d472e0..de38c919 100644 --- a/dashboards/admin-web/src/app/(dashboard)/agent-evals/page.tsx +++ b/dashboards/admin-web/src/app/(dashboard)/agent-evals/page.tsx @@ -11,7 +11,6 @@ import { CheckCircle2, XCircle, Clock, - Trash2, } from 'lucide-react'; import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; import { Badge } from '@/components/ui/badge'; @@ -104,15 +103,17 @@ export default function AgentEvalsPage() { } async function handleRun(id: string) { - await apiFetch(`suites/${id}/run`, { method: 'POST' }); + await apiFetch(`suites/${id}/runs`, { method: 'POST' }); loadData(); } - async function handleDelete(id: string) { - if (!confirm('Delete this evaluation suite?')) return; - await apiFetch(`suites/${id}`, { method: 'DELETE' }); - loadData(); - } + // TODO Q3: Backend has no DELETE /agent-evals/suites/:id endpoint. + // When suite deletion is implemented, uncomment this. + // async function handleDelete(id: string) { + // if (!confirm('Delete this evaluation suite?')) return; + // await apiFetch(`suites/${id}`, { method: 'DELETE' }); + // loadData(); + // } const passedCount = suites.filter(s => s.lastRunStatus === 'passed').length; const failedCount = suites.filter(s => s.lastRunStatus === 'failed').length; @@ -244,13 +245,7 @@ export default function AgentEvalsPage() { Run - handleDelete(s.id)} - className="text-destructive" - > - - Delete - + {/* TODO Q3: Delete disabled — no backend endpoint yet */}