From c977d1d4653e4816230d3c16b01d4fa9225036e5 Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Mon, 5 Jan 2026 15:05:41 -0600 Subject: [PATCH] Fix API/frontend type mismatch for dashboard - Backend: Change 'id' to 'artifact_id' in most_referenced_artifacts response - Backend: Add content_type field to referenced artifacts - Frontend: Add orphaned_size_bytes to Stats interface - Frontend: Add missing fields to DeduplicationStats interface --- backend/app/routes.py | 3 ++- frontend/src/types.ts | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/app/routes.py b/backend/app/routes.py index d04e395..b4c1b4f 100644 --- a/backend/app/routes.py +++ b/backend/app/routes.py @@ -2436,11 +2436,12 @@ def get_deduplication_stats( most_referenced = [ { - "id": a.id, + "artifact_id": a.id, "ref_count": a.ref_count, "size": a.size, "storage_saved": a.size * (a.ref_count - 1), "original_name": a.original_name, + "content_type": a.content_type, } for a in top_artifacts ] diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 159fb21..a42636c 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -168,6 +168,7 @@ export interface Stats { total_size_bytes: number; unique_artifacts: number; orphaned_artifacts: number; + orphaned_size_bytes: number; total_uploads: number; deduplicated_uploads: number; deduplication_ratio: number; @@ -188,6 +189,11 @@ export interface DeduplicationStats { total_physical_bytes: number; bytes_saved: number; savings_percentage: number; + total_uploads: number; + unique_artifacts: number; + duplicate_uploads: number; + average_ref_count: number; + max_ref_count: number; most_referenced_artifacts: ReferencedArtifact[]; }