4fea3becf6f1bdd8ece0256ae499019f8bcbf15f
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b6afe08a5f |
GUI round 6: offline detection, combined columns, per-cell colours, paused status, credentials, refresh, firmware flash
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 |
||
|
|
297e21a519 |
GUI round 3: Excel-style filters, status row colours, icon controls, context menu, live theme
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
|
||
|
|
6955b1e3e3 |
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 |
||
|
|
d88df603ba |
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 |
||
|
|
fcc70c04f6 | 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 |