diff --git a/frontend/src/pages/Compliance/CompliancePage.tsx b/frontend/src/pages/Compliance/CompliancePage.tsx index a0177f7..6fc2228 100644 --- a/frontend/src/pages/Compliance/CompliancePage.tsx +++ b/frontend/src/pages/Compliance/CompliancePage.tsx @@ -1,3 +1,126 @@ +import { Topbar } from '../../components/layout/Topbar'; +import { Search, Plus } from 'lucide-react'; + +const SOURCES = [ + { standard: 'EU AI Act', helper: 'Art. 9 — Risk management', scores: ['Art. 9.1', 'Art. 9.2'], status: 'risk' }, + { standard: 'MIIT Draft 2025-08', helper: '§3 — Training data provenance', scores: ['§3.1', '§3.4'], status: 'warn' }, + { standard: 'ISO/SAE 21434:2021', helper: 'Clause 9 — CSMS', scores: ['9.3', '9.4'], status: 'ok' }, +]; + +const STAGES = [ + { label: 'Clause retrieval', pct: 100, status: 'ok' }, + { label: 'Requirement extraction', pct: 100, status: 'ok' }, + { label: 'Gap analysis', pct: 78, status: 'warn' }, + { label: 'Recommendation synthesis', pct: 30, status: 'info' }, +]; + +const FINDINGS = [ + { title: 'Missing risk management documentation', desc: 'No formal risk management system found for the described AI system scope under Art. 9.', status: 'risk' }, + { title: 'Training data lineage incomplete', desc: 'MIIT §3.1 requires traceable provenance for training datasets. Current documentation lacks data source registry.', status: 'warn' }, + { title: 'CSMS audit trail present', desc: 'ISO 21434 audit log requirements are met. Retention policy documented in Annex B.', status: 'ok' }, +]; + +const PARA = `The AI system described in Section 4.2.1 of the Vehicle AI Safety Manual performs real-time classification of driving scenarios to support Level 3 automated driving decisions. The system ingests sensor fusion data from cameras, LIDAR, and radar arrays, processes it through a deep neural network trained on 2.4M annotated driving scenarios, and outputs driving mode recommendations with associated confidence scores. The model was trained using data collected between 2022 and 2024 across European and Chinese road environments.`; + +const STATUS_LABEL: Record = { ok: 'Covered', warn: 'Gap', risk: 'Critical' }; + export function CompliancePage() { - return

Compliance

; + return ( +
+ +
+ + +
+ + + } + /> + +
+

Compliance Workspace

+

Document Paragraph Review

+

+ Three-column AI-assisted compliance gap analysis with regulation retrieval, paragraph review, and findings synthesis. +

+
+ +
+
+
Retrieved Regulations
+ {SOURCES.map(s => ( +
+
+ {s.standard} + {STATUS_LABEL[s.status]} +
+
{s.helper}
+
+ {s.scores.map(sc => {sc})} +
+
+ ))} +
+ +
+
Paragraph Under Review
+
+

+ {PARA.split(/(AI system)/g).map((part, i) => + part === 'AI system' + ? {part} + : {part} + )} +

+
+
+
Analysis stages
+ {STAGES.map(st => ( +
+
+ {st.label} + {st.pct}% +
+
+
+
+
+ ))} +
+
+ +
+
Findings
+ {FINDINGS.map(f => ( +
+
+ {f.title} + {STATUS_LABEL[f.status] ?? f.status} +
+

{f.desc}

+
+ ))} +
+
Conclusion
+

+ The document requires a formal risk management section documenting the AI system classification, risk identification methodology, and mitigation measures per EU AI Act Art. 9 before compliance can be certified. +

+
+
+ Next action + Draft risk management annex +
+
+ Escalation + Legal review required +
+
+
+
+
+
+ ); }