diff --git a/admin-lehrer/components/ocr-pipeline/StepStructureDetection.tsx b/admin-lehrer/components/ocr-pipeline/StepStructureDetection.tsx index 73f2e48..56d261d 100644 --- a/admin-lehrer/components/ocr-pipeline/StepStructureDetection.tsx +++ b/admin-lehrer/components/ocr-pipeline/StepStructureDetection.tsx @@ -36,18 +36,7 @@ export function StepStructureDetection({ sessionId, onNext }: StepStructureDetec setError(null) try { - // Check if session already has structure result - const sessionRes = await fetch(`${KLAUSUR_API}/api/v1/ocr-pipeline/sessions/${sessionId}`) - if (sessionRes.ok) { - const sessionData = await sessionRes.json() - if (sessionData.structure_result) { - setResult(sessionData.structure_result) - setOverlayTs(Date.now()) - setDetecting(false) - return - } - } - + // Always re-run detection to pick up latest word_result from OCR step const res = await fetch(`${KLAUSUR_API}/api/v1/ocr-pipeline/sessions/${sessionId}/detect-structure`, { method: 'POST', })