From e73f4783d898c4dc561ac2e821ddb3397dd5b960 Mon Sep 17 00:00:00 2001 From: noah Date: Thu, 17 Sep 2026 13:27:54 -0600 Subject: [PATCH] GUI round 6 self-test fix: decode combined-column cells in spot-checks The round-6 combined columns (Hashrate/Hashboards/TotalChips/Cooling) now store colour-segment-encoded strings in the data view, so the headless self-test's per-IP spot-checks read raw encoded bytes instead of plain text. Two checks failed in CI as a result: - S21 Pro (.149) hashrate read "B95E1860.0 TH/s / 200 TH/s" (colour hex prefix + encoded combined text) rather than the plain value. - S17 (.112) blank-hashrate read an encoded empty cell (invisible control chars), so is_empty() was false. Fix: the spot-check `cell` closure now runs dvlc_get_cell output through decode_segments_plain (a no-op for plain cells), and the S21 hashrate check expects the combined "60.0 TH/s / 200 TH/s" form. The "every cell matches the model" loop already decoded, so it was unaffected. Verified: cargo check --release --tests is clean; the self-test itself is a CI gate (local release link is OOM-blocked on this desktop). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh --- crates/alkane-gui/src/ui.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/alkane-gui/src/ui.rs b/crates/alkane-gui/src/ui.rs index a7ff8d6e..c6ea3ea9 100644 --- a/crates/alkane-gui/src/ui.rs +++ b/crates/alkane-gui/src/ui.rs @@ -1943,12 +1943,18 @@ impl App { self.view_idx.iter().position(|&ri| self.rows[ri].ip == ip) }; let cell = |row: usize, col: Option| -> String { - match col { Some(c) => t.dvlc_get_cell(row, c).unwrap_or_default(), None => String::new() } + // Decode any colour-segment encoding (no-op for plain cells) so the + // combined columns compare as their plain "actual / expected" text. + match col { + Some(c) => decode_segments_plain(&t.dvlc_get_cell(row, c).unwrap_or_default()), + None => String::new(), + } }; if let (Some(row), Some(_)) = (find("10.255.1.149"), status_col) { check("S21 Pro (.149) is slow", cell(row, status_col) == "slow", format!("status=\"{}\"", cell(row, status_col))); - check("S21 Pro (.149) hashrate == 60.0 TH/s", cell(row, hr_col) == "60.0 TH/s", + check("S21 Pro (.149) hashrate == 60.0 TH/s / 200 TH/s", + cell(row, hr_col) == "60.0 TH/s / 200 TH/s", format!("hashrate=\"{}\"", cell(row, hr_col))); } else { check("S21 Pro (.149) present", false, "row not found".into());