Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/(dashboard)/browser/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ function BrowserBucketsPage() {
names={data.map((bucket) => bucket.Name)}
usage={bucketUsage}
unavailable={pending || loadError}
usageLoading={usageLoading}
usageLoading={pending || usageLoading}
usageAvailable={!usageLoading && Array.isArray(userInfo?.buckets)}
/>

Expand Down
59 changes: 38 additions & 21 deletions components/buckets/usage-overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function BucketUsageOverview({
const summary = !unavailable && usageAvailable ? summarizeBucketUsage(names, usage) : undefined
const hasValues = summary && (summary.measuredBuckets > 0 || names.length === 0)
const measurementReported = summary && (names.length === 0 || names.some((name) => usage.has(name)))
const statisticsState = usageLoading
? t("Loading…")
: measurementReported
? t("Statistics pending")
: t("Statistics unavailable")
const coverage = measurementReported
? `${t("Measured buckets")} · ${formatInteger(summary.measuredBuckets)} / ${formatInteger(names.length)}`
: usageLoading
Expand Down Expand Up @@ -62,27 +67,39 @@ export function BucketUsageOverview({
aria-label={t("Storage Usage Statistics")}
>
<div className="min-w-0">
<dl className="grid grid-cols-2 items-end gap-5 sm:grid-cols-[1.6fr_1fr_1fr]">
<div className="min-w-0">
<dt className="text-xs text-muted-foreground">{t("Measured size")}</dt>
<dd className="mt-2 break-words font-heading text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl">
{hasValues && summary.sizeBytes !== undefined ? niceBytes(String(summary.sizeBytes)) : t("Unknown")}
</dd>
</div>
<div>
<dt className="text-xs text-muted-foreground">{t("Measured objects")}</dt>
<dd className="mt-2 font-heading text-2xl font-medium tabular-nums">
{hasValues && summary.objectsCount !== undefined ? formatInteger(summary.objectsCount) : "—"}
</dd>
</div>
<div>
<dt className="text-xs text-muted-foreground">{t("Visible buckets")}</dt>
<dd className="mt-2 font-heading text-2xl font-medium tabular-nums">
{unavailable ? "—" : formatInteger(names.length)}
</dd>
</div>
</dl>
{!unavailable && (
<div className="grid grid-cols-2 items-end gap-5 sm:grid-cols-[minmax(0,2.6fr)_minmax(0,1fr)]">
{hasValues ? (
<dl className="col-span-2 grid grid-cols-2 items-end gap-5 sm:col-span-1 sm:grid-cols-[1.6fr_1fr]">
{summary.sizeBytes !== undefined && (
<div className="min-w-0">
<dt className="text-xs text-muted-foreground">{t("Measured size")}</dt>
<dd className="mt-2 break-words font-heading text-4xl font-semibold tracking-tight tabular-nums lg:text-5xl">
{niceBytes(String(summary.sizeBytes))}
</dd>
</div>
)}
{summary.objectsCount !== undefined && (
<div>
<dt className="text-xs text-muted-foreground">{t("Measured objects")}</dt>
<dd className="mt-2 font-heading text-2xl font-medium tabular-nums">
{formatInteger(summary.objectsCount)}
</dd>
</div>
)}
</dl>
) : (
<p className="col-span-2 text-lg font-medium sm:col-span-1" role="status">
{statisticsState}
</p>
)}
{!unavailable && (
<dl>
<dt className="text-xs text-muted-foreground">{t("Visible buckets")}</dt>
<dd className="mt-2 font-heading text-2xl font-medium tabular-nums">{formatInteger(names.length)}</dd>
</dl>
)}
</div>
{hasValues && (
<p className="mt-3 text-xs text-muted-foreground" role="status">
{coverage}
</p>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
134 changes: 134 additions & 0 deletions docs/ui-review/bucket-statistics-status/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"date": "2026-11-23",
"scope": "Bucket usage overview status",
"evidence": "Controlled props rendered by the actual React component in a local Next.js 16.4.6 dev server. Before uses the component from base commit b329436. These are UI fixtures, not live cluster or scanner acceptance. Temporary preview routes are removed from the final change.",
"checks": [
"DOM state matches each named scenario",
"Viewport width and document width match on mobile",
"Chinese translations loaded through changeLocale",
"Light and dark root classes confirmed",
"No browser errors or warnings"
],
"captures": [
{
"file": "before-desktop-en.jpg",
"viewport": {
"width": 1280,
"height": 900
},
"locale": "en-US",
"theme": "light",
"state": "pending",
"version": "before",
"sha256": "b17b62f443a7dfeea5d84e0eb29606280b44c22bbde8f55ca8bba9a39b1ab763"
},
{
"file": "after-desktop-en.jpg",
"viewport": {
"width": 1280,
"height": 900
},
"locale": "en-US",
"theme": "light",
"state": "pending",
"version": "after",
"sha256": "bcc87e07b671325f949e4697508d6a93e0b8b5f2636f58ff3271a64843ab3f45"
},
{
"file": "after-mobile-en.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "en-US",
"theme": "light",
"state": "pending",
"version": "after",
"sha256": "3214930ac9dd335d7fa2ae22439ba0f004a8cb25320e366a8c2aff858ba129c1"
},
{
"file": "after-mobile-zh.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "zh-CN",
"theme": "light",
"state": "pending",
"version": "after",
"sha256": "1b5ad25086693eccfa802013dad17a7e957b1f358592d659d65d5075ebfe805a"
},
{
"file": "after-mobile-zh-dark.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "zh-CN",
"theme": "dark",
"state": "pending",
"version": "after",
"sha256": "d67a86d211e60bf0cd3eb955be46f88e49a5ed525649824447adb198c9e911c7"
},
{
"file": "after-desktop-zh-dark.jpg",
"viewport": {
"width": 1280,
"height": 900
},
"locale": "zh-CN",
"theme": "dark",
"state": "pending",
"version": "after",
"sha256": "ff5c544aad694d70ece4252a255364c7549efdb1de2ef95a86caa4e90d32e600"
},
{
"file": "after-loading-mobile-en.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "en-US",
"theme": "light",
"state": "loading",
"version": "after",
"sha256": "d934f2a34d9c0599e847450f974624f1778f788058b7dd92971cb9f7bdec0d4e"
},
{
"file": "after-error-mobile-en.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "en-US",
"theme": "light",
"state": "error",
"version": "after",
"sha256": "0510bb41d538c8fd8d863911f5918ef296bfd425ca029d34bdafa8934b8b0574"
},
{
"file": "after-empty-mobile-en.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "en-US",
"theme": "light",
"state": "empty",
"version": "after",
"sha256": "dd38d525554408316497cefb1007fa60f29d1ad4febb7b7223e904b40966b709"
},
{
"file": "after-complete-mobile-en.jpg",
"viewport": {
"width": 390,
"height": 844
},
"locale": "en-US",
"theme": "light",
"state": "complete",
"version": "after",
"sha256": "b93a3f969fb41fe7731d22f9c459ce9f036ef4b1338c3ac590b375a3e2277537"
}
]
}
2 changes: 2 additions & 0 deletions i18n/locales/ar-MA.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "في انتظار الإحصاءات",
"Statistics unavailable": "الإحصاءات غير متاحة",
"Cluster scanner status": "حالة ماسح العنقود",
"Scanner status on this node": "حالة الماسح على هذه العقدة",
"Cycle reported by this node": "الدورة التي أبلغت عنها هذه العقدة",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/de-DE.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Statistik ausstehend",
"Statistics unavailable": "Statistik nicht verfügbar",
"Cluster scanner status": "Scannerstatus des Clusters",
"Scanner status on this node": "Scannerstatus auf diesem Knoten",
"Cycle reported by this node": "Von diesem Knoten gemeldeter Zyklus",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Awaiting statistics",
"Statistics unavailable": "Statistics unavailable",
"Cluster scanner status": "Cluster scanner status",
"Scanner status on this node": "Scanner status on this node",
"Cycle reported by this node": "Cycle reported by this node",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/es-ES.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Estadísticas pendientes",
"Statistics unavailable": "Estadísticas no disponibles",
"Cluster scanner status": "Estado del escáner del clúster",
"Scanner status on this node": "Estado del escáner en este nodo",
"Cycle reported by this node": "Ciclo indicado por este nodo",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/fr-FR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Statistiques en attente",
"Statistics unavailable": "Statistiques indisponibles",
"Cluster scanner status": "État de l’analyse du cluster",
"Scanner status on this node": "État de l’analyse sur ce nœud",
"Cycle reported by this node": "Cycle signalé par ce nœud",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/id-ID.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Menunggu statistik",
"Statistics unavailable": "Statistik tidak tersedia",
"Cluster scanner status": "Status pemindai klaster",
"Scanner status on this node": "Status pemindai pada simpul ini",
"Cycle reported by this node": "Siklus yang dilaporkan simpul ini",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/it-IT.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Statistiche in attesa",
"Statistics unavailable": "Statistiche non disponibili",
"Cluster scanner status": "Stato della scansione del cluster",
"Scanner status on this node": "Stato della scansione su questo nodo",
"Cycle reported by this node": "Ciclo segnalato da questo nodo",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/ja-JP.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "統計待ち",
"Statistics unavailable": "統計を取得できません",
"Cluster scanner status": "クラスターのスキャナー状態",
"Scanner status on this node": "このノードのスキャナー状態",
"Cycle reported by this node": "このノードが報告したサイクル",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/ko-KR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "통계 대기 중",
"Statistics unavailable": "통계를 사용할 수 없음",
"Cluster scanner status": "클러스터 스캐너 상태",
"Scanner status on this node": "이 노드의 스캐너 상태",
"Cycle reported by this node": "이 노드가 보고한 주기",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Estatísticas pendentes",
"Statistics unavailable": "Estatísticas indisponíveis",
"Cluster scanner status": "Estado do scanner do cluster",
"Scanner status on this node": "Estado do scanner neste nó",
"Cycle reported by this node": "Ciclo informado por este nó",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/ru-RU.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Статистика ожидается",
"Statistics unavailable": "Статистика недоступна",
"Cluster scanner status": "Состояние сканера кластера",
"Scanner status on this node": "Состояние сканера на этом узле",
"Cycle reported by this node": "Цикл по данным этого узла",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/tr-TR.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "İstatistikler bekleniyor",
"Statistics unavailable": "İstatistikler kullanılamıyor",
"Cluster scanner status": "Küme tarayıcısının durumu",
"Scanner status on this node": "Bu düğümdeki tarayıcının durumu",
"Cycle reported by this node": "Bu düğümün bildirdiği döngü",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/vi-VN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "Chờ thống kê",
"Statistics unavailable": "Không có thống kê",
"Cluster scanner status": "Trạng thái trình quét của cụm",
"Scanner status on this node": "Trạng thái trình quét trên nút này",
"Cycle reported by this node": "Chu kỳ do nút này báo cáo",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "待统计",
"Statistics unavailable": "统计不可用",
"Cluster scanner status": "集群扫描器状态",
"Scanner status on this node": "本节点扫描器状态",
"Cycle reported by this node": "本节点上报的扫描周期",
Expand Down
2 changes: 2 additions & 0 deletions i18n/locales/zh-TW.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"Statistics pending": "待統計",
"Statistics unavailable": "統計無法取得",
"Cluster scanner status": "叢集掃描器狀態",
"Scanner status on this node": "本節點掃描器狀態",
"Cycle reported by this node": "本節點回報的掃描週期",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"i18next": "^26.3.1",
"i18next-browser-languagedetector": "^8.2.1",
"input-otp": "^1.4.2",
"next": "16.4.1",
"next": "16.4.6",
"next-themes": "^0.4.6",
"node-forge": "^1.4.0",
"react": "^19.2.7",
Expand All @@ -59,7 +59,7 @@
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"eslint": "^9.39.4",
"eslint-config-next": "16.4.1",
"eslint-config-next": "16.4.6",
"eslint-config-prettier": "^10.1.8",
"happy-dom": "20.14.5",
"prettier": "^3.8.4",
Expand Down
Loading
Loading