From b7bc1ec9d47f17f72845668eb6a15094afbcc085 Mon Sep 17 00:00:00 2001 From: Froidefond Julien Date: Wed, 25 Mar 2026 11:31:53 +0100 Subject: [PATCH] feat: add stats display for reading_status_match and reading_status_push jobs Co-Authored-By: Claude Sonnet 4.6 --- apps/backoffice/app/components/JobRow.tsx | 42 +++++++++++++++++++++-- apps/backoffice/lib/i18n/en.ts | 3 ++ apps/backoffice/lib/i18n/fr.ts | 3 ++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/apps/backoffice/app/components/JobRow.tsx b/apps/backoffice/app/components/JobRow.tsx index b33e383..96f18dd 100644 --- a/apps/backoffice/app/components/JobRow.tsx +++ b/apps/backoffice/app/components/JobRow.tsx @@ -22,6 +22,8 @@ interface JobRowProps { removed_files: number; errors: number; refreshed?: number; + linked?: number; + pushed?: number; } | null; progress_percent: number | null; processed_files: number | null; @@ -65,6 +67,8 @@ export function JobRow({ job, libraryName, highlighted, onCancel, onReplay, form const isMetadataBatch = job.type === "metadata_batch"; const isMetadataRefresh = job.type === "metadata_refresh"; + const isReadingStatusMatch = job.type === "reading_status_match"; + const isReadingStatusPush = job.type === "reading_status_push"; // Thumbnails progress (Phase 2: extracting_pages + generating_thumbnails) const thumbInProgress = hasThumbnailPhase && (job.status === "running" || isPhase2); @@ -172,6 +176,40 @@ export function JobRow({ job, libraryName, highlighted, onCancel, onReplay, form )} + {/* Reading status match: series linked */} + {isReadingStatusMatch && job.total_files != null && job.total_files > 0 && ( + + + + {job.total_files} + + + )} + {isReadingStatusMatch && job.stats_json?.linked != null && job.stats_json.linked > 0 && ( + + + + {job.stats_json.linked} + + + )} + {/* Reading status push: series pushed */} + {isReadingStatusPush && job.total_files != null && job.total_files > 0 && ( + + + + {job.total_files} + + + )} + {isReadingStatusPush && job.stats_json?.pushed != null && job.stats_json.pushed > 0 && ( + + + + {job.stats_json.pushed} + + + )} {/* Errors */} {errors > 0 && ( @@ -182,7 +220,7 @@ export function JobRow({ job, libraryName, highlighted, onCancel, onReplay, form )} {/* Scanned only (no other stats) */} - {indexed === 0 && removed === 0 && errors === 0 && !hasThumbnailPhase && !isMetadataBatch && !isMetadataRefresh && scanned > 0 && ( + {indexed === 0 && removed === 0 && errors === 0 && !hasThumbnailPhase && !isMetadataBatch && !isMetadataRefresh && !isReadingStatusMatch && !isReadingStatusPush && scanned > 0 && ( @@ -191,7 +229,7 @@ export function JobRow({ job, libraryName, highlighted, onCancel, onReplay, form )} {/* Nothing to show */} - {indexed === 0 && removed === 0 && errors === 0 && scanned === 0 && !hasThumbnailPhase && !isMetadataBatch && !isMetadataRefresh && ( + {indexed === 0 && removed === 0 && errors === 0 && scanned === 0 && !hasThumbnailPhase && !isMetadataBatch && !isMetadataRefresh && !isReadingStatusMatch && !isReadingStatusPush && ( )} diff --git a/apps/backoffice/lib/i18n/en.ts b/apps/backoffice/lib/i18n/en.ts index 70b56d0..a046d90 100644 --- a/apps/backoffice/lib/i18n/en.ts +++ b/apps/backoffice/lib/i18n/en.ts @@ -285,6 +285,9 @@ const en: Record = { "jobRow.metadataProcessed": "{{count}} series processed", "jobRow.metadataRefreshed": "{{count}} series refreshed", "jobRow.metadataLinks": "{{count}} links analyzed", + "jobRow.seriesTotal": "{{count}} series total", + "jobRow.seriesLinked": "{{count}} series linked", + "jobRow.seriesPushed": "{{count}} series pushed", "jobRow.errors": "{{count}} errors", "jobRow.view": "View", "jobRow.replay": "Replay", diff --git a/apps/backoffice/lib/i18n/fr.ts b/apps/backoffice/lib/i18n/fr.ts index a64438d..f7ce32e 100644 --- a/apps/backoffice/lib/i18n/fr.ts +++ b/apps/backoffice/lib/i18n/fr.ts @@ -283,6 +283,9 @@ const fr = { "jobRow.metadataProcessed": "{{count}} séries traitées", "jobRow.metadataRefreshed": "{{count}} séries rafraîchies", "jobRow.metadataLinks": "{{count}} liens analysés", + "jobRow.seriesTotal": "{{count}} séries au total", + "jobRow.seriesLinked": "{{count}} séries liées", + "jobRow.seriesPushed": "{{count}} séries synchronisées", "jobRow.errors": "{{count}} erreurs", "jobRow.view": "Voir", "jobRow.replay": "Rejouer",