GUI round 6 self-test fix: decode combined-column cells in spot-checks
build-test-release / release (push) Successful in 10m15s

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 "B95E18<US>60.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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
This commit is contained in:
2026-09-17 13:27:54 -06:00
co-authored by Claude Opus 4.8
parent 9d2147b45d
commit e73f4783d8
+8 -2
View File
@@ -1943,12 +1943,18 @@ impl App {
self.view_idx.iter().position(|&ri| self.rows[ri].ip == ip)
};
let cell = |row: usize, col: Option<usize>| -> 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());