diff --git a/packages/web/src/components/modals/instanceSettingsPanels/StoragePanel.tsx b/packages/web/src/components/modals/instanceSettingsPanels/StoragePanel.tsx index 9393646e..0f3d3006 100644 --- a/packages/web/src/components/modals/instanceSettingsPanels/StoragePanel.tsx +++ b/packages/web/src/components/modals/instanceSettingsPanels/StoragePanel.tsx @@ -70,7 +70,7 @@ export function StoragePanel() { if (!stats) return null; - const hasOrphans = stats.orphanedFiles > 0 || stats.unlinkedAttachments > 0; + const hasOrphans = stats.orphanedFiles > 0 || stats.unlinkedAttachments > 0 || stats.danglingAttachments > 0; return (
@@ -107,6 +107,13 @@ export function StoragePanel() {
{formatBytes(stats.unlinkedSize)}
+
+
Dangling Records
+
0 ? 'text-accent-amber' : 'text-txt-primary'}`}> + {stats.danglingAttachments} +
+
{formatBytes(stats.danglingSize)}
+
@@ -134,7 +141,7 @@ export function StoragePanel() {
Cleanup
{!hasOrphans && ( -
No orphaned files or stale uploads found.
+
No orphaned files, stale uploads, or dangling records found.
)} {hasOrphans && ( @@ -166,7 +173,7 @@ export function StoragePanel() { {cleanupResult.dryRun ? 'Preview — no files deleted' : 'Cleanup complete'}
- {cleanupResult.deletedFiles} orphaned file{cleanupResult.deletedFiles !== 1 ? 's' : ''} ({formatBytes(cleanupResult.freedBytes)}) + {cleanupResult.deletedFiles} orphaned/dangling file{cleanupResult.deletedFiles !== 1 ? 's' : ''} ({formatBytes(cleanupResult.freedBytes)}) {cleanupResult.deletedAttachmentRecords > 0 && ( <>, {cleanupResult.deletedAttachmentRecords} stale upload record{cleanupResult.deletedAttachmentRecords !== 1 ? 's' : ''} )}