feat: add stats display for reading_status_match and reading_status_push jobs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* Reading status match: series linked */}
|
||||
{isReadingStatusMatch && job.total_files != null && job.total_files > 0 && (
|
||||
<Tooltip label={t("jobRow.seriesTotal", { count: job.total_files })}>
|
||||
<span className="inline-flex items-center gap-1 text-info">
|
||||
<Icon name="series" size="sm" />
|
||||
{job.total_files}
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
{isReadingStatusMatch && job.stats_json?.linked != null && job.stats_json.linked > 0 && (
|
||||
<Tooltip label={t("jobRow.seriesLinked", { count: job.stats_json.linked })}>
|
||||
<span className="inline-flex items-center gap-1 text-success">
|
||||
<Icon name="link" size="sm" />
|
||||
{job.stats_json.linked}
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* Reading status push: series pushed */}
|
||||
{isReadingStatusPush && job.total_files != null && job.total_files > 0 && (
|
||||
<Tooltip label={t("jobRow.seriesTotal", { count: job.total_files })}>
|
||||
<span className="inline-flex items-center gap-1 text-info">
|
||||
<Icon name="series" size="sm" />
|
||||
{job.total_files}
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
{isReadingStatusPush && job.stats_json?.pushed != null && job.stats_json.pushed > 0 && (
|
||||
<Tooltip label={t("jobRow.seriesPushed", { count: job.stats_json.pushed })}>
|
||||
<span className="inline-flex items-center gap-1 text-success">
|
||||
<Icon name="refresh" size="sm" />
|
||||
{job.stats_json.pushed}
|
||||
</span>
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* Errors */}
|
||||
{errors > 0 && (
|
||||
<Tooltip label={t("jobRow.errors", { count: errors })}>
|
||||
@@ -182,7 +220,7 @@ export function JobRow({ job, libraryName, highlighted, onCancel, onReplay, form
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* 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 && (
|
||||
<Tooltip label={t("jobRow.scanned", { count: scanned })}>
|
||||
<span className="inline-flex items-center gap-1 text-muted-foreground">
|
||||
<Icon name="search" size="sm" />
|
||||
@@ -191,7 +229,7 @@ export function JobRow({ job, libraryName, highlighted, onCancel, onReplay, form
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* 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 && (
|
||||
<span className="text-sm text-muted-foreground">—</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -285,6 +285,9 @@ const en: Record<TranslationKey, string> = {
|
||||
"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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user