749cdc4eededfc6fa0a17a4225d728e7fd5e0a95
34
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
19e469ebc4 |
item 12: clippy-clean our crate + add LICENSE files
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
|
||
|
|
6cd732dec5 |
Round C G7 (read side): per-board voltage/frequency in the board tooltip
Surfaces the per-hashboard configured voltage (V) and frequency (MHz) that asic-rs already reads into BoardData but the toolkit dropped. Added MinerRow.board_voltages / board_frequencies (index-aligned with the boards, 0.0 where unreported), populated at scan time, and appended to the per-board Health tooltip as extra middot segments after actual/expected hashrate. Verified live on LuxOS S19j Pro (10.4.1.60): boards report 12.73 V (frequency is None in LuxOS's live stats path -- a pre-existing backend gap; the tooltip omits absent values). miner_probe `msgs` now prints board freq/volt too. The G7 WRITE path (per-board V/F override) stays deferred: no firmware accepts Manual targets today and a bad voltage can damage a board, so per the parity roadmap it is bench-only and not shipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
95b8428c12 |
Round C G3: named firmware presets (LuxOS) end to end
The flagship structured-tuning parity item: list and select a firmware's named profiles/presets, not just map a watts number onto one. Backend (vendored asic-rs, patch 0022): LuxOS now implements SupportsPresets (get_presets reads the live `profiles` RPC) and a real SupportsTuningConfig (set_tuning_config routes Preset(name) -> profileset, Power -> set_power_limit). Unit-tested (parse_profiles_to_presets); verified live-read on two production LuxOS S19j Pro (10.4.1.60/.67). VNish already exposed presets. GUI: MinerCaps.supports_presets + MinerRow.presets (read live at scan time for preset-capable miners; ~1 RPC per such miner per 300 s rescan). New "Set profile..." right-click item opens a selector populated from the profiles common to the whole selection (so the chosen name is valid on every target), applied via the new ConfigAction::Preset. Offline fixtures seed demo presets. CLI: `miner_probe presets <ip>` (list) and `setpreset <ip> <name>` (select). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
d378a484d6 |
ui: attribute hashboard faults + pools dialog + widths (round 18 #5/#8a/#8c)
- #5 Antminer-hardware firmwares (stock/VNish/Braiins/LuxOS) report faults with no component, so a real per-board fault landed on the control-board tooltip instead of the board it names. messages_to_faults now recovers the board index from the self-describing message text ("Chain 2 ...", "hashboard 0 ...", "Slot 1 ...") so the issue shows on the right hashboard's tooltip. WhatsMiner (which does attribute HashBoard{idx}) is unchanged. - #8a The pools dialog is widened so the rightmost "+" preset buttons (Password column) are no longer clipped off a too-narrow dialog. - #8c The pool column headers now span field-width + the 34px "+" button, so the "Address/Account/Worker/Password" titles line up with the boxes below them. board_index unit test + SELFTEST pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
64e084ddee |
ui: per-icon tooltip repositioning + Zcash units/expected (round 18 #4a/#6/#7)
- #4a Health-column tooltips now reposition per icon: the query-tooltip handler scopes GTK's tip area to the hovered icon's slot, so moving across icons hides the old tooltip and shows a fresh one at the new position (was stuck in place). - #6 Plain Antminer Z15 firmware omits the expected hashrate (the Z15j reports it), so it's filled from the model nameplate (420 KSol/s) -- the actual/expected column + colour now work for Z15 like every other miner. - #7 Equihash hashrate now shows correct units: Sol/s (not TH/s). The stored value is Sol/s/1e12, so ths*1e12 recovers the Sol/s count; the per-board tooltip and the hashrate KPI card now label Equihash as Sol/s with an SI prefix. Unit tests (equihash_hashrate_units) + health tests pass; SELFTEST PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
93bd528430 |
health: PSU-fault colour rules + per-board actual/expected tooltip (round 18 #2/#3/#4b)
- #2 A PSU fault while the miner is mining is now a warning (yellow) not a failure (red); a fault on a non-mining miner stays red. Fixes WhatsMiners flagged red while running fine. - #4b A PSU fault no longer greys the hashboards. Board colour reflects the board's own state: running -> green, faulted (e.g. WhatsMiner 540/560) -> red, and grey ONLY when the board is genuinely not detected. Stall-reddened boards the fault codes don't name are still exonerated to green; undetected boards stay grey. - #3 The per-board tooltip shows actual / expected hashrate (e.g. "2 . 33.5 / 35.0 TH/s"); a not-detected board shows "not detected". Adds MinerRow.board_expected_ hashrates (from BoardData.expected_hashrate) + an algorithm-aware hashrate unit (Equihash -> Sol/s, groundwork for #7). Health tests updated + pass; SELFTEST PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
6fb73c9746 |
firmware: detect + label Bixbit and Hiveon (own colours)
Bixbit and Hiveon keep the stock Antminer web API, so asic-rs identifies them as "AntMiner Stock". Distinguish them at scan time from the cgminer `version` reply: Bixbit tags it with BixFirmware/BixMiner/BixAPIVersion (definitive; verified live on a Bixbit S19j Pro at 10.4.1.70); Hiveon carries a "hiveon" marker (best-effort -- no live Hiveon unit to confirm the exact signature yet). A real stock miner (no marker) stays "Stock". Firmware column colours: Bixbit -> pinkish-red (223,62,102, their logo); Hiveon -> darker logo orange (228,112,24), with "hiveon" added to the existing hive/hiveos alias. The probe is a short, timeout-bounded cgminer query run only for Antminer miners that first identified as stock. SELFTEST PASS. Hiveon detection to be re-verified once a Hiveon miner is available. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
8fe61ec427 |
psu: PSU info scan + version/Vmin/Vmax columns + tooltip V/A (R5/G15)
Round 17 R5/G15. asic-rs had no PSU telemetry. Adds an optional PsuInfo to MinerData (model, version, rated voltage min/max, live output voltage/current), a DataField::Psu, and a default parse_psu backends override (patch 0018). ePIC populates it by merging the summary "Power Supply Stats" with the capabilities "Psu Info". GUI: three new columns -- "PSU version", "PSU Vmin", "PSU Vmax" (Hardware group in the picker) -- and the R2 power tooltip now shows the PSU output voltage (and amperage when the firmware reports a non-zero current; ePIC leaves current 0, so it shows just the voltage). Verified live on ePIC S19j Pro (10.4.1.6/.10): model 117, fw 22, Vmin 11.877 V, Vmax 15.182 V, output ~13.2 V. 8 model tests + 18 ePIC backend tests + SELFTEST pass. Non-ePIC firmware leave the PSU fields blank until they add parse_psu. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
34a1a1f3b1 |
tuning: structured power + hashrate target dialogs (Round C)
Round 17 C, first GUI increment. Adds "Set power target..." and "Set hashrate target..." to the right-click config menu, each a value prompt that shows the miner's current target and the firmware-advertised valid range, and validates the entry against it. - Power target routes through the existing set_power_limit path (LuxOS/Braiins/ WhatsMiner; VNish stays masked per operator guidance). Where the firmware advertises an envelope (Braiins: 944-6435 W) the prompt shows and enforces it. - Hashrate target routes through set_tuning_config for firmware that tunes by hashrate (ePIC). The apply path preserves the firmware's current tuning algorithm and scaling config (ePIC's set_tuning_config requires both), reading them back before writing the new target. Model gains: MinerRow.tuning_target_label + power/hashrate target min/max (from data.tuning_capabilities), and MinerCaps.hashrate_target (set when the miner actively tunes by hashrate via set_tuning_config). miner_probe's settune verb now mirrors the same algorithm+scaling-preserving apply path. Verified live (reversibly, restored after): ePIC S19j Pro (10.4.1.6) hashrate 94->92->94 TH via set_tuning_config Ok(true); LuxOS/Braiins power targets via set_power_limit (see the luxminer profile-name fix). Model tests + SELFTEST pass. Presets (G3) and per-board manual V/F (G7) are deferred: no firmware enumerates its presets through the standard tuning_capabilities API. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
4e825f3ee5 |
health: bare-data per-component tooltips (R2)
Round 17 R2. The Health column's per-icon tooltips were prose ("Hashboard 3:
faulted", "Power supply: OK (drawing power)"). Replace them with just the data an
operator wants:
- Hashboards: an operating board shows its number counting DOWN (n-1..0, left to
right) and its hashrate ("2 · 33.5 TH/s"); a faulted board shows its error
message with the firmware code; a board the failed PSU left untested shows
"unpowered". No "Hashboard N:" prose.
- Fans: just the RPM ("4700 rpm"), unless the fan has a fault (then the error+code).
- Control board: its own and un-attributed faults with codes, else a short OK.
- Power: a healthy PSU's output voltage + amperage when reported, else a short OK;
a faulted PSU shows the error and code.
Adds per-board hashrate (BoardData.hashrate) and the firmware error code
(MinerMessage.code) to the model, and forward-compatible PSU output V/A fields.
asic-rs does not yet expose PSU output V/A (roadmap G15), so the healthy-PSU
tooltip shows "PSU OK" until that lands, at which point it auto-upgrades to "V / A".
Unit tests (faults_attribute, health_tooltips_are_bare_data_round17_r2) pass;
SELFTEST PASS. Live data confirmed available (per-board hashrate + fan RPM on the
Braiins corpus miners).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
|
||
|
|
da0d1582be |
scan: cap identification concurrency at 128 to fix Braiins value dropout (R4)
Round 17 R4. Scanning most values from Braiins OS units failed under a full fleet scan: a /24 returned watts=0 and no best-share/temps/fw for Braiins miners (and dropped a few responders entirely), while the same miner scanned in isolation populated fully. Root cause: asic-rs picks a scan concurrency of 1000 for any range up to /22, so a /24 fires all ~254 address probes at once. Over a real link (the fleet is reached across a WireGuard VPN, and a subnet full of dead IPs holds every TCP connect open for the whole identification timeout) that burst starves the per-responder get_data. A Braiins miner fans out ~12 authenticated REST calls; under the burst they drop miner/stats, so "most values" come back blank. It is not FD exhaustion (nofile is 500k), not the per-call timeout, and not an auth race. Fix: cap identification concurrency at 128 in the app (GUI scan + miner_probe). On the live fleet 128 was the highest cap that stayed fully reliable -- 192 already dropped responders, 254 blanked a Braiins miner. A /24 still finishes in ~35s; larger ranges just take proportionally longer and stay correct. Belt-and-suspenders in the braiins backend (patch 0016): single-flight the login (one auth instead of ~12 concurrent) and widen the defensive get_data timeout 5s -> 15s. Verified live: 10.4.1.0/24 now populates both Braiins corpus miners (.27 watts=2748 best=55217110, .83 watts=2749) fully and misses no responders (65/65). SELFTEST PASS. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
7f802c568f |
Scan progress: smooth per-address counter (was jumping ~1%/second)
The scan counter jumped in big steps (e.g. +45 for a 4590-address scan) because (a) progress was only emitted every total/100 addresses and (b) the drain timer ran once per second, so the gauge only refreshed ~1 Hz. The +45 was total/100, not a chosen value. Fix, both cheap: - scan.rs emits progress per address (throttled only above 5000 addresses to bound channel traffic) instead of every 1%. - ui.rs runs the scan/drain timer at 200 ms (5 Hz) so the counter climbs smoothly; drain_scan coalesces the many per-address updates into ONE gauge/status update per drain (no extra repaints). A tick accumulator keeps the once-per-second work (auto-rescan countdown, idle status) at 1 Hz despite the faster tick. Net: the counter now climbs several times a second in small increments; overhead is negligible (unbounded mpsc sends are cheap and the gauge still repaints once per tick). No user-facing setting added -- the smoothness is size-independent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
86338062a5 |
Round 17 B (part 2, GUI): timezone / change-password / factory-reset dialogs + BOS fix
Wire G10/G11/G12 into the GUI (they already had CLI verbs in part 1): - MinerCaps gains timezone / change_password / factory_reset (probed from the matching supports_*() at scan time; intersect + any_control + is_empty updated). - ConfigAction gains Timezone(String) / ChangePassword(String) / FactoryReset with labels + apply arms. Timezone/FactoryReset go through apply_action(&dyn Miner); ChangePassword takes &mut self so it runs on the owned miner in the action loop. - ui.rs: a shared PromptKind (Power/Tuning/Timezone/Password) generalises the value prompt (timezone is IANA-validated before firing; password is non-empty); factory-reset uses the confirm dialog with a strong WIPES-config/DHCP warning. New gated context-menu items: Set timezone, Change password, Factory reset. Backend fix (asic-rs patch 0015): BOS send_command treated an empty 2xx body as a parse error, so change_password reported Ok(false) on success. Empty 2xx is now Null (success). Found + fixed while live-verifying G11. Verified live on Braiins 10.4.1.27: full change-password round-trip (root -> bftest2 -> read with new pw -> restore root), all Ok(true), unit left on root/root. Timezone shares the CLI-verified set_timezone_config path. Factory-reset is wired + gated but intentionally NOT live-fired: its behaviour is unrecoverable per firmware (can revert LuxOS to stock / reset network to DHCP and lose the unit) -- needs a truly sacrificial console-attached unit. GUI selftest + 89 unit tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
74b97162f5 |
GUI round 16 (#1/#2/#3): per-component health attribution + tooltips
Health icons and their hover tooltips now reflect the miner's actual per-component faults instead of a generic "faulted". - #1 Each Health icon's tooltip carries the specific fault text for THAT component (e.g. "Slot 0 error reading chip id.", "Power current error."), sourced from asic-rs's structured MinerMessage.component (HashBoard idx / PowerSupply / Fan / ControlBoard) rather than fragile string matching on the summary. New MinerRow `faults` field + FaultComponent/Fault types; scan.rs maps messages -> faults. - #2 A power-supply fault turns the bolt icon red, lists the PSU faults on its tooltip, and greys (not reds) every hashboard -- the boards can't be powered or tested, so they read "unpowered (PSU fault)". - #3 When the miner reports board-specific faults, ONLY the named boards are red; the rest stay green. A whole-miner stall zeroes every board's hashrate, which previously reddened working boards the error codes actually exonerate. Backend enabler (asic-rs patch 0012): the WhatsMiner V1 backend now sources faults from get_error_code (like V2/V3; its summary error fields are empty on H6OS), and a targeted repair fixes firmware that emits an invalid bare-pair error_code array. Verified live: 10.7.1.231 (PSU) greys its boards + shows the 4 PSU faults on the bolt; 10.8.1.234 (540/541/561) reds boards 1+2 and leaves board 3 green. Unit tests cover the attribution and the malformed-array repair; all suites pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
0d19e958f0 |
GUI round 15 (part 1): pool dropdowns, aligned health icons, export, more
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 |
||
|
|
368f992404 |
GUI round 14: bigger health icons, table zoom, pool config, op progress
Seven items from the round-14 list: #1 Health icons: render bigger (nearly the full row height) and packed tighter so a row of component icons stays large and readable; the icon sizes also scale with the new table zoom. #2 Scan timeout: a per-miner scan timeout (asic-rs identification timeout) is now configurable in the Scan-ranges dialog and persisted, so slow miners can be given longer or fast scans sped up. #3 Table zoom: a slider in the bottom-right of the status bar scales the whole table together -- font, component icons, row height, and column widths -- from 50% to 250% (default 100%). Implemented in the wx bridge (no Rust round-trip); the custom SegmentRenderer draws its text in the control's scaled font so the coloured columns zoom like the native ones, and the zoom is re-applied after a column rebuild so it survives show/ hide/reorder. #4 Operation progress: while an operation runs on a miner (refresh, config/light/power/tuning action, firmware flash, restore-to-stock, access check), its Health cell shows the progress text ("refreshing…", "restarting…", "setting pools…", …) instead of the component icons, and reverts to icons when the operation finishes. #5 Remove the SSH PIC probe: the "Detect PIC (SSH)..." right-click flow and its dialog, background probe, and pic_probe module are removed. PIC state stays a best-effort model-string heuristic in the PIC column. #6 WhatsMiner access: WhatsMiners now show the locked/unlocked padlock in the Access column instead of a blank cell -- since round 12 #8b gave the V1/V2/V3 backends their control commands, the same capability heuristic the other brands use applies to WhatsMiner too (the token access check still refines a read-only unit to "locked"). #7 Configure pools: a right-click "Configure pools..." flow (gated on the new pools capability) with three fields -- pool address and account (required) and an optional worker name. The worker name expands per miner from case-insensitive placeholders scanned from each unit: {ip1}..{ip4}, {serial}, {mac} (colons removed), {nameplate-hr} (rated TH), {brand}, {model}, {submodel}, {cpu}, {cb}, {firmware}, {hostname}. Applied via asic-rs set_pools_config on a background thread reusing the action plumbing. wx-rs bridge patches 0002/0003 regenerated. No vendored asic-rs changes. Unit tests (component health, worker-template expansion) + headless selftest pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6 |
||
|
|
3ba3211371 |
GUI round 12 (#8b, part 1): correct WhatsMiner lock/access with the :4028 token API
WhatsMiners were shown "locked/unauthenticated" even with their default login. Two causes, both fixed: - The access probe hit an Antminer-only endpoint (/cgi-bin/get_miner_conf.cgi via curl --digest) for EVERY make; WhatsMiners answer 307 there, so the check was always indeterminate. Added a real WhatsMiner check over its :4028 token API: get_token (unauthenticated) -> derive the AES key from the password (md5crypt + SHA256, the same scheme the vendored asic-rs whatsminer backend uses) -> send a NON-mutating encrypted `summary`. An encrypted reply means the password was accepted (unlocked); a plaintext "enc json load err" means rejected (locked). probe_access now branches on the miner brand. Candidate passwords: a per-firmware override (round 12 #13) if set, else the factory defaults admin (V1/V2) and super (V3); all attempts are non-mutating so trying both is safe. - The scan-time lock guess (!caps.any_control()) falsely marked older WhatsMiners locked because they route to the asic-rs V1 backend, which declares no control commands even though the miner is controllable via the token API. WhatsMiner lock state is now left unknown at scan time and decided by the real probe. Live-verified on the fleet: older 20220422.18.REL units (10.8.1.176, 10.7.1.196) and newer M30S+ (10.8.1.45) all report UNLOCKED with the default admin login; the Antminer digest path is unchanged (Z15 -> 200 with root/root -> unlocked). Added a headless `ALKANE_ACCESS_PROBE="<ip> <make>"` diagnostic and a deterministic AES unit test. Self-test passes. Note: this is the access/lock half of #8b. Implementing the full reverse- engineered WhatsMiner command set (control + monitoring over the token API) is tracked separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
ad9b0dc868 |
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
ae437c0d24 |
GUI round 11 (batch 1): default columns, control-board split cleanup, Stock/Env fixes, relative sort, consistent zebra + focus-dimming, hashboard/light dots, access icon
Table/model (Rust): - #12: default columns are now IP, Model, Errors, Hashrate, Power, Chip temp, Firmware, CPU, Boards, Access, in that display order (initial ViewState and the built-in "Default" preset both updated). - #14: removed the Control board column (CPU + Board replace it); the underlying control-board string stays on MinerRow for the SSH PIC probe. - #6 (part 1): firmware family strips the vendor word asic-rs prepends on stock firmware ("AntMiner Stock" -> "Stock"), moving it into FW Version. - #17: air-cooled miners' ambient reading routes to a new "Env temp" column instead of "Fluid temp" (asic-rs reports ambient in its fluid field and has no cooling-type flag; cooling type is inferred from the model name). - #16: relative-hashrate (actual/expected) sort -- the Hashrate header cycles absolute-asc/desc then relative-asc/desc, with right-click menu entries; HashrateRel is a sort-only pseudo-column. Rendering (wx-rs SegmentRenderer bridge, mirrored to patches/0003 per ADR 0003): - #3: the per-row zebra background now fills the whole column-wide cell (wx shrinks a custom renderer's rect to the content size, so the earlier fill covered only the text; Render now fills GetOwner()->GetWidth() and wxGTK clips it to the cell). - #1/#7: uncoloured segments (combined-cell slashes, "Stock" firmware) take the tree widget's themed text colour at its live GTK state, so they dim on window-backdrop like the native cells. - #10: the Boards column renders per-hashboard status dots (green hashing / red faulted / grey undetected, board 1 rightmost); the Light column renders a yellow locate dot while flashing. - #13: the Access column renders a padlock icon (green open = writable, red closed = view-only) instead of "locked"/"unlocked" text. Shapes draw from control-char sentinels (never emoji/pictographs), font- independent. Self-test verifies the icon columns structurally. 82 unit tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
aa75031112 |
GUI round 10 (batch 1): firmware family colour + FW Version, CPU/Board split, per-board chip temp, error count
#3 Firmware column now shows the firmware FAMILY, coloured (Stock=default, VNish=green, Braiins=purple, LuxOS=gold, BixBit=pink, ePIC=light-blue, Hive=orange, Alkane=navy -- Alkane wired for our future scannable firmware); the version moves to a new "FW Version" column. #4 Control board split into a "CPU" column (AML/CVI/BBB/XIL, WhatsMiner H3/H6/H616) and a "Board" column (C76/C88/CBE/C49/C55, CB2/CB4/CB6). Fixed the AMLogic 140mm heuristic so S21 Pro -> CBE (was C76). The combined ControlBoard column stays available (hidden). #5 "Worker" now shows just the rig name; a new "Pool account" column holds the account (pool username "account.rig" split on the first dot). #6 Chip temp shows per-hashboard temps as integers ("77 / 64 / 74"), each coloured on the blue-to-red scale, falling back to the integer average. #7 Errors column shows just the count (a number, even for one; no "errors" word); the hover tooltip lists the messages, now concise -- Info dropped, the repetitive "[Error]"/"[Warning]" prefixes stripped, and duplicates collapsed. Default profile updated to show Firmware/FW Version/CPU/Board/Errors. 80 offline tests pass; headless self-test PASS; screenshot-verified the colours, splits, per-board temps and error counts in the offline demo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
3ac4e104a0 |
GUI round 9 (#3): mask power-limit on VNish; naming passthrough fix; live-scan probe tool
#3 (power-limit shown where it shouldn't be): asic-rs advertises supports_set_power_limit = true unconditionally for whole firmware families, VNish included. Per operator guidance -- VNish Antminers should not expose the power-limit control, while Braiins keeps it -- mask the capability for VNish firmware in to_row; every other backend keeps asic-rs's answer. Verified against the live fleet (all VNish Antminers report true; Antminer stock Z15 / S21Pro already report false). #11 follow-up: asic-rs Unknown-model passthroughs carry the raw vendor string with the brand still in it (seen live: a NoPIC S19 as "ANTMINER S19 (88)"). Drop a redundant leading brand word in clean_antminer so the Model column never repeats the Brand column: "ANTMINER S19 (88)" -> "S19 (88)". New read-only diagnostic: crates/alkane-gui/src/bin/miner_probe.rs -- a standalone asic-rs CLI (`miner_probe scan <cidr>...`) that reuses the GUI's MinerFactory + saved-credential setup to inventory a range (ip/make/firmware/ model/control-board/watts/supports_power_limit/supports_tuning) without going through the wx event loop. Used to validate the round-9 naming + capability work against real hardware; kept as a hardware-check tool. It performs no mutations (asic-rs exposes no power-limit read-back, so exact restore-to-prior cannot be guaranteed from it alone). naming unit tests + headless self-test PASS; 80 offline tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
3c99934513 |
GUI round 9 (#11): device-naming cleanup -- Brand/Submodel columns, clean model names, control-board short codes
asic-rs hands us compact Rust-identifier model strings ("S19KPro",
"M30SPlusVE40") and bare control-board family names ("Xilinx", "AMLogic",
"BeagleBoneBlack", WhatsMiner "H3"/"H6"/"H6OS"/"H616"). This adds a pure
display-layer transform (new crate::naming) that turns those into the
human-facing identity the table shows -- no asic-rs edit, so it stays a
build-on-top layer over the vendored crate.
- Model column now shows the cleaned name: brand dropped, family-letter
suffix lowercased, word suffixes spaced, "+"/"++" for Plus/PlusPlus, and
(WhatsMiner) the trailing version block moved out. "S19KPro" -> "S19k Pro",
"S21Pro" -> "S21 Pro", "M30SPlusVE40" -> "M30S+".
- New Brand column ("Antminer"/"WhatsMiner"/...) and Submodel column
(WhatsMiner version block, e.g. "VE40"; blank for Antminer -- its hashboard
type is not reported over the network). Both hidden by default; available
via the Columns menu and filterable.
- Control-board column now shows the Bitmain short code: BeagleBoneBlack ->
"BBB (C77)", CVITek -> "CVI (C88)", Xilinx -> "XIL (C49)" (S17-era) /
"XIL (C55)" (S19-era), AMLogic -> "AML (C76)" (120mm) / "AML (CBE)"
(140mm); WhatsMiner H3 -> "H3 (CB2)", H6 -> "H6 (CB4)", H6OS ->
"H6os (CB4)", H616 -> "H616 (CB6)". Xilinx/CVITek/AMLogic/BeagleBone are
already detected by asic-rs, so no crate extension was needed.
Heuristics (asic-rs reports only the board family, never the exact board
number): the AMLogic 120mm-vs-140mm (C76/CBE) and Xilinx S17-vs-S19-era
(C49/C55) splits are inferred from the model family. These are documented in
crate::naming and are the one place a live-hardware correction may be needed.
ALL_COLUMNS is now 41. Fixtures refactored to carry asic-rs-style
make/model_id/board so they exercise the real transform. naming has unit
tests for the model/submodel/brand/control-board rules; the headless
self-test gained 32 checks (brand/model/submodel/control-board per fixture),
all PASS. 79 offline tests pass; screenshot-verified the cleaned Model and
control-board codes in the default view.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
|
||
|
|
77399bdd06 |
GUI round 9 (batch 1): column-reorder persistence, post-action refresh, algorithm column, hashrate KPI label
- #1 Column reorder now persists (incl. after sorting a moved column). On wxGTK, GetColumnPosition() does not reflect a native GtkTreeView column drag, so the reorder was read as a no-op and the rebuild snapped columns back. dvlc_col_at_pos now reads the real display order from the GtkTreeView (gtk_tree_view_get_columns + GTKColumnToWX) on __WXGTK__, falling back to GetColumnPosition elsewhere. - #2 A right-click config action (e.g. Flash lights) now re-probes the miners it targeted when it finishes, so the change shows in the table (skipped after a flash, since the unit is rebooting). New App.action_targets. - #7 New Algorithm column (from asic-rs hashrate.algo: SHA256/Scrypt/Equihash/...), categorical so it is filterable via the value checklist. - #9 SHA-256 Hashrate KPI: card relabelled "SHA-256 Hashrate" and the value drops the "/s" ("685 TH", "1.2 PH"). (Per-algorithm click-cycling deferred.) Note on #8 (Z15 shows T not k): our formatting already derives the SI prefix from the base value (si_mantissa), so a wrong 'T' means asic-rs reports the wrong unit for that Equihash model -- an asic-rs backend fix that needs a live Z15 to verify. cargo check --release --tests clean; patch 0003 regenerated + validated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
408b7d12b4 |
GUI: real access/lock-state detection via credentialed digest probe
asic-rs has no lock-state signal (a wrong-password miner just silently returns fewer fields, because the collector drops the 401). This builds the real check ON TOP of asic-rs: - access_probe.rs: a NON-mutating, digest-authenticated GET to a privileged endpoint (Antminer get_miner_conf.cgi, read-only). The HTTP status is decisive -- 200 = credentials authenticate (writable -> unlocked), 401/403 = rejected (view-only -> locked); anything else -> indeterminate. Pure classifier + unit tests; shells out to curl --digest (no HTTP crate) so the offline build is unaffected. - Right-click "Check access (auth)" on the selected miners runs start_access_probe on a background thread using the saved scan (web) credentials (default root/root), updating write_locked in the rows as results arrive. Fake-scan mode returns deterministic demo results. Guarded against a flash / concurrent probe. Replaces the previous capability-based inference for the miners the user explicitly checks. cargo check --release --tests clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
d73299166e |
GUI: real PIC detection via on-board SSH + i2c probe (right-click action)
asic-rs and the miner's network API cannot report PIC-vs-noPIC (only one legacy
SKU, ANTMINER S19J88NOPIC, carries it in the model string; the authoritative
signal lives on the control board's I2C bus). So this builds the real detector
ON TOP of asic-rs as an opt-in SSH probe, per the project wiki
(30-power-thermal-and-board-identity/hashboard-eeprom-pic.md):
- pic_probe.rs: SSH to the control board and run i2cdump -y <bus> 0x48 b, then
discriminate by the register period -- a PIC/MCU board exposes an 8-byte
register file that WRAPS every 8 bytes ("17 00 4b 50 7f 00 00 00 ..."), while
a noPIC board has a 4-register LM75 temp sensor (4-byte wrap). The classifier
is pure + unit-tested against the wiki's example dumps and is conservative
(indeterminate -> None, never a guess). The I2C bus is chosen from the
control-board family (AMLogic->1, BeagleBone->0, else try both). We shell out
to ssh/sshpass (no SSH crate) so the offline/vendored build is unaffected.
- Right-click "Detect PIC (SSH)..." on the selected miners: a dialog collects
SSH login (prefilled from a new 0600 ssh-credentials.txt, default user root),
then start_pic_probe runs one miner at a time on a background thread (each is a
slow SSH round trip; never part of the fast network scan) and upserts
pic_present into the rows as results arrive. Fake-scan mode returns
deterministic demo results. Guarded against a firmware flash / concurrent probe.
The classifier is unit-tested; the live SSH round-trip needs a reachable bench
miner with SSH + i2c-tools to verify end-to-end. cargo check --release --tests
clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
|
||
|
|
4fea3becf6 |
GUI round 8a.2: PIC, Access (locked), and Errors columns
Adds the round-8 columns that asic-rs either already exposes or that we infer. Control board type (#9) and identify-light state (#4b) were already scannable columns; this adds the three new ones: - PIC (#9): asic-rs does not report PIC-vs-noPIC over the network (it needs an on-board SSH/I2C probe -- a separate feature), so this is a best-effort inference from the model string ("NoPIC" variants), showing "?" when unknown. New MinerRow.pic_present. - Access (#13): locked (view-only) vs unlocked (writable), inferred from whether the miner exposes any writable control capability (asic-rs has no direct lock-state field). Red = locked, green = unlocked. New MinerRow.write_locked and MinerCaps::any_control(). - Errors (#12): wires asic-rs's structured MinerData.messages (previously dropped) into MinerRow.errors as "[Severity] text (component)" lines, most severe first. The column shows a summary (blank / the single message / "N errors") in red when non-empty; the full list becomes a hover tooltip once the tooltip bridge support lands in 8b. The identify-light column header is relabelled "Light" (from "Fault light") to match the round-8 terminology. Fixtures populated with demo values so all new columns render offline. Unit tests for the three cell renderers + any_control. cargo check --release --tests is clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
7781ff71d3 |
GUI round 8a: no phantom-offline rows, hashrate/temp conditional formatting, multi-range parse, uniform KPI cards
First slice of the round-8 batch (Linux; Windows/macOS builds deferred to a
dedicated platform round per the design discussion). Feature/format changes
with no C++ bridge dependency; the bridge-dependent items (scroll-hold, zebra +
default-colour rework, header menu, rubber-band select, tooltips, presets,
frozen columns, plus the new asic-rs columns) follow in 8b/8c.
- Offline recognition (reverses the round-6 interpretation): the scanner no
longer fabricates a row for an address with no miner. Only miners that
actually respond become rows; a responding non-mining miner is "not hashing".
Removed the MinerRow.offline field, MinerRow::offline(), the "offline" status,
and the synthetic fixture/fake-scan offline rows. The bench fleet is now 9
rows (was 10); KPI not-hashing is 1.
- Hashrate conditional format: the scale now bottoms out at 50% (full red at
<=50% of expected, amber at 75%, green at 100%+), matching "green = 100%,
red = 50% or lower".
- Hashrate cell format: prefix-only unit, no space, no spaces around the slash
(e.g. "60.0T/200T", "80.5T/95.0T") instead of "60.0 TH/s / 200 TH/s". The
combined-cell encoder now builds from formatted parts rather than re-splitting
a joined string on " / ", so hashrate ("/") and count columns (" / ") each
keep their own separator.
- Chip temperature: new blue-to-red conditional scale (cool blue at/below 40 C
to hot red at/above 90 C); the Chip temp column is now a coloured cell.
- Multi-range scan input: each octet may be a range, so "10.1-9.1.1-255" expands
to the 9 /24s (cartesian per-octet parse). CIDR / full-range / short-range
forms are preserved.
- KPI header: every card is now a uniform size with its value + label centred.
- Right-click menu: "Fault light on/off" relabelled to "Flash lights on/off"
(the underlying asic-rs set_fault_light call is unchanged).
Tests updated for the new formats/counts; new unit tests for the 50%-100% ratio
scale, the blue-to-red temp scale, the parts-based combined encoder, and the
per-octet range parser. cargo check --release --tests is clean; CI runs the
release build + tests + headless self-test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
|
||
|
|
86e4761316 |
GUI round 7: code-review remediation (flash safety, unknown-actual colour, credentials, coverage)
Fixes the Critical/High findings from the round-6 review (6 parallel dimension reviewers + adversarial verify), plus the cheap high-value non-blocking ones. Full write-up in code-review-report.md. Firmware-flash safety (the one irreversible, hardware-destroying action): - Critical: re-triggering an action no longer races the previous one. A flash now takes an exclusive lock (new App.flashing): it will not start while any scan / refresh / config action is running, and none of those (nor another flash) start while it runs. begin_scan, start_action, start_refresh and apply_flash_confirm all gate on it, and the context menu offers only the read-only "Open in browser" while flashing. This removes the two overlapping- network-operation paths that could interrupt/corrupt an upload and brick a miner (old.stop() never joined the in-flight upload). - High: the flash confirm dialog now lists every target IP + model and warns loudly when the batch spans more than one model (a single image is rarely valid for all), instead of showing only a bare count. Correctness: - High: combined columns no longer paint the "-" placeholder solid red when the actual is unknown but the expected is known (an idle/paused/booting miner of a recognised model looked like a 0% catastrophic failure). fill_rows now gates the ratio on the actual being known; unknown-actual falls to the plain, uncoloured segment. Was masked by the all-zero-expected fixtures. - compute_kpis buckets by status() instead of re-deriving the precedence from raw flags (KPI header can no longer disagree with a row's status; offline folds into not_hashing). Security: - credentials file is created at 0600 up front (OpenOptions::mode) and re-tightened while still empty, so the plaintext password is never on disk under a looser mode (was create-0644 then chmod-0600). - the "Set scan credentials" dialog no longer pre-fills the saved password in plaintext; a blank Password field keeps the stored one. Robustness / API: - the fake-scan branches of the config-action / refresh / flash background threads now honour the cancel flag (were ignored, so stop() was a no-op). - MinerRow.online -> offline (default false = online), removing the footgun where a struct-update literal that forgot `online: true` read back offline. Tests (the review's primary focus -- these paths had zero coverage): - scan.rs fake_mode_background_actions: start_scan offline-row emission, start_refresh (Row/Failed/Done), start_firmware_flash_action, and that a cancelled run still terminates with Done rather than hanging. - model.rs: flash_confirmed (exact/case/prefix/whitespace), compute_kpis vs status() consistency, Default-is-online. - new ui::tests: ratio_color/fan_color/tint_toward stops+clamping+blends, and the combined-cell unknown-actual and cooling-cell encodings. - credentials.rs: configured_factory smoke (both branches) + pre-existing-0644 re-tighten. - self-test: offline row (.199) spot-check, KPI quick-filter toggle on/off, and a numeric (not lexical) IP-sort assertion via model::ip_to_u32. Deferred (non-blocking, tracked in code-review-report.md): start_* boilerplate extraction; per-model firmware image-compatibility check; scoping saved credentials to a chosen backend; a masked password field (needs a wx-rs TE_PASSWORD binding); flash-specific status text; a segment-encode microbench. Verified: cargo check --release --tests is clean; unit tests + benches + the headless self-test run in CI (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 |
||
|
|
b6afe08a5f |
GUI round 6: offline detection, combined columns, per-cell colours, paused status, credentials, refresh, firmware flash
Large round implemented via a research workflow (6 parallel readers) then a file-partitioned implementation workflow (model/scan/bridge/ui/fixtures), all to one shared contract. Table / model: - Offline recognition fix: the scan loop now emits a row for EVERY probed IP - non-responders become an "offline" row (new MinerRow.online flag + MinerRow::offline()), so unreachable miners show up (offline, red) instead of vanishing. Previously only responders got a row. - Not-hashing rows are now RED (were grey); offline also red. - New "paused" status (operating_state contains "pause" while not mining): its own blue row colour, a blue "Paused" KPI card, and a Kpis.paused count. - Combined actual/expected columns: Hashrate, Hashboards and TotalChips fold their separate Expected* columns into one "actual / expected" cell; the actual is drawn on a smooth red->amber->green scale by ratio (100% = green), the expected in plain text, the slash black. num_value is carved out so a numeric filter never matches a row that only has an expected value. - Fan column shows every fan's RPM as "rpm/rpm/rpm" (max 3 sig digits, SI-style), each fan coloured on its own grey->blue speed scale, slashes black. - These four columns render via a new wxDataViewCustomRenderer (SegmentRenderer) that draws colour runs from a \x1f/\x1e-encoded value; every other column keeps the stock renderer and per-row status colour. Interaction: - KPI quick-filter: clicking the Hashing / Slow / Not hashing / Paused card filters the table to that status (composed with any column filters) and highlights the active card; clicking again clears it. - Removed "Select all" / "Clear selection" from the right-click menu. - Right-click "Refresh": re-polls the selected miners (asic-rs scan_miner) on a background thread and upserts the rows, without a full network scan. - "Set scan credentials..." button (top-right): stores a username/password (~/.config/alkane-toolkit/scan-credentials.txt, 0600) that is fanned out to every asic-rs firmware backend via with_firmware_discovery_auth, so scans and all right-click actions authenticate. Applied through a new credentials::configured_factory() used everywhere MinerFactory::new() was. - "Flash firmware..." (right-click): asic-rs UpgradeFirmware for the backends that support it (stock Antminer + EPIC; every other backend declines and is reported as unsupported). File picker (new wxFileDialog binding) + a typed "FLASH" confirmation; one miner at a time; cancel only between miners. - Responsive layout: the KPI and controls rows use wxWrapSizer so they reflow when narrow; the min window size drops from 1200x720 to 640x480. Bridge (wx-rs): SegmentRenderer + dvlc_append_colored_col, wrap_sizer, bind_click (clickable KPI cards), file_dialog; dropped a vestigial gtk.h include. Patches 0002/0003 regenerated + round-trip validated. Portability note: every widget is a stock, natively-backed wxWidgets control (ports to wxMSW/wxOSX); wxDataViewCtrl is native on Linux/macOS and wx's own generic (still-correct) drawing on Windows. Verified: cargo check --release --tests is clean; the release build + tests + headless self-test run in CI. (Local release link is OOM-blocked on this desktop; CI is the authoritative build.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
eb08a9ef97 |
GUI: per-miner capabilities + live config write path (right-click actions)
Completes the right-click config menu (round-2 item 11): the menu now offers real actions computed from the intersection of what every selected miner supports, and applies them to the fleet over the network. - Capability detection: to_row probes each miner's asic-rs supports_* methods (fault light, restart, pause, resume, power limit, tuning) at scan time and stores them in MinerRow.caps -- no extra network round-trip. - Intersection: MinerCaps::intersect_all yields the actions common to the whole selection; the context menu offers only those (a mixed mining + idle selection shows just fault light + restart; an all-mining selection shows everything). - Write path: scan::start_config_action runs on a background thread -- it re-discovers each selected miner with asic-rs scan_miner(ip), applies the setter, and reports per-IP results that drain into the status bar (running progress while applying, a pass/fail summary when done). Cancellable, and a new action cancels any in-flight one so two never overlap. In fake-scan mode it simulates success so the flow is exercisable offline. - Actions: fault light on/off, pause, resume, restart apply immediately; set power limit and set tuning % open a small value-prompt dialog first. Factory reset, change password, and firmware upgrade are deliberately not exposed in a casual right-click. Adds the `measurements` dependency (already in the lock, transitive via asic-rs) for Power::from_watts. Review fixes (one review pass): - Restart / pause / resume now require a confirmation dialog (naming the count) so a misclick can't stop a producing fleet; fault light stays instant, and power/tuning are confirmed by their value entry. - The action result is held on the status bar for a few ticks so a fleet action's outcome (including failures) isn't clobbered by the next timer tick. - The action loop uses a current-thread tokio runtime (it applies to one miner at a time; a worker pool was wasted). - The value prompt validates before closing: a bad value keeps the dialog and the captured selection so it can be corrected. - The menu's "(N)" counts use the rows-backed selection, matching what is actually acted on. Verified off-screen: capability intersection (mixed vs all-mining selections), the value-prompt and confirmation nested modals (menu -> dialog) with no crash, the end-to-end apply flow, 46 unit tests (incl. a caps-intersection test), and the headless self-test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
8e9c5e7105 |
GUI + CI: code-review-harness fixes, expanded tests, version-logic tests
Ran the code-review-harness (four parallel reviewers: correctness, reliability, performance, test-coverage) over the GUI crate and fixed every Critical/High finding, plus grew the test + microbenchmark suite that gates the pipeline. Correctness / reliability fixes: - IP column sorted lexically, not numerically. The default view is IP-ascending but Column::Ip fell through to the generic lowercase-string sort key, so 10.255.1.10 sorted before 10.255.1.2 on every launch. Add a numeric IP sort key (u32, exact in f64) and switch view() to decorate-sort-undecorate so a sort key is computed once per row, not twice per comparison. - Scans had no cancellation. Stop/Apply/Play only dropped the receiver, leaving the background thread probing dead hosts (each waits out an asic-rs timeout), and Play could spawn a second concurrent scan + tokio runtime. Add a ScanHandle with an Arc<AtomicBool> cancel flag the loop checks each iteration, a begin_scan() helper that stops the in-flight scan before starting a new one, and Stop now signals cancellation. - Native column drag never rebuilt the control: column_reordered mutated view.order but skipped rebuild_table(), so the store's creation order diverged from display_columns() and cells rendered under the wrong headers on the next scan tick. Rebuild after applying the reorder. - format_si rounding rolled a mantissa up to "1000" without advancing the SI prefix (999.9 W -> "1000 W", a 4-digit result). Round first, then roll over; [99.95,100) drops its decimal. - start_scan used .expect() on thread spawn, which would panic across the wx FFI boundary; it now sends ScanMsg::Failed and returns the handle. Tests / benchmarks (the pipeline's regression gate): - Unit tests 24 -> 41: format_si/format_uptime boundaries, numeric IP sort, upsert-new-IP, Light three-state + pool-slot-out-of-range cells, filter AND/OR, reorder non-permutation guard; scan.rs parse_cidr/prefix_mask, single-host /32, empty/whitespace, short-range single/reversed, parse_targets aggregate cap + error propagation, validate_ranges, targets_to_cidrs non-contiguous, auto-rescan-secs round-trip. - Microbenchmarks 2 -> 9: view default-sort, sort-by-each-column, filtered view, upsert cold-start, parse_line near MAX_ADDRS, parse_targets many ranges, targets_to_cidrs large range. Floors are 5-10x above local numbers. - New ci/test-compute-version.sh: 9 cases for the X.Y.Z logic (first release, pre-bumped X, backend/UI bumps, docs-only no-op, major-wins-over-UI, backend-wins-over-UI, nested ci/ and thirdparty/wx-rs paths). Wired in as a fast-fail CI step. CI: install libssl-dev + pkg-config (openssl-sys); add xauth so the headless self-test actually launches under xvfb (was aborting on "xauth not found"). Deferred (documented in code-review-report.md, guarded by benches): Cow cells, an ip->index map for upsert. Local: 41 tests + 9 benches + 9 shell tests green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
6955b1e3e3 |
GUI round 2: selection, scan loop, column management, dark-mode fix
- Fixed "Scan ranges" button label (no longer grows with the range list). - Dark-mode KPI cards: derive colours from the live system theme luminance instead of is_dark(), which mis-detected some GTK dark themes. - Removed the checkbox column; the table is multi-select (wxDV_MULTIPLE, ctrl/shift-click), with the selection tracked by IP so it survives refreshes. - Replaced Rescan with Play / Pause / Stop; added an editable auto-rescan interval (scan-ranges dialog; ~/.config/alkane-toolkit/auto-rescan-secs.txt) with a timer-driven countdown scheduler. - Status bar shows the last-probed IP during a scan and a countdown to the next scan when idle (dropped the "scan complete" text). - Default sort is IP-ascending with a header chevron; IP is column 0, sortable. - Choose-columns dialog is a wxRearrangeCtrl (check to show; up/down or drag to reorder) exposing every metric, including Pool 1/2/3 URL + worker. - Column drag-reorder moves the whole column with its data on drop. - Row separator lines (wxDV_ROW_LINES). GTK3 native has no zebra striping; a GTK4-forward zebra-CSS hook and pkg-config gtk cflags are in place. Scan engine: parse each configured pool's (url, worker); Progress carries the last-probed IP. Model: Column::Sel removed; Pool1/2/3 columns; default IP sort. wx-rs bridge: multi-select + selection/context-menu events + get_selections, alternating-row + zebra-CSS hooks, in-place column title, rearrangeable list, and popup-menu primitives (for the upcoming right-click config menu). Patches 0001-0003 regenerated and round-trip validated. Review fixes: scan loop no longer sticks "scanning" if a thread ends without Done (channel-disconnect handling + Stop force-reset); Play no longer starts a second scan; stale selections pruned on rescan; column apply order/visibility applied atomically. Verified: 22 unit tests, a 14-check headless UI self-test, and interaction checks (multi-select, column rearrange/drag, play/pause/stop, dark mode). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
d88df603ba |
Fix GUI layout/crash bugs; add operator features, tests, and dev loop
Round 1 (bug fixes + test harness): - Fix table rendering in the top-left corner: the dvlc was never added to the sizer; add it (proportion 1) and re-run layout; drop the space-eating stretch. - Fix abort on dialog buttons: the dialog root sizers passed ALIGN_CENTRE_VERTICAL to a vertical sizer, tripping a wx consistency assert whose handler pumps a nested event loop, re-entering dispatch while it held the App RefCell borrow. Remove the invalid flags; split dispatch into two phases with try_borrow_mut. - Fix header-click sort mapping when columns are hidden (use display_columns); drag-reorder splices back into the full order without dropping hidden columns. - Add offline fixtures + ALKANE_FAKE_SCAN and ALKANE_SELFTEST modes; scripts ui-selftest.sh and ui-screenshot.sh; AGENTS.md documents the dev loop. Round 2 (operator requests): - Redesigned color-coded KPI cards; light/dark mode follows the system theme. - SI-formatted hashrate/power on the KPIs and columns (685 TH/s, 21.3 kW). - Scan ranges accept CIDR, single IP, and A.B.C.D-E.F.G.H / A.B.C.D-N ranges; oversized ranges (> 1,000,000 addresses) are rejected. - Scan progress bar over the table + status-bar text; out-of-range miners are dropped when a scan starts. - Columns panel exposes every scannable MinerData metric (All / None / Defaults). - Excel-style filter panel: per-category value checklists, per-column All/None, Apply / Reset / Cancel, blank handling. - Sort direction marker in the header (updated in place); double-click a row opens the miner in the default browser. wx-rs: extend the widget bridge (gauge, in-place column title, sort indicator, browser launch, system appearance/colours, widget colours, item-activated); patches 0002/0003 regenerated and round-trip validated. Verified: 22 unit tests + a 13-check headless UI self-test, plus a live scan against the bench fleet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
fcc70c04f6 | M1 primary view: wx-rs patched+extended (Linux/GTK3 build, widget bridge), vendored wx 3.3.3 + asic-rs in thirdparty/, UI-SPEC table+KPIs+dialogs, build scripts |