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>
|
||||
|
||||
Reference in New Issue
Block a user