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
Parse and verify the fixed-order .afw container, add the CV1835 board
module and an SSH transport with the stock update-daemon root stage, a
read-only preflight, a held p1 backup, whole-partition read-back, live
verification and network restore. Add the headless afw CLI and offline
fixtures for good, tampered, wrong-board, truncated, traversal and
oversize bundles.
Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>
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
Item 11: a "Presets" button (top-right) opens a dialog to save the current
table view -- column arrangement + visibility, sort, and all active filters --
as a named profile, load a saved one, or delete it. The built-in "Default"
profile is always the first preset and shows IP, Model, Hashrate, Power, Chip
temp, Firmware, Control board, PIC and Status; the app now boots with it.
- New presets.rs: a serde-serialized PresetView snapshot of ViewState (Vec-based
so the JSON has no enum map keys), Preset { name, view }, and load/save to
~/.config/alkane-toolkit/presets.json. "Default" is re-seeded on load and not
written, so it can't be lost or deleted. A loaded preset missing newer columns
still covers every column (they're appended hidden).
- serde/serde_json added to alkane-gui (already vendored + locked via asic-rs);
Column/ColFilter/TextOp/NumOp derive Serialize/Deserialize and ViewState is
now Clone.
- ui.rs: build_presets_dialog + apply_preset_load/save/delete, wired to the new
Presets button.
Unit tests: default-preset round-trips through ViewState and JSON.
cargo check --release --tests is clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
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