feat: show scanned pages in email summary + frontend (expandable list)

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) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-28 17:26:03 +02:00
parent 0106f3b5b6
commit 6c0e76f96d
2 changed files with 28 additions and 0 deletions

View File

@@ -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 }) {
</div>
</div>
{/* Scanned Pages */}
{data.pages_list?.length > 0 && (
<details className="text-sm">
<summary className="text-gray-600 cursor-pointer hover:text-gray-800">
{data.pages_scanned} Seiten gescannt Details anzeigen
</summary>
<ul className="mt-2 space-y-1 ml-4">
{data.pages_list.map((p, i) => {
const isMissing = data.missing_pages[p]
return (
<li key={i} className={`text-xs ${isMissing ? 'text-red-600' : 'text-gray-500'}`}>
{isMissing ? '✗' : '✓'} {p} {isMissing ? `(HTTP ${data.missing_pages[p]})` : ''}
</li>
)
})}
</ul>
</details>
)}
{/* AI / Chatbot Detection */}
<div className="flex gap-3">
<span className={`px-3 py-1 rounded-full text-xs font-medium ${data.ai_detected ? 'bg-purple-100 text-purple-800' : 'bg-gray-100 text-gray-600'}`}>

View File

@@ -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}",