facett-demo — crate card
Reverse-engineered (from source — verify, don't trust the name)
- One-line pitch: The showcase app — ONE eframe binary (plus a headless
DemoStatelib) that exercises every facett component with fake-but-realistic data, switchable across all palettes. - Does:
main.rswrapsfacett_demo::DemoStatein an eframe window with a palette switcher (overTheme::ALL), deck fx (glow toggle + send-raven), a facett-menu command palette (Ctrl+P), and an about/legend panel. The lib wires per-component tabs: graphview/graphpan, the falkor FalkorDB graph-DB browser (afacett_graphview::FalkorBrowserCypher→laid-out-GraphModelfeeding an interactiveDecoratedGraphView, driven by a stubbed in-memoryCannedRunner— no live redis; robot-tested via kittest: renders nodes+edges, a click selects a node), jobview, timeline/plandag, security, helix, pop (popgraph/pop_model/pop_tab over knut-popsim's Swedish 11M population sim), osm 2D/3D tabs, region picker (in-process osm-katana region clip), velo L1 tab, widget gallery, and the primitives tab (the #22-Part-B shared reducers: a dragdrop cards→columns board, a pan/zoom time_axis scrubber, and the action_bus outbox they dispatch onto — all engine-agnostic facett-core). Native build uses the wgpu backend (installs map/map3d GPU renderers); wasm build (cargo xtask demo-wasm) uses glow/WebGL,--no-default-features, CPU painters, published to Codeberg Pages, and ships the deck MINUS the 7 native-only korp caseworker-flow tabs (see the parity section below). Extra bins:osm2d_demo,osm3d_demo. - Key deps: the umbrella
facett(+map-wgpu/map3d-wgpu native), plus directlyfacett-map,facett-model3d,facett-app,facett-graphview,facett-graphpan,facett-jobview,facett-timeline,facett-plandag,facett-security,facett-helix,facett-core,knut-popsim;eframe,arrow-array. Native-only:facett-map3d,osm-katana(region-clip),korp-collectors(region-connector). Wasm: wasm-bindgen/web-sys/console_error_panic_hook. - Shape: both (lib
facett_demo+ binaries); medium (~18 src files).publish = true(gated on osm-katana 0.2.x landing on crates.io first). - Observed role in the workspace: The living D4-compliance proof + screenshot gallery; the top-level consumer that pulls the whole facett surface together. Driven by a robot-UI live-drive test matrix.
Native ↔ wasm deck parity (the ONE documented divergence)
The deck (DemoState::new) and the LEGEND catalogue are built identically for native and wasm32 except for seven native-only korp caseworker-flow tabs. These are heavyweight case-management surfaces that belong to the full desktop caseworker app, not the lightweight wasm web demo, so both the deck vec![…] and their LEGEND entries are gated behind #[cfg(not(target_arch = "wasm32"))]:
| tab (title) | crate | surface |
Bygglov |
facett-gantt | permit-case Gantt bar chart |
Support |
facett-kanban | support swimlane Kanban board |
Frister |
facett-calendar | deadline / frist month calendar |
Notifications |
facett-toast | case notification/toast queue |
Anteckning |
facett-markdown | Markdown case-note pane |
Search |
facett-search | query SearchBar |
Attachments |
facett-file | file / attachment list |
So the deck is 72 facets natively (65 shared + these 7) and 65 on wasm (72 − 7). This is the only intentional native↔wasm divergence; every other tab is shared. The invariant is pinned by tests/pop_ran_list.rs:
NATIVE_ONLY_TABSis the explicit allowlist for these seven (with rationale).native_wasm_deck_parityasserts the native deck is the canonical 72 AND that the wasm surface is the native deck minus exactly those seven — so any OTHER tab that goes missing from wasm (a divergence NOT on the allowlist) still turns the check RED.
To add a tab: shared → just add it to the deck + LEGEND (it flows to wasm automatically); native-only → gate it in both places in lib.rs AND add it to NATIVE_ONLY_TABS (+ the EXPECTED_NATIVE list in the parity test).
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: