Skip to content
misoto22 design

Diagrams

WorkflowFigure

A process in lanes and phases, with the main path drawn heavier than its branches.

Ships from@misoto22/design/diagrams

When to reach for it

A runbook, an approval chain, a CI pipeline — anything with an owner per step. mainPath is what turns fourteen boxes into a diagram with a subject.

Examples

default

Release

Green tests ship; a red deploy rolls back.
Release4 elements and 3 relationships. Green tests ship; a red deploy rolls back.SERVICELinteslintSERVICETestsvitestCLOUDDeployCloudflarePOLICYRoll backprevious build

4 elements and 3 relationships. Green tests ship; a red deploy rolls back.

  • Lint (backend) — eslint
  • Tests (backend) — vitest
  • Deploy (cloud) — Cloudflare
  • Roll back (security) — previous build
  • LintTests
  • TestsDeploy: green
  • DeployRoll back: health check failed
Key
  • Call
  • Asynchronous

Notes

A process: who does what, in what order, and where it can go wrong.

Three structures stacked on one grid, and they are three because they answer three different questions a reader brings to a runbook.

Lanes are rows and answer WHO. A lane marked exception is the one band that gets a wash rather than a rule, and it earns the exception to the frames-are-rules law because nothing routes across it — it IS the ground for the failure path, not a frame drawn over the happy one.

Phases are columns across every lane and answer WHEN. Printed as captions on one header rule, because a phase is an axis label. Groups are frames inside a single lane and answer WHAT BELONGS TOGETHER — a planning loop, an evidence path.

THE MAIN PATH IS HEAVIER, and that is the whole hierarchy. mainPath lists the node ids a reader should be able to follow without thinking. Every edge between two consecutive ids on it is drawn at the emphasis weight whatever its own variant says, which is the one thing that turns fourteen boxes and nineteen arrows into a diagram with a subject. An error role goes the other way — dashed and soft — so the exception path recedes without disappearing.

Props

WorkflowFigure props
PropTypeDefaultDescription
specrequiredWorkflowSpec

Also accepts everything in FigureChrome. Those are forwarded to the underlying element and are not listed row by row.

Accessibility

  • Same contract as every figure: a named picture, with its nodes and relationships published as text beside it.
  • The exception lane is the one washed band in the system’s diagrams, and it is still labelled — the wash is not carrying the meaning on its own.