From a514cbca186dd425f67a8a30a5c5b1c2d78c1f76 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 13 Apr 2026 17:54:20 +0200 Subject: [PATCH] fix(training): segmentation card reads availableSegBlocks not availableBlocks Both cards were reading the same availableBlocks field, so the segmentation box always showed the kurrent recognition count. Use the correct availableSegBlocks field from the training info response. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/lib/components/SegmentationTrainingCard.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/SegmentationTrainingCard.svelte b/frontend/src/lib/components/SegmentationTrainingCard.svelte index b1553c94..00a6d9ff 100644 --- a/frontend/src/lib/components/SegmentationTrainingCard.svelte +++ b/frontend/src/lib/components/SegmentationTrainingCard.svelte @@ -15,7 +15,7 @@ interface Run { } interface TrainingInfo { - availableBlocks?: number; + availableSegBlocks?: number; ocrServiceAvailable?: boolean; runs?: Run[]; } @@ -29,7 +29,7 @@ let { trainingInfo }: Props = $props(); let training = $state(false); let successMessage = $state(null); -const available = $derived(trainingInfo?.availableBlocks ?? 0); +const available = $derived(trainingInfo?.availableSegBlocks ?? 0); const tooFewBlocks = $derived(available < 5); const serviceDown = $derived(trainingInfo?.ocrServiceAvailable === false); const disabled = $derived(training || tooFewBlocks || serviceDown);