Third review round (over the wave 3/4 fixes) surfaced further findings, mostly in
new code paths; this clears them:
- HIGH the fully-built "Boards" column (Column::Hashboards: renderer, sort/filter
logic, tests, a self-test check) was missing from ALL_COLUMNS, so it was
unreachable in the UI and its self-test check was dead. Added to ALL_COLUMNS
(opt-in; Health still shows composite board health by default) and the self-test
now makes it visible -- the dot-sentinel check is live again.
- HIGH apply_pools() could start a pool write during a restore-to-stock (it sets
self.action directly, bypassing start_action's guard) -> same restore guard.
- HIGH superseding an in-flight action/pools job left the old miners' Health cells
frozen on the "…ing" label forever (the replaced handle's drain never runs) ->
clear the superseded action's op-status.
- HIGH clean_antminer() byte-sliced a miner-supplied model string without a
char-boundary check (panic DoS) -> use get(..9).
- MED access-probe errors were silently discarded -> surfaced in the indicator.
- MED the pool-password file was briefly world-readable before chmod -> created
0600 from the start (OpenOptions mode).
- MED a miner-controlled log response was buffered unbounded (OOM DoS) -> capped.
- MED the language-menu id range was hardcoded (and 790-794 collided with the
pool-preset / fw-preset dialog ids!) -> derived from Lang::all() and moved the
dialog ids to a clear block.
- LOW restore_vnish now sends the unlock body via stdin (password off argv), and
the LuxOS restore treats a reboot-dropped/empty reply as success.
Remaining round-3 findings are the previously-accepted perf tradeoffs (bulk-serial
writes, per-tick refill, per-render health recompute, linear upsert), documented
in code and in code-review-report.md.
99 tests + clippy-clean + selftest green (Boards-column check now live).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
From the recursive multi-agent review (18 confirmed findings). This wave clears
the critical, four highs, and several mediums/lows:
- CRITICAL restore.rs: a Braiins SSH restore reported SUCCESS on a wrong password
or unreachable miner. run_with_timeout now captures the exit code and drains
stderr on its own thread (also fixing the medium stderr-pipe stall), and a new
testable classify_braiins() treats an ssh auth/connection failure (stderr
diagnostic, empty stdout, non-zero exit) as failure while still reading a
dropped connection / timeout as the expected reboot. Unit-tested.
- HIGH restore exclusivity: apply_restore_confirm now refuses when a scan/refresh/
action/flash or another restore is in flight, so this destructive action never
overlaps or orphans a running restore handle.
- HIGH secrets off the command line: Braiins SSH uses `sshpass -e` (env, not -p),
and the access-probe curl passes credentials through a config on stdin (-K -)
instead of `-u user:pass`; both were visible in the process list. New masked
password field (wxTE_PASSWORD bridge) so the Credentials dialog no longer
renders saved passwords in the clear.
- MEDIUM correctness: per-board Chip-temp readings are now index-aligned with the
boards (a missing middle board shows "-" instead of shifting later boards left).
- MEDIUM: saved pool lists (which can hold a pool password) are chmod 0600.
- LOW: access-probe curl timeout now reaps the child (no zombie).
95 tests (+classify_braiins) + clippy-clean + selftest green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Cleared all clippy findings in alkane-gui (cargo clippy --no-deps): mechanical
fixes via clippy --fix (redundant imports, useless format!, manual_contains,
manual_is_multiple_of, unnecessary_map_or, unused parens) plus manual fixes:
- type_complexity: factored the segment tuple into model::{Rgb, Segment} aliases.
- large_enum_variant: #[allow] on ScanMsg/RefreshMsg with a note -- Row is the
common variant, so boxing it to shrink the rare Started/Done would add an
allocation per miner on the hot path.
- dead code: removed unused SHAPE_PULSE_DOT, ColorKind::Accent, clear_op_status,
and RestoreMsg's unread `total`; kept the restore/access-probe cancel handles
(workers honour cancellation; UI stop control pending) under #[allow].
- question_mark, needless_range_loop, drop_non_drop, doc_lazy_continuation fixes.
Only vendored wx-rs warnings remain (out of scope). Added LICENSE-MIT and
LICENSE-APACHE (Cargo.toml already declares MIT OR Apache-2.0). 94 tests +
selftest green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
The pool-field "+" menu previously offered a one-shot "Add new" (append
the current box value) plus a "Remove saved value" submenu. Both are now
replaced by "Add new...", which opens a small manager window: a multiline
editable list of all saved values for that field, seeded with the current
box value as the last line. Save rewrites the whole saved list at once.
- pool_prefs: new save_all() rewrites a field's saved list; the trim /
drop-empties / drop-presets / de-dup step is factored into a pure
dedupe_saved() with unit tests. Removed the now-unused add_saved /
remove_saved.
- ui: build_pool_presets_dialog + apply_pool_presets, wired to
ID_POOL_PRESETS_SAVE/CANCEL; "+" menu shows "Add new..." and no longer
builds the remove submenu; ID_POOL_MENU_REMOVE_BASE dropped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
- #4 ePIC miners report their firmware family as "UMC OS"; colour that row light
blue in the Firmware column (was falling through to the theme default / black),
matching the existing ePIC colour.
- #5 Configure-pools dialog: widen the "+" buttons so the glyph shows; the dropdown
"add" entry now reads "Add new"; user-added values can be removed via a "Remove
saved value" submenu (pool_prefs::remove_saved); dropped the intro tidbit and
narrowed the window.
- #6 Restore-to-stock confirmation: the miner list is now a height-capped,
scrollable text box instead of one unbounded label, so restoring hundreds at
once stays usable. Removed the "Flash firmware..." right-click option for now
(the in-app flash path is parked while it is reworked).
- #7 Replaced the brain (control board) and fan Health icons with the new
operator-supplied artwork, image-traced from PNG to SVG (potrace) and stripped
of explicit fills so the Health column's per-state recolouring still applies.
Headless selftest passes (fixtures render through the real widgets); all GUI unit
tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Twelve of the round-15 items (the code items; the live-hardware flashing/
testing and the settings/localization/logs work follow separately):
#1 Configure-pools: three pool rows (address, account, worker, password),
each field with a "+" dropdown of presets (top-11 BTC pool stratums;
worker-name placeholders) plus user-addable, persisted entries. Worker
picks insert at the cursor rather than replacing. Writes up to three pools
per miner via set_pools_config, worker expanded per unit.
#2 PIC detection: replace the broken SSH i2cdump (it read 0x48, the temp
sensor, not the PIC) with a model lookup -- no firmware exposes PIC over the
network, so infer it from the model (noPIC: S19k Pro, S21 family, T21,
explicit noPIC; PIC: rest of the S19 line).
#4 Zoom: an editable percent field in the status bar (type an exact scale)
and Ctrl +/- / Ctrl+0 to zoom in/out/reset.
#5 Health icons align in fixed slots (power, control, fans, hashboards);
miners with fewer fans/boards leave a gap so hashboards still line up. The
max fan/board counts are computed parametrically from the fleet.
#6 Light: the locate-light column is on by default (last), shown as a
green-over-red beacon flashing quickly instead of a single amber dot.
#8 The bottom-left status line is now scan-only; operation progress lives in
the Health column (per miner) and failures in the bottom-right indicator.
#9 / #10 / #11: drop the Credentials-dialog blurb; move the scan-ranges
format help to a tooltip; make Restore-to-stock a plain confirmation (no
typed keyword, no warning wall).
#12 Z15 fans: the v2020 backend now reads fans from higher fan slots
(the Z15 reports fan3/fan4 with fan1/fan2 = 0). Vendored patch 0009.
#14 Export: an Export button writes every scanned data point to a CSV, one
value per cell (lists expanded to indexed columns) -- complete and
machine-readable, unlike the on-screen table.
#15 Health tooltips are per-icon: hovering a specific fan or hashboard shows
just that component's state, with errors attributed to the board that names
them in the message.
New wx-rs bridge surface: widget tooltips, save-file dialog, insert-at-cursor,
status-bar zoom entry + Ctrl+/-, the light beacon + alignment-gap sentinels,
and per-icon cell tooltips (bridge patches 0002/0003 regenerated). Unit tests
(worker templates, PIC map, CSV export, health) + headless selftest pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6