facett-stat — crate card
Reverse-engineered (from source — verify, don't trust the name)
- One-line pitch: Generic non-domain stat widgets — themed sparklines, status/verdict chips, a health pill, and an inline-bar stat grid — factored out of nornir's viz.
- Does: Two layers. (1) Free painter helpers
status_verdict,sparkline,health_pill,health_color— palette-aware, stateless, draw straight onto anegui::Painter; plus theVerdictenum (pass/fail/skip/ignore/running) and sharedRED/AMBERconstants. (2)StatGridView, a canonical Facet overStatRows (label + value + inline normalized bar + optional sparkline + status), with local()/remote()/state_json()/to_tsv(). Re-homes widgets nornir kept in viz only because of an egui 0.33↔0.34 skew. - Key deps:
facett-core(Facet, Theme),egui,serde/serde_json. Dev:egui_kittest. - Shape: lib, single module (~421 lines). Key types:
Verdict,StatRow,StatGridView; free fnsstatus_verdict/sparkline/health_pill. - Observed role in the workspace: The shared stat/sparkline lane; e.g. facett-security reuses
sparklineto paint its severity histogram instead of hand-rolling a bar painter.
Fill in (one line each — only the human knows these)
- Primary consumer(s):
- Why it exists (vs the obvious alternative):
- Hard constraint (airgap / no-C-deps / no-FFI / pure-Rust / etc.):
- Release cadence & independence (rides a parent? own repo someday?):
- Status (production / prototype / experimental / stubbed):
- Must-NOT-change invariant:
- Biggest known gap or TODO:
- Anything a newcomer would get wrong about it: