feat(admin): Tab "Browser-Verhalten" — Per-Browser-Matrix + Screenshots (Phase 3)
- BrowserBehaviorView: laedt gespeicherte Matrix (GET), sonst "Browser-Test starten" (POST run, Live-Lauf). Per-Browser-Tabelle (Cookies vor Consent / nach Ablehnen / Ablehnen respektiert / Oberflaeche / Score), Engine-Detail mit Banner-Screenshot + Oberflaechen-Befunden, Mobil-Badge, "nicht verfuegbar"-Zeilen fuer fehlende Browser (arm64-Dev). - Proxys browser-behavior (GET) + browser-behavior/run (POST, langer Timeout). - page.tsx: Tab "Browser-Verhalten" (sichtbar sobald scanbare URL im Snapshot). - consent-tester scan_matrix_summary: banner_findings je Engine im summary (Text/Severity/Norm) → Oberflaechen-Befunde im Tab. - tsc strict clean; Vitest BrowserBehaviorView (2). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ import { CookieLibraryPanel } from '../../_components/CookieLibraryPanel'
|
||||
import { CookieDeclarationDiff } from '../../_components/CookieDeclarationDiff'
|
||||
import { CookieResultView } from '../../_components/CookieResultView'
|
||||
import { AgentModuleTab } from '../../_components/AgentModuleTab'
|
||||
import { BrowserBehaviorView } from '../../_components/BrowserBehaviorView'
|
||||
|
||||
export default function SnapshotDetail(
|
||||
{ params }: { params: Promise<{ snapshotId: string }> },
|
||||
@@ -53,12 +54,16 @@ export default function SnapshotDetail(
|
||||
const hasCookies = (snap?.cmp_vendors?.length ?? 0) > 0
|
||||
const hasDoc = (dt: string) => docs.some(
|
||||
(e: any) => e.doc_type === dt && (e.text || e.content || '').length > 100)
|
||||
// Browser-Verhalten braucht nur eine scanbare URL (on-demand-Live-Lauf).
|
||||
const hasSite = docs.some((e: any) => (e.url || '').trim())
|
||||
|| (!!snap?.site_domain && snap.site_domain !== 'unknown')
|
||||
|
||||
const modules = useMemo(() => [
|
||||
...(hasCookies ? [{ key: 'cookie', label: 'Cookies & Tracking' }] : []),
|
||||
...(hasDoc('impressum') ? [{ key: 'impressum', label: 'Impressum' }] : []),
|
||||
...(hasDoc('dse') ? [{ key: 'dse', label: 'Datenschutzerklärung' }] : []),
|
||||
...(hasDoc('agb') ? [{ key: 'agb', label: 'AGB' }] : []),
|
||||
...(hasSite ? [{ key: 'browser', label: 'Browser-Verhalten' }] : []),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
], [snap])
|
||||
|
||||
@@ -133,6 +138,10 @@ export default function SnapshotDetail(
|
||||
{tab === 'agb' && (
|
||||
<AgentModuleTab snapshotId={snapshotId} docType="agb" label="AGB" />
|
||||
)}
|
||||
|
||||
{tab === 'browser' && (
|
||||
<BrowserBehaviorView snapshotId={snapshotId} />
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user