From 128967fa3d4c433d333696f5de560132c6a66365 Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 12 May 2026 12:28:00 +0200 Subject: [PATCH] fix(checklist-ui): show INFO-severity checks as gray info icon INFO checks (V.i.S.d.P., Streitbeilegung, Berufsrecht, Stammkapital, etc.) that fail are now shown with a gray info icon instead of red X, with gray hint text. They are excluded from the Pflichtangaben count since they are context-dependent and likely not applicable. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../sdk/agent/_components/ChecklistView.tsx | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx b/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx index 4c99f87..7326cc7 100644 --- a/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx +++ b/admin-compliance/app/sdk/agent/_components/ChecklistView.tsx @@ -46,7 +46,7 @@ function groupChecks(checks: CheckItem[]): GroupedCheck[] { })) } -function CheckIcon({ passed, skipped }: { passed: boolean; skipped?: boolean }) { +function CheckIcon({ passed, skipped, isInfo }: { passed: boolean; skipped?: boolean; isInfo?: boolean }) { if (skipped) { return ( @@ -61,6 +61,13 @@ function CheckIcon({ passed, skipped }: { passed: boolean; skipped?: boolean }) ) } + if (isInfo) { + return ( + + + + ) + } return ( @@ -104,8 +111,9 @@ export function ChecklistView({ results }: { results: DocResult[] }) { const typeLabel = DOC_TYPE_LABELS[r.doc_type] || r.doc_type const grouped = groupChecks(r.checks) const l1Checks = r.checks.filter(c => (c.level ?? 1) === 1) + const l1Scoreable = l1Checks.filter(c => c.severity !== 'INFO') const l2Active = r.checks.filter(c => (c.level ?? 1) === 2 && !c.skipped) - const l1Passed = l1Checks.filter(c => c.passed).length + const l1Passed = l1Scoreable.filter(c => c.passed).length const l2Passed = l2Active.filter(c => c.passed).length return ( @@ -126,7 +134,7 @@ export function ChecklistView({ results }: { results: DocResult[] }) {
{r.label}
{l1Checks.length > 0 - ? `${l1Passed}/${l1Checks.length} Pflichtangaben` + ? `${l1Passed}/${l1Scoreable.length} Pflichtangaben` + (l2Active.length > 0 ? `, ${l2Passed}/${l2Active.length} Detailpruefungen` : '') : r.url}
@@ -164,13 +172,18 @@ export function ChecklistView({ results }: { results: DocResult[] }) {

{r.error}

) : (
- {grouped.map((g) => ( + {grouped.map((g) => { + const l1Info = g.check.severity === 'INFO' && !g.check.passed + return (
{/* L1 check */}
- +
-
+
{g.check.label} {g.children.length > 0 && {g.children}}
@@ -180,7 +193,7 @@ export function ChecklistView({ results }: { results: DocResult[] }) {
)} {!g.check.passed && g.check.hint && ( -
+
{g.check.hint}
)} @@ -190,13 +203,16 @@ export function ChecklistView({ results }: { results: DocResult[] }) { {/* L2 children — always visible */} {g.children.length > 0 && (
- {g.children.map((ch) => ( + {g.children.map((ch) => { + const chInfo = ch.severity === 'INFO' && !ch.passed && !ch.skipped + return (
- +
{ch.label} {ch.skipped && ' (uebersprungen)'} @@ -207,17 +223,19 @@ export function ChecklistView({ results }: { results: DocResult[] }) {
)} {!ch.passed && !ch.skipped && ch.hint && ( -
+
{ch.hint}
)}
- ))} + ) + })}
)}
- ))} + ) + })} {r.word_count > 0 && (
{r.word_count} Woerter analysiert