Extract tabs nav, templates grid, editor split view, settings form,
logs table, and data-loading/actions hook into _components/ and
_hooks/. page.tsx reduced from 816 to 88 LOC.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Break 838-line page.tsx into _types.ts, _data.ts (templates),
_components/{AddRequirementForm,RequirementCard,LoadingSkeleton}.tsx,
and _hooks/useRequirementsData.ts. page.tsx is now 246 LOC (wiring
only). No behavior changes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract nav tabs, detail modal, table row, stats grid, search/filter,
records table, pagination, and data-loading hook into _components/ and
_hooks/. page.tsx reduced from 833 to 114 LOC.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split the 854-line DSR detail page into colocated components under
_components/ and a data-loading hook under _hooks/. No behavior changes.
page.tsx is now 172 LOC, all extracted files under 300 LOC.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Break 839-line page.tsx into _types.ts, _components/SourcesTab.tsx,
JobsTab.tsx, DocumentsTab.tsx, ReportTab.tsx, and ComplianceRing.tsx.
page.tsx is now 56 LOC (wiring only). No behavior changes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split 1130-LOC document-generator page into _components and _constants
modules. page.tsx now 243 LOC (wire-up only). Behavior preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract DetailPanel, ArchHeader, Toolbar, ArchCanvas and ServiceTable into
_components/, the ReactFlow node/edge builder into _hooks/useArchGraph, and
layout constants/helpers into _layout.ts. page.tsx drops from 950 to 91 LOC,
well below the 300 soft target.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract TabNavigation, StatCard, RequestCard, FilterBar, DSRCreateModal,
DSRDetailPanel, DSRHeaderActions, and banner components (LoadingSpinner,
SettingsTab, OverdueAlert, DeadlineInfoBox, EmptyState) into _components/
so page.tsx drops from 1019 to 247 LOC (under the 300 soft target).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split 876-LOC page.tsx into 146 LOC with 7 colocated components
(RoadmapCard, CreateRoadmapModal, CreateItemModal, ImportWizard,
RoadmapDetailView split into header + items table), plus _types.ts,
_constants.ts, and _api.ts. Behavior preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split 1175-LOC workflow page into _components, _hooks and _types modules.
page.tsx now 256 LOC (wire-up only). Behavior preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract ObligationModal, ObligationDetail, ObligationCard, ObligationsHeader,
StatsGrid, FilterBar and InfoBanners into _components/, plus _types.ts for
shared types/constants. page.tsx drops from 987 to 325 LOC, below the 300
soft target region and well under the 500 hard cap.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract BetriebOverviewPanel, DetailPanel, FlowCanvas, FlowToolbar,
StepTable, useFlowGraph hook and helpers into _components/ so page.tsx
drops from 1019 to 156 LOC (under the 300 soft target).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split 879-LOC page.tsx into 187 LOC with 11 colocated components,
_types.ts and _constants.ts for the industry templates module.
Behavior preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Agent-completed splits committed after agents hit rate limits before
committing their work. All 4 pages now under 500 LOC:
- consent-management: 1303 -> 193 LOC (+ 7 _components, _hooks, _data, _types)
- control-library: 1210 -> 298 LOC (+ _components, _types)
- incidents: 1150 -> 373 LOC (+ _components)
- training: 1127 -> 366 LOC (+ _components)
Verification: next build clean (142 pages generated).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split 1257-LOC client page into _types.ts plus nine components under
_components/ (TabNavigation/StatCard/FilterBar in shared, CourseCard,
EnrollmentCard, CertificatesTab, EnrollmentEditModal, CourseEditModal,
SettingsTab, and PageSections for header actions and empty states).
Behavior preserved exactly; page.tsx is now a thin wiring shell.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract types, constants, helpers, and UI pieces (shared LoadingSkeleton/
EmptyState/StatusBadge/CopyButton, SSOConfigFormModal, DeleteConfirmModal,
ConnectionTestPanel, SSOConfigCard, SSOUsersTable, SSOInfoSection) into
_components/ and _types.ts to bring page.tsx from 1482 LOC to 339 LOC
(under the 500 hard cap). Behavior preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Whistleblower (1220 -> 349 LOC) split into 6 colocated components:
TabNavigation, StatCard, FilterBar, ReportCard, WhistleblowerCreateModal,
CaseDetailPanel. All under the 300 LOC soft target.
Drive-by fix: the earlier fc6a330 split of compliance-scope-types.ts
dropped several helper exports that downstream consumers still import
(lib/sdk/index.ts, compliance-scope-engine.ts, obligations page,
compliance-scope page, constraint-enforcer, drafting-engine validate).
Restored them in the appropriate domain modules:
- core-levels.ts: maxDepthLevel, getDepthLevelNumeric, depthLevelFromNumeric
- state.ts: createEmptyScopeState
- decisions.ts: createEmptyScopeDecision + ApplicableRegulation,
RegulationObligation, RegulationAssessmentResult, SupervisoryAuthorityInfo
Verification: next build clean (142 pages generated), /sdk/whistleblower
still builds at ~11.5 kB.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract types, constants, helpers, and UI pieces (LoadingSkeleton,
EmptyState, StatCard, ComplianceRing, Modal, TenantCard,
CreateTenantModal, EditTenantModal, TenantDetailModal) into
_components/ and _types.ts to bring page.tsx from 1663 LOC to
432 LOC (under the 500 hard cap). Behavior preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split the 1371-line VVT page into _components/ extractions
(FormPrimitives, api, TabVerzeichnis, TabEditor, TabExport)
to bring page.tsx under the 300 LOC soft target.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split 1260-LOC client page into _types.ts and six tab components under
_components/ (Overview, Policies, SoA, Objectives, Audits, Reviews) plus
a shared helpers module. Behavior preserved exactly; page.tsx is now a
thin wiring shell.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dsfa/[id]/page.tsx (1893 LOC -> 350 LOC) split into 9 components:
Section1-5Editor, SDMCoverageOverview, RAGSearchPanel, AddRiskModal,
AddMitigationModal. Page is now a thin orchestrator.
notfallplan/page.tsx (1890 LOC -> 435 LOC) split into 8 modules:
types.ts, ConfigTab, IncidentsTab, TemplatesTab, ExercisesTab, Modals,
ApiSections. All under the 500-line hard cap.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split two oversized page files into _components/ directories following
Next.js 15 conventions and the 500-LOC hard cap:
- loeschfristen/page.tsx (2322 LOC -> 412 LOC orchestrator + 6 components)
- dsb-portal/page.tsx (2068 LOC -> 135 LOC orchestrator + 9 components)
All component files stay under 500 lines. Build verified.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Migration 045: Seed 10 controls (AUTH, NET, SUP, LOG, WEB, DATA, CRYP, REL)
with 39 open-source anchors into the database
- Backend: POST/PUT/DELETE endpoints for canonical controls CRUD
- Frontend proxy: PUT and DELETE methods added to canonical route
- Frontend: Control Library with create/edit/delete UI, full form with
open anchor management, scope, requirements, evidence, test procedures
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Type alignment (root cause of client-side crash):
- RiskFlag: id/title/description → severity/category/message/recommendation
- ScopeGap: id/title/recommendation/relatedDocuments → gapType/currentState/targetState/effort
- NextAction: id/priority:number/effortDays → actionType/priority:string/estimatedEffort
- ScopeReasoning: details → factors + impact
- TriggeredHardTrigger: {rule: HardTriggerRule} → flat fields (ruleId, description, etc.)
- All UI components updated to match engine output shape
Project isolation:
- Scope localStorage key now includes projectId (prevents data leak between projects)
Optional block progress:
- Blocks with only optional questions now show green checkmark when any question answered
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The auto-save timers (SDK context + backend) were firing after
completeAndSaveProfile(), resetting isComplete back to false.
Fix: skip auto-save when currentStep===99 (completed), cancel pending
timers before completing, and await backend save before updating
SDK context.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Profile data was lost when navigating away because it was only saved
to SDK context on explicit button click (Next/Save). Scope data
persisted because it auto-synced on every change.
Added two debounced auto-save mechanisms:
- SDK context sync (500ms) — survives in-app navigation
- Backend save (2s) — survives page reload/session change
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Profil: Summary-Seite (Step 99) nach Abschluss statt direkter Sprung zu Scope
- Profil: "Dokumente generieren" Block entfernt
- Use Cases Step 1: Branche aus Profil auto-abgeleitet, 21 KI-Kategorien als Kacheln
- Use Cases Step 2: ~60 Datenkategorien in 10 Gruppen als Kacheln (Art. 9 orange)
- Use Cases Step 3: Rechtsgrundlage entfernt (SDK ermittelt), 16 Zweck-Kacheln
- Use Cases Step 4: Automatisierungsgrad als Single-Select-Kacheln
- Use Cases Step 5: Hosting/Region/Modellnutzung als Kacheln statt Dropdowns
- Use Cases Step 6: Transfer-Ziele + Mechanismus als Kacheln statt Checkbox/Dropdown
- Use Cases Step 7: Aufbewahrungsdauer als Kacheln statt Zahlenfeld
- Use Cases Step 8: Compliance-Dokumente als Multi-Select-Kacheln
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The engine used short property names (risk, complexity, assurance, composite) while
the ComplianceScores interface defined (risk_score, complexity_score, assurance_need,
composite_score). Components used yet another convention (riskScore, level, hardTriggers).
The main crash was DEPTH_LEVEL_COLORS[decision.level] where decision.level was undefined
(correct property: decision.determinedLevel).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Step 2 im VVT-Generator: Ja/Nein-Buttons durch expandierbare Kacheln ersetzt.
Pro Abteilung werden typische Datenkategorien als Checkboxen angezeigt (isTypical
vorausgefuellt), Art. 9 Kategorien orange hervorgehoben mit DSGVO-Warnung.
7 neue Wiki-Artikel fuer Datenkategorien pro Geschaeftsbereich (HR, Finanzen,
Vertrieb, Marketing, Support, IT, Produktion).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SDK Context laedt State asynchron vom Server. Die Page las bei Mount
sdkState.complianceScope (noch null), fiel auf leeres localStorage
zurueck, und der Save-Effect ueberschrieb dann den echten State mit
leeren Daten. Fix: sdkState.complianceScope wird jetzt reaktiv
beobachtet, und leere States werden nie zurueckgeschrieben.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CE-Kennzeichnung aus Zertifizierungsliste entfernt und den Pruefzyklus-
Abschnitt aus dem Legal-Framework-Step entfernt, da beides nicht relevant.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Block-Sidebar zeigt gruen/orange Status pro Block, klickbare Zusammenfassung
offener Pflichtfragen unter dem Fortschrittsbalken, und visuelles Highlighting
(linker Rand) fuer unbeantwortete Pflichtfragen. Sidebar-Haken wird gesetzt
wenn alle Pflichtfragen beantwortet und Auswertung vorhanden.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Multi-Branche-Auswahl im CompanyProfile, erweiterte allowed-facts fuer
Drafting Engine, Demo-Daten und TOM-Generator Anpassungen.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nach Abschluss von Profil + Scope werden jetzt automatisch die anwendbaren
Regulierungen (DSGVO, NIS2, AI Act, DORA) ermittelt und die zustaendigen
Aufsichtsbehoerden (Landes-DSB, BSI, BaFin) aus Bundesland + Branche abgeleitet.
- Neues scope-to-facts.ts: Mapping CompanyProfile+Scope → Go SDK Payload
- Neues supervisory-authority-resolver.ts: 16 Landes-DSB + nationale Behoerden
- ScopeDecisionTab: Regulierungs-Report mit Aufsichtsbehoerden-Karten
- Obligations-Seite: Echte Daten statt Dummy in handleAutoProfiling()
- Neue Types: ApplicableRegulation, RegulationAssessmentResult, SupervisoryAuthorityInfo
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nach Wizard-Abschluss wird ein Ergebnis-Panel angezeigt:
- Bei UCCA-API-Erfolg: AssessmentResultCard mit Regeln, Kontrollen, Architektur
- Bei API-Fehler: Lokale Risikobewertung mit Score, Massnahmen, Regulations
- Badge zeigt Quelle (API vs Lokal)
- Nutzer kann Ergebnis pruefen bevor "Use Case speichern" geklickt wird
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Workshop von 5 auf 8 Schritte erweitert: Datenkategorien (Art.9, Sonstige),
Verarbeitungszweck (Rechtsgrundlage), Technologie (Glossar, Modell-Nutzung),
Automatisierung (Beispiele, Art.22), Hosting/Transfer, Datenhaltung/Vertraege,
Zusammenfassung mit automatischer Risikobewertung und UCCA-API-Aufruf.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Problem: Company Profile nutzte hartcodiertes tenant_id=default ohne project_id.
Beim Wechsel zwischen Projekten wurden immer die gleichen (oder keine) Daten geladen.
Aenderungen:
- Migration 042: project_id Spalte + UNIQUE(tenant_id, project_id) Constraint,
fehlende Spalten (offering_urls, Adressfelder) nachgetragen
- Backend: Alle Queries nutzen WHERE tenant_id + project_id IS NOT DISTINCT FROM
- Proxy: project_id Query-Parameter wird durchgereicht
- Frontend: projectId aus SDK-Context, profileApiUrl() Helper fuer alle API-Aufrufe
- "Weiter" speichert jetzt immer den Draft (war schon so, ging aber ins Leere)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>