[split-required] Split 58 monoliths across Python, Go, TypeScript (Phases 1-3)

Phase 1 — Python (klausur-service): 5 monoliths → 36 files
- dsfa_corpus_ingestion.py (1,828 LOC → 5 files)
- cv_ocr_engines.py (2,102 LOC → 7 files)
- cv_layout.py (3,653 LOC → 10 files)
- vocab_worksheet_api.py (2,783 LOC → 8 files)
- grid_build_core.py (1,958 LOC → 6 files)

Phase 2 — Go (edu-search-service, school-service): 8 monoliths → 19 files
- staff_crawler.go (1,402 → 4), policy/store.go (1,168 → 3)
- policy_handlers.go (700 → 2), repository.go (684 → 2)
- search.go (592 → 2), ai_extraction_handlers.go (554 → 2)
- seed_data.go (591 → 2), grade_service.go (646 → 2)

Phase 3 — TypeScript (admin-lehrer): 45 monoliths → 220+ files
- sdk/types.ts (2,108 → 16 domain files)
- ai/rag/page.tsx (2,686 → 14 files)
- 22 page.tsx files split into _components/ + _hooks/
- 11 component files split into sub-components
- 10 SDK data catalogs added to loc-exceptions
- Deleted dead backup index_original.ts (4,899 LOC)

All original public APIs preserved via re-export facades.
Zero new errors: Python imports verified, Go builds clean,
TypeScript tsc --noEmit shows only pre-existing errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-24 17:28:57 +02:00
parent 9ba420fa91
commit b681ddb131
251 changed files with 30016 additions and 25037 deletions

View File

@@ -0,0 +1,114 @@
import type { NightModeConfig, NightModeStatus } from './types'
interface TimeConfigProps {
editMode: boolean
editConfig: NightModeConfig | null
actionLoading: string | null
status: NightModeStatus | null
onSetEditMode: (v: boolean) => void
onSetEditConfig: (fn: (prev: NightModeConfig | null) => NightModeConfig | null) => void
onSave: () => void
onCancel: () => void
}
export function TimeConfig({
editMode, editConfig, actionLoading, status,
onSetEditMode, onSetEditConfig, onSave, onCancel,
}: TimeConfigProps) {
return (
<div className="bg-white rounded-xl border border-slate-200 p-6 mb-6">
<div className="flex justify-between items-center mb-6">
<h3 className="text-lg font-semibold text-slate-900">Zeitkonfiguration</h3>
{editMode ? (
<div className="flex gap-2">
<button
onClick={onCancel}
className="px-4 py-2 text-sm border border-slate-300 rounded-lg hover:bg-slate-50 transition-colors"
>
Abbrechen
</button>
<button
onClick={onSave}
disabled={actionLoading === 'save'}
className="px-4 py-2 text-sm bg-orange-600 text-white rounded-lg hover:bg-orange-700 disabled:opacity-50 transition-colors"
>
{actionLoading === 'save' ? 'Speichern...' : 'Speichern'}
</button>
</div>
) : (
<button
onClick={() => onSetEditMode(true)}
className="px-4 py-2 text-sm border border-slate-300 rounded-lg hover:bg-slate-50 transition-colors"
>
Bearbeiten
</button>
)}
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<label className="block text-sm font-medium text-slate-700 mb-2">
<span className="flex items-center gap-2">
<svg className="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />
</svg>
Abschaltung um
</span>
</label>
{editMode ? (
<input
type="time"
value={editConfig?.shutdown_time || '22:00'}
onChange={e => onSetEditConfig(prev => prev ? { ...prev, shutdown_time: e.target.value } : null)}
className="w-full px-4 py-3 text-xl font-mono border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-500"
/>
) : (
<div className="text-3xl font-mono font-bold text-slate-900 bg-slate-50 px-4 py-3 rounded-lg">
{editConfig?.shutdown_time || '22:00'}
</div>
)}
</div>
<div>
<label className="block text-sm font-medium text-slate-700 mb-2">
<span className="flex items-center gap-2">
<svg className="w-4 h-4 text-yellow-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
</svg>
Start um
</span>
</label>
{editMode ? (
<input
type="time"
value={editConfig?.startup_time || '06:00'}
onChange={e => onSetEditConfig(prev => prev ? { ...prev, startup_time: e.target.value } : null)}
className="w-full px-4 py-3 text-xl font-mono border border-slate-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-500"
/>
) : (
<div className="text-3xl font-mono font-bold text-slate-900 bg-slate-50 px-4 py-3 rounded-lg">
{editConfig?.startup_time || '06:00'}
</div>
)}
</div>
</div>
{/* Letzte Aktion */}
{status?.config.last_action && (
<div className="mt-6 pt-6 border-t border-slate-200">
<div className="text-sm text-slate-500">
Letzte Aktion:{' '}
<span className={`font-semibold ${status.config.last_action === 'startup' ? 'text-green-600' : 'text-red-600'}`}>
{status.config.last_action === 'startup' ? 'Gestartet' : 'Abgeschaltet'}
</span>
{status.config.last_action_time && (
<span className="ml-2">
am {new Date(status.config.last_action_time).toLocaleString('de-DE')}
</span>
)}
</div>
</div>
)}
</div>
)
}