Files
alkane-os/third-party/flare-ui
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
..

flare-ui

Shared UI and schema crates for FLARE and the Warden console. They provide schema forms, navigation, charts, page assets, editors and package validation.

  • Licence: MIT.
  • Branches: main and next, like flare. Work branches from next.
  • Pinning: consumers vendor a tagged commit (vN.N.N) and record it in flare-ui.lock. They never pin an untagged commit, and CI jobs hold no cross-repo credential.
  • Layout: worktree per branch, flare-ui/.bare plus one folder per branch, kept in step with Gitea by scripts/sync-worktrees.sh (outside the repo).
  • Toolchain: rust-toolchain.toml pins one exact version.
  • Dash editor: dash-editor/ holds the imported flare-dash-editor tree and its history (lane LD owns it). Its tests: cd dash-editor && node --test tests/*.test.mjs.
  • Flow builder: flow-builder/ holds the automation flowchart (model, form, view). Its tests: cd flow-builder && node --test tests/*.test.mjs.
  • Validation corpus: corpus/ (lane LB), described in corpus/README.md.
  • Crates and owners: see OWNERS. Vendoring and tags: docs/vendoring.md.

Crates

Crate Role
flare-ui Schema forms, navigation, chart islands, page assets and editor assets
wschema Schema document model, builder DSL, canonical JSON, hashes, lint L01 to L23
wschema-cli canon, hash, lint and corpus validate for fragment authors and CI; verify-lock and gen-lock for consumer locks (flare-ui.lock, gen.lock)
wschema-gen Generators: the OpenAPI components.schemas of an effective schema and their splice into a template
warden-sync Sync stamps, HLC, windows, digest and planner (d03), and the wire and value limits both ends share, with golden limit vectors (tests/vectors/limits-vectors.jsonl) each end replays
warden-seal Per-Warden sealing (HPKE Auth): suite, info and aad builders, padding, kid, shared vectors
wapp-core App package format, manifests, platform checks and validation
wapp-pack Package creation, verification, signing, index and release guard CLI
flare-plugin-abi Reserved plugin ABI placeholder

wschema depends on serde, serde_json and sha2 only, and builds for x86_64 and armv7-unknown-linux-musleabihf.

Checks

cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
scripts/check-owners.sh
scripts/vendor-selftest.sh

The chart browser checks run on Chromium and Firefox over plain HTTP, with CSP and real SSE samples. The live client documents typed chart props, server tier links, accessible latest values and named series events.

The shared crates also build for the panel:

cargo build --locked --target armv7-unknown-linux-musleabihf \
  -p wschema -p warden-sync -p warden-seal -p wapp-core

The OpenAPI emitter's sample output passes an OpenAPI 3.1 validator (openapi-spec-validator, not part of CI here; the consumer's CI runs it on the real document):

cargo run -q -p wschema-gen --example openapi_sample > sample.yaml
openapi-spec-validator sample.yaml

Benchmarks for wschema (canonical JSON, hash, lint on a 140-setting document): cargo bench -p wschema --bench canon_hash.