Context
In a table's Storage & Health tab, each partition shows a colored dot (π’/π /π΄). It is computed on the frontend by partitionTone(p) β computeStorageHealthStatus(...) in frontend/src/pages/TableDetail.tsx, reusing the global health logic on each partition's own numbers.
Current checks (worst tone wins):
| Check |
Formula |
warn |
bad |
Avg size vs target (avgVsTarget) |
avgFileSize / targetFileSize Γ 100 |
< 90% |
< 50% |
Small-files ratio (smallRatio) |
smallFileCount / dataFiles Γ 100 |
> 20% |
> 50% |
Delete-files ratio (deleteRatio) |
deleteFiles / (dataFiles + deleteFiles) Γ 100 |
> 10% |
> 30% |
| Needs compaction |
dataFiles > 1 AND avgFileSize < targetFileSize Γ 50% |
β warn |
β |
Thresholds come from the Storage health thresholds (Settings), falling back to DEFAULT_HEALTH_THRESHOLDS. targetFileSizeBytes is the table's value.
Changes to implement
1. Don't penalize avgVsTarget when dataFiles β€ 1
A partition with a single file smaller than the target is flagged warn/bad on the avgVsTarget check, even though compaction would do nothing (a lone file can't be merged). The dataFiles > 1 guard already exists for the compaction check but not for avgVsTarget.
Proposal: skip (or force to good) the avgVsTarget check when dataFiles β€ 1, to avoid false positives on small, healthy partitions.
2. Show the calculation breakdown on hover
Add a tooltip on the dot that lists each evaluated check, its value (%) and its verdict (good/warn/bad), so it's clear why a partition is orange/red β today the title only says "Needs attention / Could be optimized / Healthy".
Notes / out of scope (to discuss)
- Per-partition health uses the global thresholds and the table
targetFileSizeBytes β no per-partition tuning. Could be considered later.
Affected file: frontend/src/pages/TableDetail.tsx (partitionTone, computeStorageHealthStatus, dot rendering ~L2500).
Context
In a table's Storage & Health tab, each partition shows a colored dot (π’/π /π΄). It is computed on the frontend by
partitionTone(p)βcomputeStorageHealthStatus(...)infrontend/src/pages/TableDetail.tsx, reusing the global health logic on each partition's own numbers.Current checks (worst tone wins):
avgVsTarget)avgFileSize / targetFileSize Γ 100< 90%< 50%smallRatio)smallFileCount / dataFiles Γ 100> 20%> 50%deleteRatio)deleteFiles / (dataFiles + deleteFiles) Γ 100> 10%> 30%dataFiles > 1ANDavgFileSize < targetFileSize Γ 50%warnThresholds come from the Storage health thresholds (Settings), falling back to
DEFAULT_HEALTH_THRESHOLDS.targetFileSizeBytesis the table's value.Changes to implement
1. Don't penalize
avgVsTargetwhendataFiles β€ 1A partition with a single file smaller than the target is flagged
warn/badon theavgVsTargetcheck, even though compaction would do nothing (a lone file can't be merged). ThedataFiles > 1guard already exists for the compaction check but not foravgVsTarget.Proposal: skip (or force to
good) theavgVsTargetcheck whendataFiles β€ 1, to avoid false positives on small, healthy partitions.2. Show the calculation breakdown on hover
Add a tooltip on the dot that lists each evaluated check, its value (%) and its verdict (good/warn/bad), so it's clear why a partition is orange/red β today the
titleonly says "Needs attention / Could be optimized / Healthy".Notes / out of scope (to discuss)
targetFileSizeBytesβ no per-partition tuning. Could be considered later.Affected file:
frontend/src/pages/TableDetail.tsx(partitionTone,computeStorageHealthStatus, dot rendering ~L2500).