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
This commit is contained in:
+14
@@ -42,6 +42,20 @@ board metadata (`boards/*/board.yml`); this toolkit mechanizes those recipes.
|
||||
- Double-click a row opens `http://<ip>` in the default browser (`wxLaunchDefaultBrowser`).
|
||||
- Filter panel horizontal layout can get wide with many category columns (no scrolled-window in the bridge yet); it is resizable. Live text-search within a filter column is not implemented.
|
||||
|
||||
**Feature round 2 (2026-09-16, operator requests):**
|
||||
- Scan-ranges button is a fixed "Scan ranges" label (no longer grows with the ranges).
|
||||
- Dark-mode KPI cards fixed: colours derive from the live system theme luminance (`palette()` reads `system_color`), not `is_dark()` which mis-detected some GTK dark themes.
|
||||
- Checkbox column removed; the table is multi-select (`wxDV_MULTIPLE`, ctrl/shift-click), selection tracked by IP so it survives scan refreshes.
|
||||
- Rescan replaced by Play / Pause / Stop; auto-rescan interval editable in the scan-ranges dialog (`scan::load/save_auto_secs`, `~/.config/alkane-toolkit/auto-rescan-secs.txt`). Timer-driven scheduler with a countdown.
|
||||
- Status bar shows the last-probed IP during a scan and a countdown to the next scan when idle (no more "scan complete" text).
|
||||
- Default sort is IP-ascending with a header chevron; IP is column 0 and sortable.
|
||||
- Choose-columns dialog is a `wxRearrangeCtrl` (check to show, up/down or drag to reorder); exposes every metric incl. Pool 1/2/3 URL + worker (`MinerRow.pools`).
|
||||
- Column drag-reorder in the table moves the whole column with its data on drop (native GTK shows only the header ghost during the drag - not changeable without a custom-drawn table).
|
||||
- Row separation: `wxDV_ROW_LINES` (thin separators). GTK3's native dataview has no zebra striping (SetAlternateRowColour is generic-only; `:nth-child` CSS is GTK4-only). A `wxbr_apply_zebra_css` hook is in place for GTK4; true zebra on GTK3 needs a custom `wxDataViewVirtualListModel` with `GetAttrByRow` - deferred.
|
||||
- `build.rs` now adds `pkg-config --cflags gtk+-3.0` so the bridge can call GTK directly.
|
||||
|
||||
**Deferred - item 11 (right-click multi-config menu):** intersection-of-config context menu that writes to live miners via asic-rs `HasMinerControl`/`SupportsConfigs` (fault light, power limit, tuning, restart, pause/resume, pool config). The wx bridge for it (popup menu + context-menu event) is already in place; the apply-to-live-hardware layer + confirm-before-apply is the next round.
|
||||
|
||||
**Dev / review / visual-feedback loop (see AGENTS.md):**
|
||||
- `scripts/ui-selftest.sh` — headless workflow self-test: `ALKANE_SELFTEST` mode renders the bench-fleet fixtures through the real widgets and compares the table cells + KPIs to the expected hardware output (13 checks; exit non-zero on any mismatch). `cargo test -p alkane-gui` runs the transform-layer unit tests (10).
|
||||
- `scripts/ui-screenshot.sh [out.png] [--live]` — off-screen (private Xvfb) screenshot for visual review; defaults to the offline `ALKANE_FAKE_SCAN` fixtures.
|
||||
|
||||
Reference in New Issue
Block a user