Devtools — FlowGraph
Visualize a flow as a graph — its static structure, and the live runtime trace as it runs.
Devtools — <FlowGraph>
Complex flows are hard to read as code. cairn-devtools renders any flow as a
graph — steps as nodes, next/onError as edges — and, when you hand it a live
engine, lights up the running flow in real time.
npm i cairn-devtoolsimport { FlowGraph } from "cairn-devtools";
import "@xyflow/react/dist/style.css"; // once, app-wide
<FlowGraph flow={onboarding} engine={engine} />;Try it
Press Run and watch the graph trace the path — decide pulses while the
async step "thinks", then the taken edge animates to the chosen view. Flip
Usage 90% and run again to see it branch the other way.
status:
idleWhat it shows
- Edges — solid for a string
next, dashed red foronError, dotted for the possible targets of a dynamic step (declared viameta.targets). - Badges —
▶ start,■ end,⚡ async(runsteps),🔒 guard(canEnter),↯ dynamic(functionnext/onError). - Live trace (with
engine) — the current step, the visited path, therunning/errorstate, and the edges actually taken (revealing the dynamic branches static analysis can't).
Read-only by design — a visual editor that authors flows is a separate effort.