Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 1m50s
CI / OCR Service Tests (pull_request) Successful in 16s
CI / Backend Unit Tests (pull_request) Successful in 4m11s
CI / fail2ban Regex (pull_request) Successful in 39s
CI / Compose Bucket Idempotency (pull_request) Failing after 11s
CI / Unit & Component Tests (push) Failing after 1m50s
CI / OCR Service Tests (push) Successful in 16s
CI / Backend Unit Tests (push) Successful in 4m7s
CI / fail2ban Regex (push) Successful in 37s
CI / Compose Bucket Idempotency (push) Failing after 10s
Two root causes: 1. In-flight test: resolveFetch() was the last line, leaving the async finally-block writing `training = false` after cleanup destroyed the component. Awaiting the button becoming re-enabled ensures the finally block settles before cleanup runs. 2. Success-dismiss test: startTraining() schedules setTimeout(5000) which fired after cleanup destroyed the component. vi.useFakeTimers() + vi.runAllTimers() scoped to the describe block drains the timer while the component is still alive. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ocr (frontend)
UI for OCR job management, progress display, and sender-model training in the admin/enrichment panel.
What this domain owns
Components: OcrProgress.svelte, OcrTrigger.svelte, OcrTrainingCard.svelte, SegmentationTrainingCard.svelte, TrainingHistory.svelte.
Utilities: translateOcrProgress.ts (progress-state → display-string mapping), training.ts (training API helpers).
What this domain does NOT own
- OCR processing — all text recognition runs in the Python
ocr-service/container. The frontend shows job state; it does not run OCR. - Transcription block display — rendered by
document/transcription/components.
Key components
| Component | Used in | Notes |
|---|---|---|
OcrProgress.svelte |
document header, enrich panel | Progress bar and status label for an active OCR job |
OcrTrigger.svelte |
enrich panel, document detail | Button to start an OCR job; disabled when one is running |
OcrTrainingCard.svelte |
/admin/ocr |
Trigger sender-model training; shows training history |
SegmentationTrainingCard.svelte |
/admin/ocr |
Trigger segmentation training |
TrainingHistory.svelte |
/admin/ocr |
List of past training runs with status |
Backend counterpart
backend/src/main/java/org/raddatz/familienarchiv/ocr/README.md