From 7f7c8eee61f7a721e65c0409aaf2028e2fb58c37 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Sat, 30 May 2026 21:22:27 +0200 Subject: [PATCH] fix(backup-history): show Total + Other so per-row sums match the count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Content Backed Up" panel in Backup History only counted two categories (Photos + Archives), so a 3-file backup that landed all 3 in business-docs (Ralf's case after the storage truncation + restore tonight) showed: Photos (0 of 0) Archives (0) → total: 3 files The discrepancy made admins wonder where the 3 files actually went. Adds two rows: - "Business documents & other" = files_processed - photos - archives - "Total files" = files_processed So the math adds up regardless of which Stage B path the files came from. Properly per-path-category breakdown requires backend-side per-path counters (separate follow-up); this commit closes the visible-discrepancy gap without that schema change. i18n: en + de added; other locales fall back to en until reviewed. --- .../src/components/admin/BackupHistory.jsx | 33 ++++++++++++++++++- frontend/src/i18n/locales/de.json | 4 ++- frontend/src/i18n/locales/en.json | 4 ++- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/admin/BackupHistory.jsx b/frontend/src/components/admin/BackupHistory.jsx index 07611789..e079eb57 100644 --- a/frontend/src/components/admin/BackupHistory.jsx +++ b/frontend/src/components/admin/BackupHistory.jsx @@ -281,7 +281,16 @@ export const BackupHistory = () => { - {/* Content Backed Up */} + {/* Content Backed Up + Stage B's config-driven walker covers 7 path categories + (events/active, events/archived, thumbnails, previews, + heroes, uploads, business-docs). This pane historically + only counted 2 of them (photos + archives), so the + per-row sums never matched the total — Ralf 2026-05-30 + flagged a 3 files total with 0+0 visible breakdown. + Adds an explicit Total + an "Other" bucket so the + arithmetic adds up even when the backend doesn't yet + expose per-path counts. */}

{t('backup.history.details.contentBackedUp')}

@@ -301,6 +310,28 @@ export const BackupHistory = () => { Archives ({stats.archives_backed_up || 0})
+ {(() => { + const total = Number(stats.files_processed) || 0; + const accounted = + (Number(stats.photos_backed_up) || 0) + + (Number(stats.archives_backed_up) || 0); + const other = Math.max(total - accounted, 0); + return ( + <> +
+ 0 ? 'text-green-500' : 'text-neutral-300 dark:text-neutral-600'}`} /> + + {t('backup.history.details.otherFiles', 'Business documents & other')} ({other}) + +
+
+ + {t('backup.history.details.totalFiles', 'Total files')}: {total} + +
+ + ); + })()}
diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index e30ed666..d54a183c 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -475,7 +475,9 @@ "completed": "Abgeschlossen", "contentBackedUp": "Gesicherter Inhalt", "errorDetails": "Fehlerdetails", - "manifest": "Manifest" + "manifest": "Manifest", + "otherFiles": "Geschäftsdokumente & sonstige", + "totalFiles": "Gesamtdateien" }, "pagination": { "showing": "Zeige {{from}}-{{to}} von {{total}} Backups", diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 7d6831c5..8ede6f4c 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -2366,7 +2366,9 @@ "completed": "Completed", "contentBackedUp": "Content Backed Up", "errorDetails": "Error Details", - "manifest": "Manifest" + "manifest": "Manifest", + "otherFiles": "Business documents & other", + "totalFiles": "Total files" }, "pagination": { "showing": "Showing {{from}}-{{to}} of {{total}} backups",