002ee3ddf261893e431090384d0a635eccfb7ebf
19
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
002ee3ddf2 |
GUI round 11 (#15): drawn icons on the KPI cards
build-test-release / release (push) Successful in 9m45s
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 |
||
|
|
2a3001d1e6 |
GUI round 11 (#2): collapse the two wide KPI cards when the window is too narrow
build-test-release / release (push) Failing after 9m26s
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 |
||
|
|
f87e519959 |
GUI round 11 (batch 1): default columns, control-board split cleanup, Stock/Env fixes, relative sort, consistent zebra + focus-dimming, hashboard/light dots, access icon
build-test-release / release (push) Failing after 10m39s
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 |
||
|
|
86638e870f |
GUI round 10 (batch 2): consistent zebra on custom columns + neutral KPIs dim with focus
build-test-release / release (push) Successful in 10m25s
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 |
||
|
|
623789f677 |
GUI round 10 (#8): Z15/Z15J Equihash hashrate shows the correct SI prefix (k, not T)
build-test-release / release (push) Successful in 32s
Root-caused and verified against the live fleet. An Antminer Z15 shows its
hashrate as e.g. "288T" when it is really ~288 kSol/s ("288k"). Equihash miners
report a Sol/s rate in the cgminer "GHS" key, but asic-rs AntMiner parse_hashrate
takes the unit from the key name ("GHS" -> GigaHash), scaling the value 1e9x too
large. The value is a raw Sol/s count, so for Equihash use the base Hash unit;
the toolkit`s SI-prefixing then yields "288k".
Matched by algorithm, and by "Z15" model name for the Z15J (which asic-rs leaves
algo Unknown). Fixed in both the v2020 and v2023_07 AntMiner backends, via
asic-rs patch queue 0002. Verified live: Z15 288T -> ~288k, Z15J 138T -> ~110k.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh
|
||
|
|
3e7ba5934a |
GUI round 9 (#4 v2): WhatsMiner v2 power-limit now reports success on the apply-restart
build-test-release / release (push) Successful in 24s
Follow-up to
|
||
|
|
c061bbddbf |
GUI round 9 (#4): fix WhatsMiner power-limit (v3 auth/param) + asic-rs patch queue
build-test-release / release (push) Successful in 6m53s
Round-9 #4 -- "the power-limit on the WhatsMiners doesn't apply properly" -- root-caused and verified against the live fleet, then fixed in vendored asic-rs via a new patch queue (ADR 0003). Root cause: asic-rs routes a WhatsMiner to its v3 (WhatsMinerOS) backend when the firmware date is >= 2024-11-01. The v3 privileged power-limit write (command "set.miner.power_limit" on port 4433) authenticated against account "super" but hashed the token with the WEB/admin password, and sent the watt value as a float -- so the miner rejected every write with "invalid json or password is wrong". asic-rs then swallowed that (Ok(data.is_ok()) -> Ok(false)) so the GUI showed "refused" with no reason. (Older miners, fw < 2024-11-01, use the v2 "adjust_power_limit" path, which restarts the miner on a change -- see below.) Fix (thirdparty/asic-rs/patches/0001): - v3 set_auth: the "super" account's token password is a SEPARATE v3 credential (factory default "super"), NOT the web/admin password carried by `auth`; use "super". The web password still drives the v2 (admin) path. - v3 set_power_limit: send the watts as a bare integer (a float trips the firmware's "invalid json" parser). - v2 + v3: propagate the RPC error with `?` instead of swallowing it to Ok(false), so a real failure reaches the round-9 bottom-right error indicator with the miner's own message. Verified on a live M30S+ (fw 20241108, api 3.0.1) via a read-only 4028 capture/restore harness: the fixed request returns {"code":0,"msg":"ok"}; asic-rs set_power_limit now returns Ok(true) and the miner applies the limit (it restarts to re-tune, ~10 min ramp -- expected WhatsMiner behaviour). Matches the pyasic and HashSource whatsminer-api-3 references. All test miners were returned to their prior configured limit. asic-rs patch-queue mechanism (ADR 0003 updated): asic-rs is cargo-vendored, so in-place edits are documented as a numbered patch under thirdparty/asic-rs/ plus a checksum-refresh helper and scripts/apply-asic-rs-patches.sh for re-vendoring. The committed vendor/ tree has the patch applied and its .cargo-checksum.json refreshed, so builds need nothing extra (CI builds fresh; a note documents the local `cargo clean -p` cargo-caching gotcha). Known follow-up: the v2 backend (fw < 2024-11-01) reaches the miner via "adjust_power_limit" but a changed value restarts the miner and the in-restart status check reports failure; whether it applies correctly needs its own verification. The error-propagation change surfaces that honestly meanwhile. Compile-checked (release + tests); 79 offline tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
aabe2a5fe7 |
GUI round 9 (batch 2): KPI box layout, bottom-right error indicator, algorithm filter + hashrate cycling
build-test-release / release (push) Successful in 5m52s
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 |
||
|
|
2b9ac42d70 |
GUI round 9 (batch 1): column-reorder persistence, post-action refresh, algorithm column, hashrate KPI label
build-test-release / release (push) Successful in 6m4s
- #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 |
||
|
|
818e0b8a21 |
GUI fix: guard out-of-range dvlc GetItem (crash selecting rows after refresh)
build-test-release / release (push) Successful in 6m3s
Round-9 #10: selecting miners could trip `datavcmn.cpp: assert "row < m_hash.GetCount()" failed in GetItem(): invalid index` and crash. wxDataViewIndexListModel::GetItem() asserts on an out-of-range row, and three bridge helpers called it with an index that can go stale when the row set shrinks (a filter, or a scan that returns fewer rows): wxbr_dvlc_ ensure_visible (the round-8 scroll-hold, unguarded), wxbr_dvlc_select_rows and wxbr_dvlc_select_row (only lower-bounded). All three now bound the row against the store's item count before calling GetItem, so a stale/empty index is a no-op instead of a crash. Local wx-rs bridge compile clean; patch 0003 regenerated + validated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
e9454c5eda |
GUI round 8: Errors column hover tooltip (full message list)
build-test-release / release (push) Successful in 10m2s
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
|
||
|
|
a606346569 |
GUI round 8b.2 fix: rubber-band drag-select uses native GtkTreeView on GTK
build-test-release / release (push) Successful in 10m1s
The wx-mouse-event rubber-band approach (LEFT_DOWN/MOTION/LEFT_UP) does not work on the native GTK wxDataViewCtrl: the underlying GtkTreeView grabs the pointer during a button drag, so wx never delivers the MOTION events, and only the initial click row was selected (verified against the shipped binary). Fix: on GTK, enable the GtkTreeView's own native rubber-band selection via dv->GtkGetTreeView() + gtk_tree_view_set_rubber_banding(TRUE), guarded by __WXGTK__ (gtk/gtk.h included only there). The wx-mouse-event approach is kept as the non-GTK fallback for the future Windows/macOS builds, where it will be verified in the platform round. The column-header right-click menu (native wx dataview event) already worked and is unchanged. Local wx-rs bridge compile clean; patch 0003 regenerated + validated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
5c041a037f |
GUI round 8b.2: column-header menu + rubber-band drag-select
build-test-release / release (push) Successful in 8m3s
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 |
||
|
|
5c40e2f35b |
GUI round 8b.1: scroll-hold, zebra striping + vertical gridlines, default-colour text
build-test-release / release (push) Successful in 11m3s
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 |
||
|
|
9d2147b45d |
GUI round 6: offline detection, combined columns, per-cell colours, paused status, credentials, refresh, firmware flash
build-test-release / release (push) Failing after 10m13s
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 |
||
|
|
d6868d3d40 |
GUI round 3: Excel-style filters, status row colours, icon controls, context menu, live theme
build-test-release / release (push) Successful in 7m10s
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
|
||
|
|
bd17a33ea1 |
GUI round 2: selection, scan loop, column management, dark-mode fix
- Fixed "Scan ranges" button label (no longer grows with the range list). - Dark-mode KPI cards: derive colours from the live system theme luminance instead of is_dark(), which mis-detected some GTK dark themes. - Removed the checkbox column; the table is multi-select (wxDV_MULTIPLE, ctrl/shift-click), with the selection tracked by IP so it survives refreshes. - Replaced Rescan with Play / Pause / Stop; added an editable auto-rescan interval (scan-ranges dialog; ~/.config/alkane-toolkit/auto-rescan-secs.txt) with a timer-driven countdown scheduler. - Status bar shows the last-probed IP during a scan and a countdown to the next scan when idle (dropped the "scan complete" text). - Default sort is IP-ascending with a header chevron; IP is column 0, sortable. - Choose-columns dialog is a wxRearrangeCtrl (check to show; up/down or drag to reorder) exposing every metric, including Pool 1/2/3 URL + worker. - Column drag-reorder moves the whole column with its data on drop. - Row separator lines (wxDV_ROW_LINES). GTK3 native has no zebra striping; a GTK4-forward zebra-CSS hook and pkg-config gtk cflags are in place. Scan engine: parse each configured pool's (url, worker); Progress carries the last-probed IP. Model: Column::Sel removed; Pool1/2/3 columns; default IP sort. wx-rs bridge: multi-select + selection/context-menu events + get_selections, alternating-row + zebra-CSS hooks, in-place column title, rearrangeable list, and popup-menu primitives (for the upcoming right-click config menu). Patches 0001-0003 regenerated and round-trip validated. Review fixes: scan loop no longer sticks "scanning" if a thread ends without Done (channel-disconnect handling + Stop force-reset); Play no longer starts a second scan; stale selections pruned on rescan; column apply order/visibility applied atomically. Verified: 22 unit tests, a 14-check headless UI self-test, and interaction checks (multi-select, column rearrange/drag, play/pause/stop, dark mode). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
d1ab6aa72a |
Fix GUI layout/crash bugs; add operator features, tests, and dev loop
Round 1 (bug fixes + test harness): - Fix table rendering in the top-left corner: the dvlc was never added to the sizer; add it (proportion 1) and re-run layout; drop the space-eating stretch. - Fix abort on dialog buttons: the dialog root sizers passed ALIGN_CENTRE_VERTICAL to a vertical sizer, tripping a wx consistency assert whose handler pumps a nested event loop, re-entering dispatch while it held the App RefCell borrow. Remove the invalid flags; split dispatch into two phases with try_borrow_mut. - Fix header-click sort mapping when columns are hidden (use display_columns); drag-reorder splices back into the full order without dropping hidden columns. - Add offline fixtures + ALKANE_FAKE_SCAN and ALKANE_SELFTEST modes; scripts ui-selftest.sh and ui-screenshot.sh; AGENTS.md documents the dev loop. Round 2 (operator requests): - Redesigned color-coded KPI cards; light/dark mode follows the system theme. - SI-formatted hashrate/power on the KPIs and columns (685 TH/s, 21.3 kW). - Scan ranges accept CIDR, single IP, and A.B.C.D-E.F.G.H / A.B.C.D-N ranges; oversized ranges (> 1,000,000 addresses) are rejected. - Scan progress bar over the table + status-bar text; out-of-range miners are dropped when a scan starts. - Columns panel exposes every scannable MinerData metric (All / None / Defaults). - Excel-style filter panel: per-category value checklists, per-column All/None, Apply / Reset / Cancel, blank handling. - Sort direction marker in the header (updated in place); double-click a row opens the miner in the default browser. wx-rs: extend the widget bridge (gauge, in-place column title, sort indicator, browser launch, system appearance/colours, widget colours, item-activated); patches 0002/0003 regenerated and round-trip validated. Verified: 22 unit tests + a 13-check headless UI self-test, plus a live scan against the bench fleet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y8h447BPyJR4fioYZvQ9bh |
||
|
|
b264cdd6d1 | M1 primary view: wx-rs patched+extended (Linux/GTK3 build, widget bridge), vendored wx 3.3.3 + asic-rs in thirdparty/, UI-SPEC table+KPIs+dialogs, build scripts |