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.
8.3 KiB
The .wdash format
A .wdash file carries one dashboard between readers: a FLARE site
dashboard, a WardenOS panel's web console, and anything else that draws the
same document. It is the versioned block-tree document the dashboard editor
saves, wrapped in a small header that names it and lets a reader check that
it arrived intact.
This file is the specification. FLARE (docs/dashboards.md) and WardenOS
(docs/web-dashboard.md) both cite it, and both vendor the test vectors in
vectors/ so their readers are held to the same cases.
File
A .wdash file is one JSON object, UTF-8, at most 196,608 bytes (192 KiB):
{
"wdash": 1,
"name": "Compressor station",
"author": "operator",
"exported_at": "2026-10-02T14:05:09Z",
"checksum": "sha256:3f1d...",
"document": {"version": 3, "blocks": [ ... ]}
}
| Field | Type | Rule |
|---|---|---|
wdash |
integer | The format version. This document defines 1. |
name |
string | 1 to 120 characters, no control characters. What the dashboard is called. |
author |
string | 0 to 120 characters, no control characters. Who exported it; empty when nobody is known. |
exported_at |
string | When it was exported, UTC, exactly YYYY-MM-DDTHH:MM:SSZ. |
checksum |
string | sha256: and 64 lowercase hex digits, computed as below. |
document |
object | The dashboard document, described in FLARE's docs/dashboards.md. |
Every field is required. A field not in this table is refused, as is a field
of the wrong type, so a typo in a hand-edited file is a refusal that names
the field rather than a value silently dropped. name and author are
display text only; no reader makes a decision on them.
A writer indents the file with two spaces when the indented file fits in 192 KiB, and writes it compact otherwise. Indentation grows with nesting, so a deep document inside its own 128 KiB cap can indent past the file cap; compact, the header adds well under 4 KiB, so every document a save accepts writes a file every reader accepts.
Checksum
The checksum covers document and nothing else, so renaming a file or
re-exporting it under another name does not change it:
- Serialize
documentwith the JSON Canonicalization Scheme (RFC 8785): object members sorted by the UTF-16 code units of their names, no insignificant whitespace, strings escaped as ECMAScriptJSON.stringifyescapes them, and every number written the way ECMAScript'sNumber.prototype.toStringwrites it (1.0is1,1e21is1e+21,0.0000001is1e-7). - Take the SHA-256 of those UTF-8 bytes.
- Write
sha256:followed by the digest in lowercase hex.
A reader computes the same value over the document it parsed and refuses
the file when the two differ. The checksum detects corruption and accidental
edits. It is not a signature: anyone who can change the document can change
the checksum with it. A signature field may be added in a later format
version.
Canonicalizing rather than hashing the bytes as written is what lets a file survive a reader that re-indents it, and it is why two exports of the same document from different builds carry the same checksum.
Reading
Reading is as strict as the dashboard editor's save, in three layers:
- The header. Unknown, missing or mistyped fields are refused, and so is a checksum that does not match.
- The format version. A
wdashthis reader does not know is refused by number ("written by a newer build"), before any other field is read. - The document. It goes through the reader's own dashboard rules, the
ones its editor applies to a save: a surprise key on the document or on a
block's frame is refused, a kind the reader draws carrying an attribute it
does not know is refused, and a kind the reader has never heard of is kept
and drawn as a placeholder. FLARE's
docs/dashboards.mdsets these rules out in full.
Document versions are read as forgivingly as the editor reads them:
| Reader | Document versions | A newer version |
|---|---|---|
| FLARE | 1, 2 and 3; 1 and 2 are upgraded on import | Refused by number |
| WardenOS | 3 | Refused by number |
A WardenOS panel does not carry the upgrade. Importing an older document there is refused with a sentence saying to import it into FLARE and export it again, which writes version 3.
Importing never stores on its own. Both readers import from inside the dashboard editor: the file's document goes into the editor for review, and the editor's Save stores it, checked again like any other save.
Writing
A writer produces exactly the six fields, wdash set to 1, the document as
its editor saves it, and the checksum over that document. FLARE writes
author as the username that last saved the dashboard and exported_at as
when that save happened, so exporting the same saved dashboard twice
produces the same bytes. A panel writes author as panel and
exported_at as its own clock.
Sources
A block's value reads a source by key. A source a reader cannot resolve
draws No data, so one file renders on every reader: each fills in what it
has and says so for the rest.
| Key | Reads | FLARE site | FLARE main | WardenOS |
|---|---|---|---|---|
sites.total, sites.online |
The fleet | No data | Yes | No data |
site.devices, site.online |
One site | Yes | No data | No data |
telemetry.{measurement}.{field} |
Any measurement a Warden publishes | Yes, from the site's Warden | No data | The seven channels below, from local readings; any other measurement is No data |
warden.{channel}.{field} |
A reading the Warden has itself | Yes, from the site Warden's latest telemetry of that channel | No data | Yes, from local readings |
warden.* is the Warden-side vocabulary. It is a closed set, the seven
channels a Warden publishes as telemetry, each with exactly the fields that
channel's telemetry payload carries (FLARE docs/telemetry.md). A panel
reads them from its own live status, without needing FLARE or a network; a
FLARE site page reads the same names from what that panel last published.
That is what makes a dashboard built on the panel render on its site page,
and the reverse.
| Channel | Fields |
|---|---|
status |
online, fw |
metrics |
cpu_pct, mem_used, mem_total, uptime_s, disk_used, disk_total, rx_bytes, tx_bytes |
net |
hosts_online, leases_used |
rs485 |
devices, answering, avg_ms, framing |
miners |
count, hashing, ths, avg_temp_c, power_w |
relays |
r1, r2, and so on, one per relay the hardware exposes |
starlink |
reachable, state, disablement_code, obstructed, obstruction_pct, down_bps, up_bps, latency_ms, drop_pct, uptime_s |
A value is drawn the way FLARE draws telemetry: a string as written, a
number as JSON writes it, and a boolean as On or Off. A field the reading
does not currently carry is No data, never a guessed zero: status.online
reads On on a panel that is drawing it, metrics.cpu_pct has no value
until the panel has taken two samples, and rs485 is empty while the bus
scan is paused, exactly as its telemetry is.
Pushing to a panel
FLARE pushes a site's dashboard to the site's Wardens through remote
configuration. The desired document a Warden pulls from
GET /api/v1/devices/{id}/warden-config gains one member, dashboard,
holding a .wdash object:
- Present: the panel's web console dashboard is FLARE-managed. When the pushed checksum differs from the one the panel last applied, the panel validates the file, keeps the dashboard it is replacing as its backup, and shows the pushed one. The console says the dashboard is FLARE-managed.
- Absent, or no document at all: nothing manages it. The panel keeps whatever dashboard it has and stops saying FLARE manages it.
A push wins over local edits, but only when it changes: re-applying the same revision, or a revision that changed another section, does not overwrite a local edit made since. That is the same rule remote configuration follows for every other setting. A push that fails validation changes nothing on the panel and is reported there.
Test vectors
vectors/cases.json lists every file in vectors/ with what each reader must
do with it, and, for a refusal, a word the refusal must contain. A reader's
test suite runs every case. Adding a rule means adding a case, so the readers
cannot disagree about it without one of them failing.