3 Commits
Author SHA1 Message Date
noahandClaude Opus 4.8 34bccbd437 os: editable main dashboard + full settings tabs (drivers/services/monitor)
Make the main dashboard an editable deck, like wardenOS's dashboard, and split
the remaining settings into their own tabs.

- console.rs: dashboard/overview is now an editable deck - a .wdash-style
  document stored on the box (bus dashboard/* verbs behind /api/dashboard) whose
  blocks draw live values from the open miner-state API. A self-contained island
  (CSS + JS in the flare-ui shell) renders the grid and, in edit mode, adds,
  removes, reorders and saves blocks; Reset restores the template. Drivers,
  Services and Monitor are now distinct settings tabs rather than bundled into
  System/Security.
- schema/alkane-bb.json: add the settings/drivers, settings/services and
  settings/monitor menus so the nav shows them (settings now has 11 tabs).
- service.rs: the deck directory falls back to a writable path off the miner so
  the editable dashboard saves in a dev run too.

Verified on --serve-sim: the dashboard renders with an Edit toolbar, a deck
saves and reloads from /api/dashboard and Reset restores the 5-block template,
and every settings tab (system/tuning/pools/network/drivers/security/services/
monitor/logs/files/terminal) answers. 203 tests pass, clippy -D warnings clean,
no emojis.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
2026-11-10 21:18:18 -06:00
x 997771ab5e Wire the schema-driven dashboard and add the .afw firmware package
Dashboard (src/dashboard.rs): the on-box UI now renders from
schema/alkane-bb.json through flare-ui and wschema. The sidebar, the tab strip
and all 20 settings controls come from the schema; the host boundary does what
the crates require - validate the submitted batch with wschema before persisting,
ignore keys that are not in the schema, and never write on a rejected form.
Settings live in /etc/alkane/settings.json (temp dir when the root is read-only).

Web: GET /<section> and /<section>/<tab> render the dashboard, /assets/* serves
the crate's embedded token/component/theme stylesheets, POST /settings applies a
form. The existing JSON API routes are untouched.

Settings wired (all from real runtime knobs): tuning target mode and its four
values, frequency ceiling, the PID gains and limits in milli-units (the schema
has integer kinds only), fan zones/duty/sweep, detection ports and budget,
profile database path, board name.

Tests: 10 dashboard tests (schema loads, all settings present, page renders
inputs, valid submit persists and reloads, out-of-range rejected with nothing
written, unknown keys ignored, percent decoding) plus the existing 162. 172 pass.

Packaging (ci/make-afw.sh): .afw modelled on the Warden .wfw bundle - strict
POSIX ustar, manifest first, payload verified by size and sha256 - with three
deliberate differences: the payload is gzip-compressed, the manifest carries
 and x86_64, and both appear in the file name
(alkane-os-0.1.0-am335x-bb-armv7.afw) so a bundle cannot be mistaken for another
family. Signature is declared  in the manifest until a release key
exists; the sha256 is the only integrity claim today.
2026-11-04 14:06:25 -06:00
x ad31cfbafa Vendor flare-ui v0.2.9 and prove the schema-driven UI in an image
Spike, not the final UI: it answers whether flare-ui can drive Alkane OS's
on-box pages, and what it costs.

What works:

- schema/alkane-bb.json authors the sidebar as data (3 sections, 14 tabs);
- src/bin/ui-spike.rs renders it through flare_ui::nav + flare_ui::shell, so
  the unified sidebar, ordering and surface filtering come from the schema
  rather than from hand-written HTML;
- the render uses the shared bf- design tokens, the same ones the rest of the
  suite uses.

Size, measured rather than assumed (armv7, release, stripped):

  ui-baseline   323 KiB   (maud + serde_json, no flare-ui)
  ui-spike      771 KiB   (flare-ui + wschema + sha2)
  marginal      448 KiB

Vendoring: third-party/flare-ui is the full v0.2.9 tree pinned in
flare-ui/flare-ui.lock (a partial archive does not compile, since the crate
include_str!s assets from dash-editor/). vendor/ is re-generated as a cargo
directory source with the new registry dependencies (maud, sha2, typenum,
digest, generic-array, block-buffer, crypto-common, cfg-if, etc.) so the build
still works offline. third-party/README.md records how to re-pin.
2026-11-04 14:06:25 -06:00