Files
alkane-os/third-party/flare-ui/flow-builder/docs/flow-builder.md
T
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

51 lines
2.0 KiB
Markdown

# Automation flowchart
The flowchart is a second view of an automation package, not a second
format. The engines run a package's `steps` top to bottom and have no jumps
or nested branches, so the flowchart shows exactly that.
## Model
- The graph is derived from the document on every draw and stores nothing
of its own. Document to graph to document is the identity: every package
field, every step object and the key order are kept.
- Nodes: Start, one node per step, End, and Stopped when a procedure has a
step that can stop it.
- Edges the operator edits are `next` edges. There is exactly one chain from
Start to End.
- Derived edges are drawn but never edited:
| Edge | From | To | Meaning |
|---|---|---|---|
| `false` | `compare` | Stopped (procedure), Next run (loop) | A false guard ends the run or the iteration |
| `timeout` | `loop_until` | Stopped (procedure), Next run (loop) | A timeout ends the run or the iteration |
| `repeat` | Next run | Start | A loop runs again after `interval_s` |
## Edits
| Edit | Result |
|---|---|
| Connect A to B | B runs right after A and leaves its old place |
| Connect Start to B | B runs first |
| Connect A to End | A runs last |
| Move | The step takes another place in the chain |
| Insert | A new step after the chosen node |
| Remove | The neighbours join |
Refused: a node connected to itself, an edge out of End or Stopped, an edge
into Start or Stopped, Start to End, and a step past the 64-step cap.
## Limits
The format has no branch, so neither does the flowchart. A `compare` is a
guard, not an if/else. Branching logic belongs in a `script` step. A graph
format with branches would need engine and format support first.
## Checks
`stepErrors` and `documentErrors` repeat the rules the server and the Warden
apply to one step: required fields, comparisons, ranges, command words,
output names and units, recipients, and duplicate output names. Point
grammar and Rhai compilation stay on the server; the consumer puts the
server's "Step N" refusal on node N.