The install dialog gains a "Release repo (owner/repo)" field (default
blueflare/alkane-os) and a Reload button. Releases are scanned from the chosen
repo via ReleaseSource::for_repo and filtered to those with an .afw compatible
with the target board (ReleaseInfo::is_compatible_with). Verified under a
virtual display: the picker populates with the alkane-os release unauthenticated
now that the repo is public, and the repo field + Reload render.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Stock->alkane re-scan flicker: after a successful install the just-installed
boards are held in a "verifying alkane..." state and a stock re-scan row is
suppressed until the board answers as alkane, with a bounded give-up window.
Fixes the board re-scanning as stock before finally showing alkane.
Flash-plan checklist: picking a local .afw in the install dialog now detects
the flash tier and shows a [x]/[ ] checklist of what it overwrites (U-Boot /
Kernel / Userspace), read from the bundle manifest. Verified end-to-end under
a virtual display: a zynq-7010 .afw shows tier 2, U-Boot preserved, kernel and
userspace written.
Backend helpers (alkane-artifacts, additive, unit-tested):
- AfwManifest::flash_plan() -> FlashPlan { tier, writes_uboot, writes_kernel,
writes_userspace }.
- ReleaseSource::for_repo(owner, repo) and ReleaseInfo::compatible_boards /
is_compatible_with, for the upcoming any-repo picker with board-compat
detection.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Issue #41: installing alkane OS and restoring to stock no longer require
typing FLASH. The dialog, the board list and the Install/Restore button are
the confirmation; the destructive-action warning stays visible. Removes the
now-unused confirm inputs from the install and uninstall dialogs.
Report relay: raise RATE_PER_IP 5 -> 100 and RATE_GLOBAL 60 -> 300 so bench
testing can file more reports without hitting the hourly cap. Applied live on
the Gitea host and recorded here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Addresses the bench bug reports filed from the toolkit (issues #37, #38, #39)
and the request for a local-file install source.
Install (issue #38): the install never reached the worker in the reported
case and aborts were only a status-bar line, so the operator saw nothing.
Abort reasons (missing FLASH keyword, no release/asset, no target) now raise
the visible error indicator and keep the dialog open; the actual per-board
failure detail is surfaced and logged instead of a bare count; a clear
"installing..." line and log entry mark the start.
Install source (requested): the install dialog gains a "Browse local .afw"
button beside the Gitea release picker, in the same window. A chosen file
takes precedence over the selected release. start_install takes an AfwSource
(Release or Local); a local file is used in place, a release is downloaded as
before. This brings the CLI's local-file install to the GUI.
Scan icons (issue #39): a hashboard the firmware lists with no active flag and
no working-chip count now reads grey (not detected) instead of green, and the
PSU bolt greens only on real delivery evidence (watts, PSU fan, or PSU output)
-- is_mining counts only when the miner is actually hashing. A stock S17
control board with no PSU or hashboards attached asserts a cgminer mining
status at zero watts, which previously showed green board and PSU icons.
Confirmed against the bench S17 at 10.255.1.111 (reports watts=0). Regression
tests added for both.
Bug report (issue #37): the report box word-wraps instead of running off the
edge (new wx text_ctrl_wrapped without wxTE_DONTWRAP). Sub-window movability
is window-manager behaviour (the dialog already has a caption and resize
border) and is not changed here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The fleet scan (asic-rs) recognises miners by their cgminer socket or vendor
web UI. A board running Alkane OS exposes neither, so it never appeared and
could not be right-clicked; the periodic refresh also marked it offline.
- alkane_detect: probe addresses asic-rs does not identify over HTTP:
GET /api/identity (alkane-os 0.1.2+: os, version, board, MAC, hostname),
falling back to /api/summary's "alkane-os" STATUS for older images. Used by
the scan and the refresh. Rows show Firmware "Alkane" with the version, MAC,
hostname and control board (XIL (C49) for zynq-7010).
- Context menu: "Install alkane OS..." only for a supported board (control
board alkane-os has an image for; a stock Antminer on XIL (C49), or by model
S17/S17 Pro/T17 when the stock miner software is down and reports no board)
that is not running Alkane; "Update alkane OS..." for a supported board
already running it (same dialog, updated in place); "Uninstall alkane OS"
only for boards running Alkane. Mixed selections get neither install nor
update.
- Docs updated.
Verified live on the bench S17: running Alkane -> found as Alkane 0.1.2,
XIL (C49), update + uninstall offered; restored to stock -> found as Antminer
S17 Stock, install offered. Unit tests for the probe parsing and the menu
rules; an ignored live scan test (ALKANE_TEST_SCAN_RANGE).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
main's verify gate runs cargo fmt --check on the first-party crates; next's
gate does not, so the afw/stock feature work reached next unformatted. Pure
cargo fmt output. clippy -D warnings (workspace and GUI) and all tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The kernel device tree is never in Bitmain's distributable firmware: all OTA
packages ship none, and the SD recovery image preserves the factory dtb rather
than writing one. The device tree I was taking from the SD recovery package was
its SD-boot dtb (a different partition layout), which does not match the genuine
rootfs and reboot-loops the board.
Fix: restore now takes only the genuine kernel + rootfs from the vendor package
(RestoreImages drops the dtb field), and the method supplies the correct
per-board device tree itself (fetched + verified from the public assets repo, the
same way the NAND-exposing helper is fetched). This pairs genuine kernel/rootfs
with the factory dtb that matches their partition layout. Any genuine package now
works (an OTA .tar.gz as well as an SD .zip), since the package's own dtb is no
longer needed.
cli/gui: --stock-firmware / the uninstall dialog no longer require a package with
a device tree. docs updated.
NOTE: not yet hardware-verified - the bench S17 is mid-recovery (serial-link
hardware issue) and must be brought back before this can be proven on the board.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Restore-to-stock now writes the genuine Bitmain stock images (parsed from a
vendor firmware package) back to NAND, instead of carrying carved stock blobs.
- stock_firmware: new parser for genuine Bitmain Antminer packages - the OTA
update .tar.gz (outer sign wrapper -> inner fw.tar.gz) and the SD recovery
.zip. Extracts BOOT.bin / devicetree.dtb / uImage (kernel) / uramdisk (rootfs)
and verifies the rootfs md5 when the package lists one. Shells out to the
system tar/unzip. Verified against real S17 packages.
- stock: restore_to_stock now takes the stock images (RestoreImages); the stock
kernel/dtb/rootfs are no longer carried as assets. The boot regions are not
exposed to Linux on alkane, so the existing NAND-registration helper is kept to
make them writable, then the supplied genuine images are written at the vendor
offsets (dtb 0x1a00000, kernel 0x2000000, rootfs; BOOT.bin preserved).
- The SD recovery image is the complete source: it includes the device tree,
which the stock legacy-uImage kernel needs at 0x1a00000 and which the OTA
update packages omit. Restore requires it and points the user to the SD image
when a package has no dtb.
- Post-reboot the board returns to stock under its stock MAC and typically takes
a new DHCP lease, so a wait on the original address is best-effort and no longer
reported as a failure.
- cli: afw restore-stock takes --stock-firmware <file>. gui: the uninstall dialog
takes the firmware file path.
Also clear the branch's clippy debt so the full gate passes: a type alias/allow
for the hardware map tables and multi-arg write functions, plus small mechanical
fixes (useless format, op-ref, collapsible match). wx-rs patch 0011 records the
wxWidgets 3.2 build-compat edits.
Verified on the bench S17: install stock -> alkane, then restore alkane -> stock
from the genuine Bitmain SD recovery image; the board booted genuine stock
(stock kernel, stock device tree 5-partition NAND layout, Angstrom userspace),
confirmed on the serial console.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Wire the GUI to the toolkit's own compiled-in, network-only stock<->alkane engine
(alkane-flash::stock) and the .afw fetch/verify (alkane-artifacts), so a scanned
control board can be right-clicked to:
- Install alkane OS (from stock): scans alkane-os releases on Gitea, picks one
(newest first; pre-releases marked), downloads+verifies the .afw, and installs
it onto each selected board over the network. Optional board password and an
allow-unsigned (bench) toggle; typed FLASH confirmation.
- Uninstall alkane OS (restore to stock): restores each selected board to
genuine stock over the network, with the board's alkane root credential and a
typed FLASH confirmation.
Both run on a background thread (stock_ops.rs), streaming progress/results to the
status bar, and share the exclusivity guards so they never race a scan/flash/
restore. These use the same engine the CLI drives; the GUI's older asic-rs
firmware-upload path stays disabled.
alkane-artifacts: add list_releases + fetch_afw_url for the release picker, and an
optional build-time embedded read-only token (option_env!("ALKANE_EMBEDDED_TOKEN"))
so a distributed GUI can scan the private alkane-os releases with no setup; the
env token still wins, and no secret is in the source tree.
wx-rs (vendored, patched): build on system wxWidgets 3.2 - guard the 3.3-only
wxApp::SetAppearance/Appearance behind wxCHECK_VERSION(3,3,0), and emit GTK's own
shared libs (pkg-config --libs gtk+-3.0) at link time since the widget bridge
calls GTK directly. Enables the Linux GUI release build.
docs/install.md: document the GUI actions and that the stock-assets repo is now
public (no token for install/restore; only release scanning needs one).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The play/pause icons on macOS light buttons were about 2.6:1, because
native macOS buttons paint #ebebeb on a white window, not the system
button-face colour the check used. Check the icons against the button
face, the window colour and a shade 20 steps toward the opposite end.
They now measure 3.1:1 on the Mac (light and dark checked in real
system appearance), and stay above 3:1 on Linux and Windows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBRg6YCM1XXQCTnD5GF
Checked in real system dark and light mode on macOS (SkyLight theme
switch on the M1, restored afterwards), Windows 11 (the app-mode
setting, run on the VM's desktop) and Linux (Adwaita and Adwaita:dark),
measuring each screenshot's text against its background with the WCAG
contrast formula.
The app's own colours fell short on every platform. The fixed firmware
hues were 2.6 to 3.9:1 (LuxOS gold and ePIC blue on light, Alkane navy,
Braiins purple and Bixbit red on dark). The hashrate greens and
temperature purples were about 4:1, and the play/pause icons about 2:1
on light buttons.
- readable()/readable_at(): nudge a colour toward black (light theme)
or white (dark theme), keeping its hue, until it reaches 4.5:1 for
text (3:1 for icons) against every given background.
- palette(): green/amber/red/accent/label are made readable against the
window, the zebra row and the KPI card; Palette::text() guards every
computed cell colour (ratio and temperature blends, firmware hues).
- Media button icons: at least 3:1 against the theme's button face.
- macOS snapshot (wx-rs patch 0011): capture the window's frame view.
The content view alone left unpainted areas transparent, which read
as a white toolbar strip in dark mode. On screen the area was always
the dark window colour.
After the change, no app-coloured text is below 4.5:1 in any of the
six theme/platform combinations. What the checker still flags is theme
chrome (grid lines, GTK header labels, button outlines, the zoom
slider) and anti-aliasing on thin fonts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBRg6YCM1XXQCTnD5GF
A Bug report button between Export and Settings opens a dialog: a type
(Bug, UI change, Feature request), one text box whose first line
becomes the issue title, and "Include the recent activity log
(passwords removed)", ticked by default. Send posts the report to the
report relay (next commit), which files it as an issue in
blueflare/alkane-toolkit. The dialog then shows the issue number, and
Open issue opens it, or shows why the report was not sent with the text
kept.
The app holds no token. A report carries the app version, platform, OS
version, appearance, language and window size, plus the newest 80 log
lines (at most 16 KiB). Before the log leaves the machine,
bug_report::scrub removes values of password/token/secret-like names,
Authorization and Cookie headers, URL passwords and PEM private keys.
The request goes through the system curl, as the other HTTP actions
do. ALKANE_REPORT_URL overrides the relay address for testing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBRg6YCM1XXQCTnD5GF
- Credentials dialog: new "SSH (restore)" row for the control-board SSH
login used by the Braiins restore-to-stock. The username defaults to
root; the password is masked and never re-displayed, and a blank
password keeps the saved one. Reset to defaults also clears it.
ssh-credentials.txt no longer has to be written by hand.
- Default scan range is now 192.168.1.1/24 (scans 192.168.1.0/24), and
the range dialog's examples use that subnet.
- Windows version info, zip README, LICENSE and docs name the publisher
as on the signing certificate: BlueFlare Energy Solutions Inc.
- Manual updated for all three.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Hashrate cell: a readable 0 hashrate now shows "0.00T" instead of a dash. The
dash is reserved for an unreadable/absent hashrate. New MinerRow.hashrate_known
records whether the miner reported a value; combined_si/num_value key off it,
and scan/fixtures set it from data.hashrate.is_some().
- Paused-miner Health icons: the control board (brain) and PSU keep their true
health (green when fine) instead of turning blue; fans turn blue only when
actually stopped (0 RPM) and stay green while spinning; hashboards stay blue
while paused (idle is the expected state).
- VNish per-hashboard faults: DataField::Messages now also reads the summary
chains (chip_statuses red/orange + per-chain state) and emits one message per
faulted board, attributed to MinerComponent::HashBoard{idx}, so the Health
column reds the specific board and its tooltip carries the fault instead of it
landing on the brain. Applied to v1_2_0 and v1_3_0. patch 0032.
Verified live: VNish 10.7.1.25 -> "Hashboard 2: 1 degraded chip(s)" on board idx
1; healthy 10.7.1.122 -> no messages. 93 unit tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
A miner an operator has stopped (e.g. 10.4.1.122, VNish miner_state "stopped" ->
OperatingState::Stopped) was read as broken: red hashboards and counted under "not
hashing" instead of "Paused".
Two causes:
1. is_paused() only matched the literal "pause" substring, so "Stopped"/"Stopping"/
"Suspended" -- every other firmware's word for an intentional, resumable halt --
fell through to not-paused. Now matches pause/stop/suspend (Error stays broken).
2. encode_component_health applied the paused-blue treatment to hashboards only
(round 19 #19), so a paused miner's idle fans/power still rendered red. A stopped
miner's off components are expected, not faults: colour every reported component
blue when paused (an undetected/Unreachable one still stays grey -- "not present"
is not "paused").
Verified live against 10.4.1.122 on a headless build: the row now shows all-blue
health (power grey, honestly unreachable) and counts under the Paused KPI, where it
previously showed red boards + "not hashing".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Health column (operator-reported): give every component-health icon a UNIFORM
fixed-width slot in the SegmentRenderer (GetSize + DrawShape), so power/control/
fan/board icons line up in fixed columns across rows regardless of glyph aspect,
and left-align the icon columns (Health/Access/Light) so the block anchors at a
consistent left edge. The per-icon tooltip hit-test uses the same uniform slot.
Code-review-harness fixes:
- High: isolate per-miner telemetry with catch_unwind so one miner's get_data
panic can't abort the whole scan (and strand the fast-path partial rows).
- Medium: fill the zebra stripe across the full cell for right-aligned colored
columns (was anchored at the content's left edge, leaving the left unstriped).
- Medium: lower the scan-concurrency ceiling 512 -> 256 (128 is fully reliable,
192 already dropped responders on the live fleet).
- Medium: board voltage/frequency sort key skips placeholder-zero boards
(avg_positive), matching how the cell renders them as "-".
- Low: saturating_add for accepted/rejected share sums; moved an orphaned doc
comment; corrected a stale comment.
CI: fix the README-badge push-back -- `git push -c http.extraheader` is invalid
(`-c` must precede the subcommand), so the badge/coverage/bench-baseline commit
never actually reached main; now `git -c http.extraheader=... push`. This also
lets the bench-delta baseline persist so the delta can compute.
Demo: the offline-demo paused miner now has detected (idle) hashboards so the
paused-blue Health icons (round 19 #19) are exercised.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Table/columns:
- Fix the "columns shrink to tiny" bug on language change / add / hide (#3, #24):
the rebuild-time capped autosize read column widths before GTK's measurement
landed. Columns keep their default widths; autosize is on-demand only.
- Right-align every column except IP (#21): new alignment param on the bridge
append calls; the SegmentRenderer and the tooltip hit-test honour it.
- "Auto-size all columns" header menu item; Ctrl+A selects all rows (#4).
- Remove the Boards (dots) column (#7).
- Split the slash-joined Fan column into per-fan columns Fan 1-4 (#8).
- Efficiency: unit moved into the value and made algorithm-aware (J/TH for
SHA256 families, J/kSol for Equihash), fixing the blank/garbage figure on
non-SHA256 miners (#9, #23).
- Pool account column before Worker by default (#22).
Scan:
- Fast scan (#18): emit a lightweight identity row the instant a miner is
identified, then upsert the full telemetry row when get_data completes.
- User-adjustable scan concurrency with a bounded max (#25).
- Surface more scanned values as columns (#10): current tuning target, accepted
/ rejected shares + reject %, and per-hashboard hashrate / voltage / frequency.
Logs (#11-16): fetch the miner log through asic-rs's per-backend read_logs()
instead of the narrow curl paths, fixing Braiins / LuxOS / Z15 / BixBit / stock
Antminer; WhatsMiner keeps the fault-code fallback (no API log). Removed the
summary tidbits from the log viewer (#13).
Misc: fix per-icon health tooltips (advance math matched to the renderer) (#2);
paused miners show blue hashboard icons, healthy stays green (#19); state-aware
Pause/Resume in the right-click menu (#20); export opens a column-picker dialog
(#6) and the default filename carries a UTC timestamp (#5); the scan status bar
says "Scan Paused" / "Scan Stopped" and no longer overwrites Stop with paused
(#17); the bench badge shows the weighted-average microbench delta vs the
previous release (#1).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Fifth (final) review round; this clears its functional findings:
- HIGH config actions / pool writes could run concurrently with a live scan
(start_action / apply_pools guarded flash + restore but not scanning); added
the self.scanning guard, and begin_scan now defers while an action/restore runs,
closing the race symmetrically.
- HIGH blanking a per-firmware credential row saved a live ("","") override that
then broke that firmware's auth fleet-wide; a fully-blank row now clears the
override (use the shipped default).
- HIGH a ChangePassword action never updated the toolkit's own saved credentials,
so after a fleet-wide change it locked itself out; on full success it now updates
the saved global password (and on a partial change logs a reconcile note rather
than guessing).
- HIGH/perf fill_rows re-rated: a scan's streaming rows triggered a whole-table
refill on every fast tick. New rows_dirty latch flushes the refill at most once
per second during a scan (immediately once it ends).
- MED an indeterminate access-probe result no longer blanks a miner's already-known
locked/unlocked state.
- LOW compute-version.sh header doc corrected to match the broadened rule;
release.yml sets WX_RS_WXCONFIG once at job level instead of per step.
Accepted (documented) perf items that remain: per-render health recompute and
per-column cell-string allocation (small, fleet-scale), the linear upsert scan,
and synchronous scan-range parsing (bounded by the range caps).
99 tests + clippy-clean + selftest green. This was review round 5 (the harness's
iteration cap); every confirmed critical/high across all five rounds is fixed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Fourth review round found further issues, two being gaps in earlier fixes; this
clears the actionable ones:
- HIGH board_healths() painted a genuinely-undetected board RED when a fault text
also named it (e.g. "chain 2 not found" -> Board(2)); an undetected board now
stays grey, matching the documented grey-vs-red invariant. Regression-tested.
- HIGH the Change-password prompt used an unmasked field (the Credentials dialog
was masked in wave 1 but this prompt was missed) -> masked for PromptKind::Password.
- MED the WhatsMiner access probe aborted all remaining password candidates on one
transient error -> transient errors now skip to the next candidate and never
report a confident "locked" when the answer was really indeterminate.
- MED config actions / refresh / pools / flash ignored the operator's configured
scan timeout (used asic-rs's 10s default) -> configured_factory now applies it,
so a slow-link action reaches the same miners a longer-timeout scan found.
- MED the auto-rescan loop set a bogus "scanning..." status even when the scan was
deferred (mid-flash) -> begin_scan reports whether it started.
- LOW is_aml_140mm matched every S21, not just the S21 Pro its doc names -> fixed.
- Offline fixtures now reuse scan::infer_pic instead of a diverging copy.
Accepted (documented) from this round: miner_probe's argv secrets (diagnostic CLI),
the rebuild_table/update_headers sort-marker duplication, the LuxOS substring
success check (command-specific reply), restore/flash target snapshot (dialogs are
modal), non-cancellable restore/probe batches, Braiins host-key (LAN reflash), and
the perf items (per-tick refill, health recompute, linear upsert, cell formatting).
99 tests + clippy-clean + selftest green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
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
Clears the rest of the second review round's confirmed findings:
- HIGH the Boards numeric filter compared the composite sort score (online*100+
total) instead of the board count, so a filter like "Boards <= 3" matched
nothing on healthy 3-board miners. num_value now returns the detected count;
regression-tested with per-board health present (the path the old test missed).
- HIGH the WhatsMiner access probe ignored the operator's saved scan password
(tried only admin/super), mis-reporting writable miners as locked. It now tries
the caller's password first.
- HIGH firmware flash and config actions were not blocked during a restore-to-
stock; start_action and both flash guards now refuse while a restore runs.
- MED log tail() could panic slicing at a non-UTF8 char boundary -> nudge to a
boundary first (regression-tested).
- MED board_index_from_text grabbed an unrelated number far past the keyword
(e.g. a temperature) -> only accept a number immediately after the keyword.
- MED a restore worker-thread spawn failure wedged the restore subsystem forever
-> emit Done on spawn failure and treat a disconnected channel as done.
- MED LuxOS restore reported failure when the miner rebooted mid-reply -> an empty
reply or dropped connection after a successful logon is the expected reboot.
- MED two tests raced on the process-global $HOME -> a shared serialization lock.
- LOW CSV export now neutralizes spreadsheet formula-injection prefixes on
miner-supplied fields.
- Made miner_probe's global-only credential resolution explicit (it can't share
the GUI's per-firmware configured_factory across the bin boundary).
99 tests (+3 regression tests) + clippy-clean + selftest green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Second review round (over the wave 1/2 fixes) surfaced further, mostly new-path
findings; this clears the substantive ones:
- HIGH log_scan.rs passed miner admin credentials on the curl command line (same
class as the access-probe leak fixed in wave 1). Its curl() now takes optional
stdin: the Antminer digest login goes through a curl config on stdin (-K -),
the VNish unlock password through the POST body on stdin (-d @-), and the
timeout path reaps the child so it no longer leaks a zombie.
- MEDIUM JSON injection/breakage: the VNish unlock body and the LuxOS
uninstall command spliced a password / miner-supplied SessionID into JSON with
format!. Both now build the JSON with serde_json, which escapes correctly.
- MEDIUM column scan cost: fill_rows computed table_columns() twice (my wave-2
built_columns check added one), and with auto-hide-empty on that scans every
cell of every row each time. It is now computed once and reused.
Accepted, documented tradeoffs from this round: miner_probe's setpools takes the
pool password as a CLI arg (inherent to a diagnostic CLI; it is the low-sensitivity
mining worker password), MinerRow::upsert_into's linear scan is fine at the tool's
fleet scale (hundreds), and bulk config-action writes stay serial deliberately.
96 tests + clippy-clean + selftest green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Continuing the recursive review's confirmed findings:
- HIGH scan telemetry was serial: the consumer awaited each responder's to_row
(get_data + presets, several REST calls) inline in the identification stream
loop, so telemetry ran one miner at a time. Now buffer_unordered runs it
concurrently up to SCAN_CONCURRENCY_LIMIT; identification (which buffers
internally) is unaffected, and telemetry only hits live responders.
- HIGH table columns diverged from the built widget with auto-hide-empty on:
(1) drag-reorder was silently rejected because column_reordered fed
table_columns() (empty-filtered) to apply_visible_reorder, which compared it to
display_columns() (unfiltered) -- apply_visible_reorder now reorders the shown
subset in place; (2) a column flipping non-empty mid-scan left the widget stale,
so fill_rows now rebuilds when the shown set no longer matches built_columns.
Both covered by a new unit test.
- HIGH viewing a miner's log blocked the wx UI thread for up to ~20s. The fetch
now runs on a background thread; the viewer opens from the tick drain when the
result lands (tick returns the dialog for dispatch to show modally).
- LOW start_pools_action's fake branch now honours the cancel flag like its
siblings.
- Documented the intentional tradeoffs the review flagged: scan-restart uses
cooperative cancellation (a hard join would freeze the UI), and the aftermarket
re-probe stays per-scan for freshness (firmware can change between scans).
96 tests (+subset-reorder) + clippy-clean + selftest green.
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 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
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
Columns previously always opened at generous fixed defaults, wasting
horizontal space. Now, the first time the table is populated after a
(re)build, each column is sized to the smaller of its content-fit width
(wxCOL_WIDTH_AUTOSIZE, floored at 24px) and its configured default (the
cap). Done once per rebuild via a new columns_autosized latch, so a
user's later manual resize is preserved -- scan-update refills skip it.
New bridge: wxbr_dvlc_autosize_col_capped (SetWidth AUTOSIZE, read back,
floor, clamp to cap, SetWidth) + Widget::dvlc_autosize_col_capped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
- #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
- #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
- #1 The control-board (brain) Health icon is drawn at 82% in its full slot, like
the fan, so it no longer reads oversized (slot advance + tooltip hit-test unchanged).
- #9 The right-click menu now shows a single state-based light toggle: "Stop
flashing lights" when any selected miner's locate light is on, else "Flash lights".
- #11 The PIC column is blank for every unknown case (non-Antminer makes and
unclassifiable Antminer models) -- no more "?".
SELFTEST PASS; pic test updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
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
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
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
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
- #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
Add a Settings menu (the old Credentials toolbar button is now "Settings")
containing Credentials, a Language sub-menu, and a Logs page.
Localization (#13): a small i18n layer -- visible strings are wrapped in
t("English") and looked up per language, falling back to English. Built-in
translations for Mandarin, Russian, French, Spanish and Portuguese cover the
toolbar buttons, KPI captions and table column headers; changing the language
re-labels them live (columns via a table rebuild) and localizes dialogs as
they open. The choice persists under the config dir and loads at startup.
(Dialog-internal strings and status text are not yet fully translated -- the
framework is in place to extend them.)
Logs page (#13): an in-app activity log (scans, operations applied, export,
language change) shown in Settings > Logs with Refresh / Clear.
New wx-rs bridge: menu sub-menus (menu_append_submenu). Bridge patches
0002/0003 regenerated. Unit tests + headless selftest pass; the Chinese UI
was verified rendering end to end.
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
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
Five items from the round-13 list:
#4/#5 Z15 hashrate / unknown algorithm: a Z15J reports its model as
"ANTMINER Z15J", which asic-rs' alias table did not recognise, so it
deserialised to Unknown and its Sol/s hashrate was left un-bucketed as
"unknown hashrate". Add a first-class Z15J model (Equihash) in the makes
crate, plus a family-letter fallback in the v2020 backend so other
un-tabled Antminer models still resolve an algorithm (Z->Equihash,
L->Scrypt, S/T->SHA-256; ambiguous K/DR stay Unknown). Live-verified on
the Z15/Z15J fleet. Carried as vendored patch 0008.
#3 Component-health column: a new Health column (power, control board,
each fan front-to-back, each hashboard) drawn as coloured icons -- grey
unreachable, red down, yellow sub-optimal, green healthy -- replacing the
Errors, Boards and Status columns. Left-clicking the header cycles the
sort through the component facets (overall/power/fans/hashboards); the
active facet shows as a tag beside the chevron. Errors move to the cell
tooltip. Four operator-supplied Font Awesome icons registered via the
existing SVG-in-cell renderer (new SHAPE_BOLT/BRAIN/FAN/CHIP sentinels).
#2 Credentials: rename the "Set scan credentials" button to "Credentials"
and make the per-firmware defaults the main dialog (the global "all
firmwares" login is folded in as the top row).
#1 Columns dialog: narrower; new Alphabetical and Categories sort buttons
(via a Column::category grouping and a wxbr_reorder_set_order bridge fn);
one mouse handler that does both drag-to-reorder and drag-to-rubber-band-
select (the old BEGIN_DRAG binding had silently disabled rubber-band
selection); Ctrl+A select-all and Ctrl/Shift+Up/Down extend-selection.
wx-rs bridge patches 0002/0003 regenerated. Unit tests + headless
selftest pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
Adds a right-click "Restore to stock firmware..." action for aftermarket-firmware
miners, behind a strong typed (RESTORE) confirmation that lists exactly which
miners will be reverted. All three supported firmwares self-restore for free (the
stock image is retained on-device; no image is uploaded), per the live-confirmed
flows in the miner-firmware wiki:
- VNish: POST /api/v1/unlock -> bearer -> POST /api/v1/firmware/remove (~3 s)
- LuxOS: luxminer :4028 logon -> uninstallluxos (credential-free)
- Braiins: SSH `uninstall.sh` (re-flashes the on-NAND stock backup)
New crates/alkane-gui/src/restore.rs runs the revert on a background thread with a
result channel and a fake-scan demo path; VNish password reuses the round 12 #13
per-firmware default, Braiins uses the saved SSH login. The menu item only appears
when the selection includes a revertible firmware.
Also fixes an event-routing bug introduced in #12/#8a: the log-viewer Close and
restore OK/Cancel buttons were mistakenly handled in the MenuItem match instead
of ButtonClicked, so they never fired -- this restores #12's log-viewer Close
button too. Moved them to the ButtonClicked match.
Verified under Xvfb + openbox: the menu item shows for VNish/LuxOS/Braiins rows;
the confirm dialog renders the targets and typed gate; typing RESTORE runs the
(fake) revert and closes the dialog; a wrong value is rejected and the dialog
stays open. restore unit test + GUI self-test pass. NOTE: no live restore was
run -- the designated test range 10.2.1.0/24 is currently empty, and production
miners were not touched; the live flash awaits a unit in that range.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Adds a right-click "View log (API)..." action that fetches a miner's log through
its firmware API and regex-scans it -- the "logs through API" path for PIC
detection and other metrics without SSH.
Per firmware (crates/alkane-gui/src/log_scan.rs, curl-based like the access
probe, stdout drained on a thread so a large log never deadlocks the pipe):
- VNish: POST /api/v1/unlock -> bearer -> GET /api/v1/logs/miner (the full miner
log: PSU init, per-chain chip detection, tuning, errors).
- Stock Antminer: GET /cgi-bin/log.cgi (digest); older models (Z15) that do not
serve it are reported as "no log over its web API".
- WhatsMiner: get_error_code on :4028 (unauthenticated) formatted as the log.
The summary regex reports PIC status ("not present (no-PIC miner)" / "present --
<version line>"), the latest per-chain chip-detection line, and recent errors
from the log history. Creds reuse the round 12 #13 per-firmware defaults (VNish
password, else "admin"; Antminer web login from the saved global creds).
Verified live: VNish S19j Pro (10.7.1.25) log -> "PIC: not present (log reports a
no-PIC miner)" + chains + recent errors; WhatsMiner (10.8.1.45) -> its active
error codes; Z15 (10.5.1.196) -> honest "no log over its web API". Unit tests for
the summary + a headless ALKANE_LOG_SCAN diagnostic; self-test passes.
Note: WhatsMiner fault codes already surface in the Errors column via asic-rs's
get_error_code -> messages; this adds the raw-log view and the PIC scan on top.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
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
The Light column's flashing-light dot now pulses (fades between ~30% and 100%
opacity over a ~1.6 s cycle) instead of sitting static, so a flashing locate
light reads as live.
- A distinct SHAPE_PULSE_DOT sentinel marks the fading dot, so only the locate
light pulses -- the hashboard health dots stay solid.
- A wxTimer in the bridge advances an animation phase and, each 100 ms tick, emits
a row change so the custom cell renderer re-runs (a plain Refresh() does not
re-invoke a custom renderer under wxGTK's cell caching); the renderer blends the
dot toward its cell background by the phase. The timer runs only while a visible
row's light is actually flashing -- fill_rows calls set_light_pulse(true/false)
-- so there is no idle repaint loop.
Verified under Xvfb: with the fixture whose locate light flashes and the Light
column shown, the dot's measured intensity oscillates across frames (strong amber
to a pale tint and back); with no flashing light the timer stays stopped.
Self-test still passes. wx-rs patches 0002/0003 regenerated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Adds a per-firmware default-login editor so the operator can set the discovery
credentials each firmware is probed with, rather than a single global pair.
- credentials.rs: a per-firmware store (firmware-credentials.txt, 0600, one
"name<TAB>user<TAB>pass" line per firmware) keyed by the asic-rs firmware
registry's Display name -- the same key the factory uses for
with_firmware_discovery_auth. A firmware_default_creds() table seeds the editor
with each firmware's shipped default (mirrors the asic-rs backends' default_auth
constants; asic-rs does not expose them at the entry level).
- configured_factory() precedence is now: a per-firmware override wins; else the
single global scan credential (unchanged back-compat) applies to every backend;
else the backend's own default_auth. Nothing saved -> plain MinerFactory::new().
- UI: the "Set scan credentials..." dialog gains a "Per-firmware defaults..."
button opening an editor that lists every firmware in the compiled-in registry
(read at runtime, not hard-coded) with editable user/pass fields prefilled from
the saved override or the shipped default. Save persists only rows that differ
from the shipped default (so defaults evolve with asic-rs and the file stays
minimal); Reset to defaults clears all overrides.
Verified under Xvfb: the editor lists all 16 registry firmwares with correct
default logins (AntMiner root/root, WhatsMiner admin/admin, VNish blank/admin,
UMC OS blank/letmein, ...). Round-trip/permissions/precedence covered by a unit
test (folded into the existing HOME-scoped credentials test to avoid a parallel
HOME race); self-test still passes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Adds an SVG-backed icon path to the table's segment renderer: the Rust side
registers a raw SVG per shape sentinel (with its viewBox dims), and the renderer
recolours it to the cell's segment colour, rasterises once per (sentinel, colour,
height) and caches the bitmap. The recolour matches the KPI cards' svg_recolored
(replace currentColor + inject a root fill so fill-less SVGs inherit the colour).
- #9: the Access column padlocks now use the operator-supplied Font Awesome
lock/unlock SVGs (red closed = view-only, green open = writable) instead of the
hand-drawn vector padlock. The vector padlock remains as a fallback if the SVG
is somehow unregistered.
- #11: the Status column renders its KPI icon (green rabbit = hashing, amber
turtle = slow, red cracked wine glass = not hashing, blue otter = paused)
instead of the status text, matching the dashboard cards. An unrecognised
status still falls back to coloured text.
The status dots (hashboards, locate light) stay vector so the round-12 #6 fade
can drive them later. Self-test updated (Status is now a shape cell, verified
structurally like the other icon columns) and still passes. Verified under Xvfb:
the Access column shows the FA padlocks and, with the Status column enabled, the
four status icons render in their KPI colours. wx-rs patches 0002/0003
regenerated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh