From 7cbc95913e9887abe90319cc878fb9dce1ec899f Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Tue, 17 Feb 2026 11:52:36 +0100 Subject: [PATCH] feat: add SizeBytes field for bucket rows and update sorting logic --- app/(dashboard)/browser/page.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/(dashboard)/browser/page.tsx b/app/(dashboard)/browser/page.tsx index 5518334..9cf8055 100644 --- a/app/(dashboard)/browser/page.tsx +++ b/app/(dashboard)/browser/page.tsx @@ -29,6 +29,7 @@ interface BucketRow { CreationDate: string Count?: number Size?: string + SizeBytes?: number } type BucketUsageMap = Record @@ -70,6 +71,7 @@ function BrowserBucketsPage() { ...row, Count: objectsCount, Size: niceBytes(String(totalSize)), + SizeBytes: totalSize, } }), ) @@ -177,7 +179,9 @@ function BrowserBucketsPage() { }, { header: () => t("Size"), - accessorKey: "Size", + id: "SizeBytes", + // use numeric bytes for sorting via accessorFn, but display the formatted string + accessorFn: (row) => (typeof row.SizeBytes === "number" ? row.SizeBytes : undefined), cell: ({ row }) => row.original.Size ?? (usageLoading ? : "--"), },