From 6c0e76f96dcda03cc89e0e33be5437e48859143a Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Tue, 28 Apr 2026 17:26:03 +0200 Subject: [PATCH] feat: show scanned pages in email summary + frontend (expandable list) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Email now lists all scanned URLs with checkmark/cross status. Frontend shows collapsible "X Seiten gescannt — Details anzeigen". Co-Authored-By: Claude Opus 4.6 (1M context) --- .../app/sdk/agent/_components/ScanResult.tsx | 20 +++++++++++++++++++ .../compliance/api/agent_scan_routes.py | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/admin-compliance/app/sdk/agent/_components/ScanResult.tsx b/admin-compliance/app/sdk/agent/_components/ScanResult.tsx index 415d94a..e19d01f 100644 --- a/admin-compliance/app/sdk/agent/_components/ScanResult.tsx +++ b/admin-compliance/app/sdk/agent/_components/ScanResult.tsx @@ -23,6 +23,7 @@ interface ScanFinding { interface ScanData { pages_scanned: number + pages_list: string[] services: ServiceInfo[] findings: ScanFinding[] ai_detected: boolean @@ -74,6 +75,25 @@ export function ScanResult({ data }: { data: ScanData }) { + {/* Scanned Pages */} + {data.pages_list?.length > 0 && ( +
+ + {data.pages_scanned} Seiten gescannt — Details anzeigen + +
    + {data.pages_list.map((p, i) => { + const isMissing = data.missing_pages[p] + return ( +
  • + {isMissing ? '✗' : '✓'} {p} {isMissing ? `(HTTP ${data.missing_pages[p]})` : ''} +
  • + ) + })} +
+
+ )} + {/* AI / Chatbot Detection */}
diff --git a/backend-compliance/compliance/api/agent_scan_routes.py b/backend-compliance/compliance/api/agent_scan_routes.py index 1ab7094..64eb7ba 100644 --- a/backend-compliance/compliance/api/agent_scan_routes.py +++ b/backend-compliance/compliance/api/agent_scan_routes.py @@ -59,6 +59,7 @@ class ScanFinding(BaseModel): class ScanResponse(BaseModel): url: str pages_scanned: int + pages_list: list[str] = [] services: list[ServiceInfo] findings: list[ScanFinding] ai_detected: bool @@ -111,6 +112,7 @@ async def scan_website_endpoint(req: ScanRequest): return ScanResponse( url=req.url, pages_scanned=len(scan.pages_scanned), + pages_list=scan.pages_scanned, services=services_info, findings=findings, ai_detected=len(scan.ai_mentions) > 0, @@ -274,6 +276,12 @@ def _build_scan_summary( f"{mode} — Website-Scan", f"URL: {url}", f"Seiten gescannt: {len(scan.pages_scanned)}", + ] + for page in scan.pages_scanned: + status = scan.missing_pages.get(page, 200) + marker = "✗" if status >= 400 else "✓" + parts.append(f" {marker} {page}" + (f" (HTTP {status})" if status >= 400 else "")) + parts.extend([ "", f"Dienstleister-Abgleich (DSE vs. Website):", f" Korrekt dokumentiert: {n_ok}",