Expand description
facett-syschart — a system-map chart: a handful of free-positioned
peer nodes (not a layered DAG) joined by edges, each carrying a badge
(a count / status number) and, when selected, an inline expandable detail
panel. Click a node to select it; its detail renders in a panel under the
canvas. The host owns what a node’s detail is (a string here; richer hosts
draw their own widgets after ui() keyed off SystemChart::selected).
This is the piece facett_core::draw/[facett_graph::GraphView] don’t
cover — those paint a non-interactive Scene; DepGraphView is a
layered DAG with a fixed deps/dependents drill-down. A “monitoring map” of
a few peer systems (a PKI/OIDC/Nexus triangle, a service mesh) wants
deterministic positions, a per-node badge, click-select, and a free-form
detail panel — that’s SystemChart.
§FC-2 / FC-9 contract
Built on facett_core::Elm: the complete observable state lives in one
serializable SysChartModel (state); every
input is a Msg applied through the single mutation path
update (FC-2); and view is a
pure function of &self that paints and returns the Msgs the frame
produced (FC-9). impl_facet_via_elm!
writes the impl Facet bridge (for m in view(ui) { update(m) }). A headless
driver (facett_core::harness) feeds a Vec<Msg> and snapshots
state with no egui / no GPU.
Structs§
- SysChart
Model - The complete observable state (FC-1 / FC-3) of a
SystemChart, in one serializable, round-trippable struct: every node + edge, the selection (keyed on the stableSysNode::id, FC-5, so reorder/insert/delete preserves it), and the canvas height.SystemChart::statehands back a&SysChartModel; a headless driver (facett_core::harness) snapshots it after feeding aVec<Msg>. - SysEdge
- An undirected link between two node ids.
- SysNode
- One system in the map. Positions are normalized (
0.0..=1.0of the canvas), so the layout is resolution-independent and deterministic — ideal for headless rendering and screenshots. - System
Chart - The system-map chart
Facet: a tab title plus the complete observableSysChartModel. The FC-9 pureviewreads it and the FC-2updateis the sole path that mutates it.
Enums§
- Effect
- Side work as data (FC-8). The syschart does no I/O — every
Msgmutates only the in-memorySysChartModel— so this is uninhabited on purpose: the type-checked statement thatSystemChart::updatenever asks the host to do anything. - Msg
- A robot-/CLI-addressable control message — the named boundary a headless
driver (or a host toolbar) drives the chart through, the same effect the
canvas gestures produce. Applied by
SystemChart::update; the pureviewreturns these (it never mutatesself).