From ad9b0dc8682d875c4249c1f7fdbad879b3947841 Mon Sep 17 00:00:00 2001 From: noah Date: Sat, 19 Sep 2026 23:02:39 -0600 Subject: [PATCH] GUI round 12 (batch 1): black hashrate value, Control Board label, blank placeholder serials, sensible WhatsMiner temps - #1: the total-hashrate KPI value renders in the default (black) text colour instead of accent blue (and now dims with focus like the other neutral cards). - #4: the board-code column header is now "Control Board". - #5 (serial): placeholder serials ("N/A", "none", "null", ...) render as an empty cell instead of the literal placeholder. - #3: the Chip-temp cell now prefers each board's board/PCB temperature over the hottest-chip (outlet) reading. WhatsMiner's outlet_chip is the max chip temp (verified live: ~100C on the hottest board of a M30S+ VE40) which read alarmingly high and didn't match the ~60-79C the miner itself reports; the board temperature is the figure the miner's UI shows. Falls back to the chip temp when no board temp is reported. Applies to all makes for consistency. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh --- crates/alkane-gui/src/model.rs | 2 +- crates/alkane-gui/src/scan.rs | 29 ++++++++++++++++++++++++----- crates/alkane-gui/src/ui.rs | 4 +++- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/crates/alkane-gui/src/model.rs b/crates/alkane-gui/src/model.rs index bee91604..1c60769b 100644 --- a/crates/alkane-gui/src/model.rs +++ b/crates/alkane-gui/src/model.rs @@ -546,7 +546,7 @@ impl Column { Column::Serial => "Serial", Column::ApiVersion => "API ver", Column::Cpu => "CPU", - Column::BoardCode => "Board", + Column::BoardCode => "Control Board", Column::Algorithm => "Algorithm", Column::Pic => "PIC", Column::Locked => "Access", diff --git a/crates/alkane-gui/src/scan.rs b/crates/alkane-gui/src/scan.rs index 89b64ef2..f97a402d 100644 --- a/crates/alkane-gui/src/scan.rs +++ b/crates/alkane-gui/src/scan.rs @@ -449,15 +449,19 @@ async fn to_row(miner: &dyn Miner) -> MinerRow { .as_ref() .map(|t| t.as_celsius()) .unwrap_or(0.0); - // Per-hashboard chip temperature (hottest chip per board, falling back to - // the board/PCB temp), for the "77 / 64 / 74" Chip-temp cell. + // Per-hashboard temperature for the "77 / 64 / 74" Chip-temp cell. Prefer the + // board/PCB temperature over the hottest-chip (outlet) reading: WhatsMiner's + // outlet_chip is the max chip temp (~100C on the hottest board), which read + // alarmingly high and didn't match the temperature the miner itself reports; + // the board temperature (~60-79C) is the figure the miner's own UI shows + // (round 12 #3). Falls back to the chip temp when no board temp is reported. let board_temps: Vec = data .hashboards .iter() .filter_map(|b| { - b.outlet_chip_temperature + b.board_temperature .as_ref() - .or(b.board_temperature.as_ref()) + .or(b.outlet_chip_temperature.as_ref()) .map(|t| t.as_celsius()) }) .filter(|&t| t > 0.0) @@ -606,7 +610,22 @@ async fn to_row(miner: &dyn Miner) -> MinerRow { submodel, mac: data.mac.map(|m| m.to_string()).unwrap_or_default(), hostname: data.hostname.clone().unwrap_or_default(), - serial: data.serial_number.clone().unwrap_or_default(), + serial: { + // Some miners report a placeholder serial ("N/A", "none", ...); show + // those as an empty cell rather than the literal placeholder (round 12). + let s = data.serial_number.clone().unwrap_or_default(); + let t = s.trim(); + if t.is_empty() + || t.eq_ignore_ascii_case("n/a") + || t.eq_ignore_ascii_case("na") + || t.eq_ignore_ascii_case("none") + || t.eq_ignore_ascii_case("null") + { + String::new() + } else { + s + } + }, firmware, fw_version, api_version: data.api_version.clone().unwrap_or_default(), diff --git a/crates/alkane-gui/src/ui.rs b/crates/alkane-gui/src/ui.rs index 88934dd3..0bda210b 100644 --- a/crates/alkane-gui/src/ui.rs +++ b/crates/alkane-gui/src/ui.rs @@ -619,7 +619,9 @@ pub fn build(frame: Widget) -> App { let (card_slow, kpi_slow) = mk_card("Slow", ColorKind::Amber, Some(SVG_TURTLE)); let (card_not, kpi_not) = mk_card("Not hashing", ColorKind::Red, Some(SVG_WINE_CRACK)); let (card_paused, kpi_paused) = mk_card("Paused", ColorKind::Blue, Some(SVG_OTTER)); - let (card_hashrate, kpi_hashrate) = mk_card("SHA-256 Hashrate", ColorKind::Accent, Some(SVG_HIVE)); + // Total-hashrate value renders in the default (black) text colour, not accent + // (round 12 #1); it still dims with focus like the other neutral cards. + let (card_hashrate, kpi_hashrate) = mk_card("SHA-256 Hashrate", ColorKind::Neutral, Some(SVG_HIVE)); let (_card_power, kpi_power) = mk_card("Est. power", ColorKind::Neutral, Some(SVG_BOLT)); drop(mk_card); let _ = (card_hashing, card_slow, card_not, card_paused);