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
The two wide KPI cards (SHA-256 Hashrate, Est. power) carry a units-bearing
value like "685 TH" / "21.3 kW". When the window was narrowed the row squeezed
these cards below the width their value needs, clipping the trailing unit so it
read as "21.3" with no "kW". Two fixes:
- A nested wxPanel does not re-run its own sizer when its parent resizes it, so
each card's value/label centring kept whatever slot width it had at the
previous window size. on_resize now re-lays-out every card on each size event,
so the value stays centred and gets its full best-size width allocation.
- Raise the wide-card minimum width (150 -> 176) to fit a ~20px icon + a value
up to "118.0 PH" + the card's side inset, and derive the collapse threshold
from the real per-card minimums. The wide cards now either show their full
units or drop out of the row cleanly -- they never render a clipped value.
Verified under Xvfb: at 1050px all seven cards show "685 TH" / "21.3 kW" in
full; at 960px the two wide cards collapse and the five count cards fill the
row. Headless self-test still passes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
- #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
Replaced the hand-traced beehive with an exact potrace of the operator-supplied
beehive.png (parent miner-firmware folder): potrace -s on the flattened bilevel
bitmap, then the black fill rewritten to currentColor so it recolours to the
Hashrate accent. Renders correctly via wxBitmapBundle::FromSVG (nanosvg).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Replaced the placeholder skep with a beehive matching the operator's reference
(branch + hook on top, stacked pill bands, centre entrance), as an outline SVG
using stroke="currentColor" so it recolours to the Hashrate accent. Hand-traced
because a chat-pasted raster can't be reached as a file for potrace; if the
source raster is saved to disk later, it can be image-traced for an exact match.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
- Each KPI icon now uses its card's value colour (dropped the amber special-case),
so the otter matches the Paused text colour and the lightning bolt matches the
Est-power text colour, etc.
- svg_recolored also injects a root fill: some Font Awesome exports (e.g. the Free
otter) omit fill entirely and default to black, so replacing currentColor alone
left them black. Now shapes without their own fill inherit the card colour.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
- Zebra stripe heights: the cell rect wx hands a custom renderer is shrunk to the
content size in BOTH dimensions, so shape cells (dots) and text cells filled
different-height bands -> unequal stripes across columns. SegmentRenderer now
fills an over-sized rect (full column width + well beyond the row vertically);
the cell DC clips it to the real cell, giving uniform full-row stripes. Verified
in a screenshot.
- Focus dimming: the treeview's own state flags don't carry GTK_STATE_FLAG_BACKDROP
(that lives on the toplevel), so uncoloured segments (combined-cell slashes,
target hashrate, "Stock") never dimmed. ThemedTextColour now reads the toplevel
window's active state (gtk_window_is_active) and forces BACKDROP onto the
style-context state when inactive, so those segments take the same dimmed themed
colour the native columns do.
- KPI icons: replaced the hand-drawn vectors with operator-supplied Font Awesome
Pro SVGs (rabbit=hashing, turtle=slow, cracked wine glass=not hashing,
otter=paused) plus matching in-repo bolt (power) and hive (hashrate) SVGs. New
wxbr_svg_icon renders an SVG via wxBitmapBundle::FromSVG; the GUI recolours
each icon's currentColor to the card's colour and sizes it to the SVG aspect
ratio. Removed the old wxbr_kpi_icon path.
- Boards column sort: it sorted by total board count (all ~3, so no visible
order). It now sorts by the number of ONLINE (green) boards, total count as a
tiebreaker, so units with dead/missing boards surface.
wx-rs bridge/Rust changes mirrored into patches 0002 (widgets.rs) and 0003
(widgets_bridge.cpp) per ADR 0003.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
All root-caused and fixed against the live fleet (read-only scans; no device
state changed). asic-rs changes go through the vendored tree + thirdparty/asic-rs
patch queue (0003-0005) with refreshed checksums, per ADR 0003.
#5 (XIL/CVITek + WhatsMiner blank control board):
- VNish reports the board in short form in /api/v1/info "platform": "cv"
(CVITek), "xil" (Xilinx), "aml" (AMLogic); AntMinerControlBoard::parse matched
only the full names, so CVITek/Xilinx boards were blank. Added CV/XIL.
- Old M30S firmware (< 2022.7.29 -> v1 backend) omits summary's "CB Platform"
and v1's parse mandatorily stripped an "ALLWINNER_" prefix. Added get_version
/Msg/platform as a fallback source and made the strip optional.
- Verified live: S19k Pro cv->CVITek, S19 xil->Xilinx, M30S+ VE40->H6OS.
#6b/#11 (VNish partner / shared-devfee build):
- The partner build shows as /api/v1/info "build_name" ("WildRose",
"vnishreturn"). The VNish backend (v1_2_0 + v1_3_0) now reads /build_name and
combines it with the /fw_version number, so firmware_version reads e.g.
"WildRose 1.2.7". Verified live on S19j Pro / S19k Pro.
#8 (hashboard PIC detection):
- pic_probe tried i2c-1/i2c-0 for CVITek, but a live VNish CVITek S19k Pro
exposes the hashboard MCU on i2c-3 (i2cdump 0x48 = period-8 -> PIC). Broadened
bus_candidates (cvi->[3,4,1,0], aml->[1,3,4,0], bb->[0,1,3,4], else->[1,0,3,4]);
probe_pic stops at the first bus that classifies. The classify logic was
already correct + unit-tested; only the bus map was wrong.
The GUI picks up #5/#6b automatically through asic-rs (CPU/Board columns now
populate for VNish CVITek/Xilinx and old M30S; FW Version shows the partner
build); #8 is fixed in the GUI's own pic_probe. The miner_probe diagnostic's
local-only mutation modes are left uncommitted as before.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Replaces the columns dialog's wxRearrangeCtrl (checkboxes + up/down buttons)
with a wxListCtrl-based list (new wxbr_reorder_list / Widget::reorder_list):
- No up/down buttons; rows are reordered by dragging.
- Native multi-select: Shift/Ctrl-click and rubber-band drag.
- Keeps per-row checkboxes for show/hide; same [idx | !idx] order encoding, so
apply_columns is unchanged.
Drag-reorder is implemented by recording the selected rows' base indices on
wxEVT_LIST_BEGIN_DRAG and moving that group to the row under the cursor on the
following mouse-up (no real DnD loop is started, so the mouse-up still arrives).
Verified: the dialog opens without crashing and renders the checkable, button-
free list (headless click test). The drag and shift/ctrl multi-select
interactions are not headlessly simulatable and need interactive confirmation.
Bridge + Rust mirrored into patches 0002 (widgets.rs) and 0003
(widgets_bridge.cpp) per ADR 0003.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Each KPI card's value now leads with a small vector icon drawn into a
transparent bitmap via wxGraphicsContext (new wxbr_kpi_icon -> Widget::kpi_icon):
rabbit = Hashing, turtle = Slow, broken wine glass = Not hashing, otter =
Paused, hive = SHA-256 Hashrate, lightning bolt = Est. power; Total has none.
The icon takes the card's value colour (amber on the neutral Est. power card so
the bolt reads).
The icons are simple flat silhouettes so they render at ~22px without external
assets (no emoji/pictographs in source). The rabbit, turtle, wine glass, hive,
and lightning read clearly; the otter is the least distinct at this size.
Bridge + Rust mirrored into patches 0002 (widgets.rs) and 0003
(widgets_bridge.cpp) per ADR 0003. Self-test passes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Round 11 #12 removed the Status column from the default view, but the runtime
self-test (CI's "Headless UI self-test", separate from cargo test) read each
miner's status from the displayed Status cell -- now absent -- so three status
spot-checks failed and the self-test binary exited non-zero, failing CI. Status
is a model property, so the checks now read it straight from the row
(status_of(row) = rows[view_idx[row]].status()) instead of a displayed cell.
Self-test passes (exit 0).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
When the window is narrowed past the width needed to fit all seven KPI cards at
their minimum size, the two wide cards (SHA-256 Hashrate, Est. power) are hidden
so the five miner-count cards fill the row; they return when there is room again.
The five count cards still floor the window's minimum width (unchanged).
Adds a resize event to the wx-rs bridge (WxEV_SIZE -> WxEventKind::Sized, p1 =
client width) and a wxbr_sizer_show helper to hide/restore a sizer child and
reclaim its space. The main panel binds it; App::on_resize toggles the two cards
on a state change only (no per-drag relayout thrash). Bridge + Rust changes
mirrored into patches 0002 (widgets.rs) and 0003 (widgets_bridge.cpp) per
ADR 0003.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
The Columns dialog gains a "Hide columns with no scanned values" checkbox. When
on, columns whose cell is blank for every current row are hidden from the table.
It is non-destructive: the hiding is applied at table-build time via a new
App::table_columns() (used by every table-path caller in place of
view.display_columns()), so clearing the option restores the columns and the
underlying column order/visibility is never mutated. IP is never hidden, and
nothing is hidden before the first scan (no rows -> nothing empty).
Note: while the option is hiding columns, drag-reorder of the header is a no-op
(the reorder validates against the full visible set); turn the option off to
reorder.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
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
R10.1 (zebra consistency): wxGTK does not paint a custom renderer's cell
background, so the per-row zebra colour set via GetAttrByRow appeared on the
native columns but not on the SegmentRenderer columns (Hashrate, Chip temp,
Firmware, ...), making the striping look inconsistent. SegmentRenderer::Render
now paints the row's GetAttr() background itself (skipping selected rows, which
the control already highlights) so every column stripes identically.
R10.2 (focus dimming): the Total-miners and Est-power KPI cards and the plain
segments in combined cells forced an explicit foreground colour, so they did
not dim when the window lost focus like the rest of the dashboard. mk_card and
repaint_theme now leave ColorKind::Neutral cards on the default text colour, and
SegmentRenderer draws an uncoloured segment with the DC's current text
foreground (falling back to wxSYS_COLOUR_WINDOWTEXT) instead of a hardcoded
system colour.
The widgets_bridge.cpp edit is mirrored into the wx-rs patch queue
(patches/0003-widget-bridge-cpp.patch) per ADR 0003.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
#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
#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
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
Round-9 UI items #5, #6, #7 and the #9 algorithm-cycle follow-on.
#6 KPI boxes: switch the header from a wrap sizer to a horizontal box
sizer with every card at proportion 1 + EXPAND, so the cards are always
equal width and grow to span the full window; a per-card min size
(116x62) floors them at their largest content. Fix the filter-alignment
drift by re-running each card's sizer in refresh_kpis after set_label
(the centring spacers now recompute around the new value width). The
active-filter highlight now paints the card panel and both its texts, so
the whole box tints instead of only the strip behind the text. Bind the
card click on the value and label static texts too (a click on the number
or caption registers the quick-filter, not just the card gap).
#5 error indicator: add a second, colour-tinted status-bar field pinned
to the bottom-right corner (wxbr_status_indicator_init/set in the widget
bridge; a wxStaticText repositioned into the right field on resize). Scan
and apply outcomes route here without overwriting the left scan-status
text: a total apply failure and a scan failure show red, a partial apply
failure amber, full success clears it; a new scan/action clears any stale
message.
#7 algorithm filter: the Filter dialog now offers every column (via a new
ViewState::filter_columns) rather than only the visible ones, so Algorithm
-- and any other hidden metric -- can be filtered without first un-hiding
its column. Filters already match on the plain model cell, independent of
visibility.
#9 hashrate cycling: compute per-algorithm hashrate totals in compute_kpis
(Kpis::hashrate_by_algo, ordered by total). The hashrate KPI card shows
the selected algorithm's total under a "<Algo> Hashrate" caption and
cycles through the running algorithms when clicked (a no-op with a single
algorithm). SHA256 renders as "SHA-256".
Bridge provenance patches 0002/0003 regenerated to match the -patched tree.
Compile-checked (release + tests); 74 offline tests pass; headless
self-test PASS; screenshot-verified equal-width cards, full-box highlight,
click-through-text, and centred values after filtering.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
- #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
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
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
Item 12 (tooltip half): hovering an Errors cell now shows the full list of the
miner's error/event messages ("[Severity] text (component)", most severe first)
as a tooltip; the cell itself keeps the compact red summary.
wxDataViewCtrl has no per-cell tooltip API, and wx mouse-motion events are not
delivered to wx handlers on the native GTK control, so this uses GtkTreeView's
native "query-tooltip" signal directly (guarded by __WXGTK__): a per-cell
tooltip map (row, model column) -> text on the AttrListStore, populated from
Rust via a new dvlc_set_cell_tooltip bridge fn, and looked up by the signal
handler using dv->GTKColumnToWX(gcol)->GetModelColumn(). The map is populated on
every platform (a no-op where nothing reads it) so the non-GTK platform round
can wire its own tooltip surface later.
Local wx-rs bridge compile + full cargo check clean; patches 0002/0003
regenerated + validated.
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
Bridge + UI (local wx-rs bridge compile + full cargo check clean).
- Column-header right-click menu (#5): right-clicking a column header opens an
Excel-style menu -- Sort ascending / descending, Auto-size this column, Hide
<column> (not offered for the fixed IP column), and Columns... (the full
show/hide picker). New wx event WxEV_DVLC_HEADER_RIGHT_CLICK bound from the
native wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, plus a wxbr_dvlc_autosize_col
bridge fn (wxCOL_WIDTH_AUTOSIZE). (Sticky/frozen columns are the separate 8c
dual-control piece.)
- Rubber-band (click-drag) range selection (#10): wxDataViewCtrl has no native
drag-to-extend selection (only ctrl/shift-click), so it is tracked in the
bridge -- LEFT_DOWN records the anchor row (and lets the native handler select
it), dragging with the button down selects the inclusive row range under the
cursor, LEFT_UP clears the anchor; modifier-clicks are left to the native
multi-select. Reuses the existing Select/UnselectAll primitives and emits
SELECTION_CHANGED so the model's selected-IP set stays in sync.
- KPI cards widened to 150px so "685 TH/s" / "21.3 kW" are no longer clipped.
wx-rs patches 0002/0003 regenerated + round-trip validated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
Bridge + rendering rework (validated with a local wx-rs bridge compile + full
cargo check; CI is the build oracle).
- Scroll position hold (#2): the table no longer jumps to the top as new rows
stream in during a scan. fill_rows captures the top visible row before the
clear+refill and restores it after (new wx-rs bridge fns dvlc_get_top_row /
dvlc_ensure_visible, wrapping wxDataViewCtrl::GetTopItem / EnsureVisible).
- Default-colour text (#3b): rows are no longer tinted wholesale by status. Every
cell is now the default text colour (black in light mode, white in dark -- the
SegmentRenderer falls back to wxSYS_COLOUR_WINDOWTEXT for any run with no
explicit colour), so IP addresses, slashes, expected/target values and all
non-conditional cells read in the default colour. Only the conditionally-
formatted columns carry colour: Hashrate/Boards/Chips actual (ratio scale),
Chip temp (blue-red), fans (grey-blue), Access (red/green), Errors (red), and
the Status column keeps its own status colour on its own cell.
- Zebra striping (#8): odd rows get a subtle theme-aware background via the
AttrListStore (a per-row BACKGROUND attr, so it does not disturb the
default-foreground fallback and the native selection highlight still shows
through). This replaces the status row-tint as the row separator. (The earlier
abandoned attempt used SetAlternateRowColour / GTK CSS against the status
foreground tint; removing that tint is what makes the background approach
clean now.)
- Vertical gridlines (#8): wxDV_VERT_RULES added to the table style (row lines
were already on), so columns have borders.
- KPI cards: wxWrapSizer now drops wxEXTEND_LAST_ON_EACH_LINE, so the last card
on a line is no longer stretched -- the uniform-size KPI boxes stay uniform.
wx-rs patches 0002/0003 regenerated and round-trip-validated against the source.
cargo check --release --tests is clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
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
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
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
The round-6 combined columns (Hashrate/Hashboards/TotalChips/Cooling) now
store colour-segment-encoded strings in the data view, so the headless
self-test's per-IP spot-checks read raw encoded bytes instead of plain text.
Two checks failed in CI as a result:
- S21 Pro (.149) hashrate read "B95E18<US>60.0 TH/s / 200 TH/s" (colour hex
prefix + encoded combined text) rather than the plain value.
- S17 (.112) blank-hashrate read an encoded empty cell (invisible control
chars), so is_empty() was false.
Fix: the spot-check `cell` closure now runs dvlc_get_cell output through
decode_segments_plain (a no-op for plain cells), and the S21 hashrate check
expects the combined "60.0 TH/s / 200 TH/s" form. The "every cell matches the
model" loop already decoded, so it was unaffected.
Verified: cargo check --release --tests is clean; the self-test itself is a
CI gate (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
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
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
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
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