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
Addresses the round-3 feedback batch:
- Right-click now works: a context menu (open selected in browser, select all,
clear) pops up from the table. It was never wired before. (The live-config
intersection over the selection remains a follow-up; no dead menu items.)
- Selection is readable again in both themes: the alt-row/zebra CSS hack (which
painted row backgrounds over the native highlight, leaving white-on-white) is
gone; the native selection highlight shows through.
- Row text is coloured by status (green = hashing, amber = slow, grey = not
hashing), which also separates rows without fragile GTK zebra striping.
- Dark mode: KPI cards and rows follow the system theme (no more white boxes in
dark mode); a system-colour-changed event repaints them live if the OS toggles
light/dark while the app is open.
- Play / Pause / Stop are coloured media icons (green triangle / amber bars /
red square) instead of text buttons.
- Filter panel redesigned Excel-style: a column dropdown at the top selects the
column; controls adapt to its type. Text columns: a value checklist ("is any
of") or a predicate (contains / does not contain / begins with / ends with /
equals). Numeric columns: between / = / != / > / >= / < / <=. Filters AND
across columns; edits held in a working copy, committed on Apply.
- Auto-rescan label shortened to "Rescan (s):" so the value field has room.
Table: replaced wxDataViewListCtrl with a raw wxDataViewCtrl + a custom
AttrListStore (per-row foreground via GetAttrByRow), which keeps in-table column
drag while enabling status row colours. New wx-rs bridge primitives: wxChoice
dropdown, coloured media buttons (drawn on a transparent bitmap via
wxGraphicsContext), a wxEVT_SYS_COLOUR_CHANGED event, destroy_children, and
call_after (deferred rebuilds). Patches 0002/0003 regenerated + round-trip
validated.
Model: ColFilter { Values, Text{op}, Num{op} } with TextOp/NumOp and
passes_filters -> ColFilter::matches; Column::num_value for numeric filtering.
Review fixes (one review pass):
- Deferred the two rebuilds that destroyed a control from inside its own event
(filter op-dropdown change; column drag-reorder) via call_after, avoiding a
use-after-free.
- num_value returns None for a blank-displaying value-type cell (Hashrate,
Power, ChipTemp, ...), so "ChipTemp <= 50" no longer matches a miner with no
temperature reading.
- Value checklist maps a checked entry back to its real value by index, so a
literal "(blank)" value is not confused with an empty cell.
Verified off-screen: 45 unit tests, headless self-test (14 checks), and
interaction screenshots of selection, right-click, the text/numeric filter, the
comparator swap, and dark mode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
The self-test was continue-on-error while the container display path was
unproven. Run 529 confirmed it launches and passes (SELFTEST PASS) once xauth
was installed, so remove continue-on-error: a future regression that breaks GUI
init now fails the build instead of releasing silently.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
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
Run 2 got past the wx build (the bash fix worked) but cargo build --release
failed in openssl-sys 0.9.117: the debian:trixie-slim CI image has no OpenSSL
dev headers, which a transitive asic-rs dependency links. Add an install step
(libssl-dev, pkg-config, ca-certificates) before the build. actions/cache only
saves the wx prefix on job success, so this is the minimal change to get a
green run and persist the ~10-min wx build for subsequent iterations.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Run 1 of the release pipeline failed at the "Build wxWidgets" step with
"scripts/build-wx-linux.sh: Permission denied" - the checked-out scripts
carry mode 100644 (no exec bit), so a bare shebang invocation fails. The
compute-version step worked only because it was already called as
"bash ci/compute-version.sh".
- Call the wx build as "bash scripts/build-wx-linux.sh" (interpreter
explicit; no dependency on the exec bit).
- Set the exec bit in git on all ci/ and scripts/ shell scripts so they
also run directly for humans and future steps.
- Make the headless UI self-test non-fatal for now (continue-on-error)
and install dbus-x11 + fonts-dejavu-core alongside xvfb, so a container
display quirk cannot discard an otherwise-good 10-minute build. The
gate is re-tightened once it is confirmed green in-container.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Gitea Actions workflow (.gitea/workflows/release.yml) triggered on push to
main: build the GUI against the cached vendored wx, run the 22 unit tests and
two microbenchmarks (view pipeline + cell render, with perf-regression floors),
run the headless UI self-test under xvfb, then package the binary and cut a
release when the change warrants one.
Auto-versioning X.Y.Z (ci/compute-version.sh):
X - manual (ci/version-x.txt); a bump resets Y.Z
Y - backend-logic changes (core/discovery/access/flash/artifacts/cli, the
GUI crate's scan/model/main, build + CI config); resets Z
Z - UI changes (GUI view, fixtures, the wx-rs widget bridge)
Backend beats UI when both change; docs-only changes cut no release.
Runner: a dedicated act_runner (label alkane-ci) on bfe-mpc-0640 (the Gitea
host) runs jobs in a Debian-trixie image with Rust + GTK3/pcre2 + node.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
- 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
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