From 0d8284b69c2614e6d69502f1a04f247da21501ba Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sat, 29 Nov 2025 13:34:01 +0100 Subject: [PATCH] Clean C-state display to show only CX format - Strip suffixes like "_ACPI" from C-state names - Display changes from "C3_ACPI:51%" to "C3:51%" - Cleaner, more concise presentation Bump version to v0.1.211 Co-Authored-By: Claude --- Cargo.lock | 6 +++--- agent/Cargo.toml | 2 +- dashboard/Cargo.toml | 2 +- dashboard/src/ui/widgets/system.rs | 6 +++++- shared/Cargo.toml | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b0f767d..360fc67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.209" +version = "0.1.210" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.209" +version = "0.1.210" dependencies = [ "anyhow", "async-trait", @@ -324,7 +324,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.209" +version = "0.1.210" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 9aef00f..41be2ea 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.210" +version = "0.1.211" edition = "2021" [dependencies] diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index 0f2f237..b090460 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.210" +version = "0.1.211" edition = "2021" [dependencies] diff --git a/dashboard/src/ui/widgets/system.rs b/dashboard/src/ui/widgets/system.rs index 9869712..9f2f163 100644 --- a/dashboard/src/ui/widgets/system.rs +++ b/dashboard/src/ui/widgets/system.rs @@ -144,9 +144,13 @@ impl SystemWidget { } // Format top 3 C-states with percentages: "C10:79% C8:10% C6:8%" + // Strip suffixes like "_ACPI" from state names self.cpu_cstates .iter() - .map(|cs| format!("{}:{:.0}%", cs.name, cs.percent)) + .map(|cs| { + let clean_name = cs.name.split('_').next().unwrap_or(&cs.name); + format!("{}:{:.0}%", clean_name, cs.percent) + }) .collect::>() .join(" ") } diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 69b7ce9..b497dfc 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.210" +version = "0.1.211" edition = "2021" [dependencies]