From 0416bb5d04f4a914ebe9d2fc5d745233a36ac220 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Wed, 6 May 2026 10:56:44 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Checklist=20expand=20=E2=80=94=20use=20i?= =?UTF-8?q?ndex=20instead=20of=20URL=20(prevents=20all=20opening=20at=20on?= =?UTF-8?q?ce)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../app/sdk/agent/_components/ChecklistView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx b/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx index d5e75b6..ae8387d 100644 --- a/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx +++ b/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx @@ -27,7 +27,7 @@ const DOC_TYPE_LABELS: Record = { } export function ChecklistView({ results }: { results: DocResult[] }) { - const [expanded, setExpanded] = useState(null) + const [expanded, setExpanded] = useState(null) if (!results || results.length === 0) return null @@ -43,7 +43,7 @@ export function ChecklistView({ results }: { results: DocResult[] }) {
{results.map((r, i) => { - const isExp = expanded === r.url + const isExp = expanded === i const pct = r.completeness_pct const barColor = pct === 100 ? 'bg-green-500' : pct >= 80 ? 'bg-green-400' : pct >= 50 ? 'bg-yellow-500' : 'bg-red-500' const typeLabel = DOC_TYPE_LABELS[r.doc_type] || r.doc_type @@ -51,7 +51,7 @@ export function ChecklistView({ results }: { results: DocResult[] }) { return (