Files
alkane-toolkit/AGENTS.md
T
noahandClaude Opus 4.8 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
2026-09-16 16:24:05 -06:00

2.3 KiB

AGENTS.md - alkane-toolkit

Short standing orders for working in this repo. Read HANDOFF.md first on any resume; it names the live threads. Parent project rules live in ../AGENTS.md (bench discipline, live-fleet-ops).

Build / run (this machine)

  • Never build or run inside the synced repo tree (noexec, slow FS). Cargo target is ~/.cache/alkane-tk-target (set in ~/.cargo/config.toml, not committed); wx builds go to ~/.cache/wxbuild / ~/.cache/wx-3.3.3-linux.
  • scripts/build-wx-linux.sh (once) then scripts/build-gui-linux.sh (release).
  • The GUI is pure-Rust wxWidgets on the vendored, patched wx-rs (thirdparty/wx-rs/wx-rs-0.2.0-patched). When you change it, regenerate the matching thirdparty/wx-rs/patches/NNNN-*.patch and commit both.

Development / review / visual-feedback loop

Every UI change goes through this loop before it is considered done:

  1. Edit, then scripts/ui-selftest.sh -- builds and runs the app headless in ALKANE_SELFTEST mode: it renders the bench-fleet fixtures through the real widgets and compares the table cells + KPIs to the expected hardware output. Non-zero exit = a regression. Also run cargo test -p alkane-gui --offline for the transform-layer unit tests.
  2. scripts/ui-screenshot.sh out.png -- captures the running UI to a PNG on a private Xvfb display (never the real desktop). Defaults to the offline fixtures (ALKANE_FAKE_SCAN) so the shot is deterministic; --live scans the network. Eyeball the PNG for layout regressions.
  3. Only after both pass, wire in real hardware (a live scan) per parent rules.

Headless X gotcha: the GTK window only maps under Xvfb with GDK_BACKEND=x11 set; without it the app runs but never shows a window. The scripts set it.

Offline modes (no hardware needed)

  • ALKANE_FAKE_SCAN=1 -- feed crates/alkane-gui/src/fixtures.rs (the 9 bench boards' expected output) instead of scanning. Use for demos and screenshots.
  • ALKANE_SELFTEST=1 -- run the workflow self-test and exit (see the loop).

Keep the fixtures in step with the bench inventory (HANDOFF.md section 7).

Conventions

  • Confidence tags (CONFIRMED/DERIVED/EXTERNAL) on doc claims; cite file paths.
  • Single-line imperative commit summaries.
  • No emojis in any file (parent-project + global rule).