Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

facett-graphview/.nornir/facett-graphview.md

facett-graphview — crate card

Reverse-engineered (from source — verify, don't trust the name)

FalkorDB browse data-flow (the falkor seam)

  Cypher text ─(FalkorBrowser::run_query)─▶ CypherRunner::run(graph, query)
                                                    │  (redis GRAPH.QUERY at the consumer;
                                                    │   CannedRunner in tests/local())
                                                    ▼
                                             CypherResult { nodes, edges }
                                                    │  build_model: id→index, label→categorical colour,
                                                    │  GraphCsr::from_edges → relax_cpu force layout (REUSED)
                                                    ▼
                       GraphModel ──(DecoratedGraphView::with_model)──▶ interactive pan/zoom pane
                            │                                              (click-select + pan/zoom;
                            │                                               world_to_screen() maps a node
                            │                                               back to a screen pixel for
                            │                                               out-of-band/robot hit-testing)
                            └▶ FalkorBrowser::state_json  {query, status, node_count, edge_count, labels, …}

Live consumer: facett-demo's falkor tab (facett_demo::falkor_tab::FalkorTab) wires this data half to the DecoratedGraphView view half over a stubbed in-memory CannedRunner (no live redis), and is robot-tested (kittest) — renders nodes+edges, a synthesised click selects a node via DecoratedGraphView::world_to_screen.

The camera: fit recentres, fit_model FRAMES

DecoratedGraphView carries a pan/zoom camera in its GraphViewState. Two things move it and they are not the same thing:

Why it exists. Until facett 019fbab7 the crate advertised a 100 000-node lane and had no way for a host to look at one: Fit is zoom 1 and ZoomBy bottoms out at 0.25, so any world box more than 4× the widget was unreachable. Measured on korp 2026-09-01 — a live 132-node FalkorDB scene laid out at one chip of clearance per node spans ~3 500 world units and, in a 900 × 640 pane, added 0.006 of ink over the SAME pane holding an empty model. The pane was chrome and a few stray chips.

The math is facett_graphpan::GraphView::fit_bounds, reused rather than re-derived — the two crates share a camera model, so they must share the fit (LAW 5).

Demoed in facett-demo's falkor tab as the ⊙ Frame button, with state_json().camera / .framed so a driver asserts the camera actually moved; frame_button_puts_every_node_inside_the_pane asserts on projected node positions, not on the zoom scalar.

Fill in (one line each — only the human knows these)