feat(tui): add Diagnostics panel for stored evidence

Toggle a Diagnostics panel with i, built on the Activity readout. It swaps
in for the Drive pane and shows the decoded critical_warning, power-on
hours, power cycles, unsafe shutdowns, media errors and available spare
with their change over the selection, and per-hour (Day) or per-day
(History) temperature min/avg/max, active/idle/powered-off/unknown split
and coverage. History bars draw reads beside writes while it is open, and a
set critical_warning shows as a badge in the endurance outlook without
affecting the projection. Counter deltas are withheld across a controller
segment change.
This commit is contained in:
xavierk
2026-10-05 21:05:44 +05:30
parent 6c517e4ecb
commit 948e097952
10 changed files with 730 additions and 43 deletions
+3 -2
View File
@@ -161,14 +161,15 @@ def get_theme(name: str) -> Theme:
def get_graph_colors(theme_name: str) -> Dict[str, str]:
"""Return the graph colour roles for a theme preset.
Returns a dict with keys: allocated, unallocated, gap, zero, partial,
selection and muted text. Falls back to Chalktone for unknown names.
Returns a dict with keys: allocated, unallocated, secondary (the second
series), gap, zero, partial, selection and muted text. Falls back to Chalktone for unknown names.
"""
theme = get_theme(theme_name)
variables = theme.variables or {}
return {
"allocated": variables.get("graph-allocated", "#d4a017"),
"unallocated": variables.get("graph-unallocated", "#8b6914"),
"secondary": variables.get("graph-unallocated", "#8b6914"),
"gap": variables.get("graph-gap", "#554422"),
"zero": variables.get("graph-zero", "#665533"),
"partial": variables.get("graph-partial", "#aa8822"),