# Preview Flow

> Read the admin-only Preview Flow canvas — how the Input → Model → Output pipeline edges are drawn, what the live animation means, and what clicking a node does.

<AppFrame name="PreviewFlow" alt="Preview Flow canvas showing input datasources, models, and output datasources connected as a live pipeline graph" caption="Preview Flow — the Input → Model → Output pipeline as a live graph." />

**Preview Flow** (`/preview-flow`) is an admin-only, read-only canvas that visualizes
your pipeline as a graph: input datasources on the left, models in the middle, output
datasources on the right. It is only visible to admin accounts — the nav entry and
route are both admin-gated, so a non-admin user is not missing anything if it doesn't
appear in their sidebar.

The graph is derived live from your existing datasource and model configuration —
there is no separate Preview Flow data store, API, or database table. It reflects
every flow you have configured, and which one is live.

## Nodes

Each node carries a small type icon and mirrors data you already see elsewhere:

- **Input datasource** — type, tag count, and the same Enabled/Disabled switch shown
  on the Data Sources table (read-only here; toggling happens in the drill-in drawer).
- **Model** — version, status, and output shape (input shape appears in the drill-in
  drawer, below).
- **Output datasource** — type, tag count, and its Enabled/Disabled switch.

A model an input references but that no longer exists in the model list renders as a
**ghost node** flagged **Missing**, rather than being silently dropped.

## Edge legend

The canvas draws **every configured flow**, not just the running one. A flow is one
Input → Model → Outputs chain, and several flows may read the same input with
different models, so one input node can fan out to several models.

What separates them is **live**: the chain belonging to the enabled flow renders
normally, everything else is dimmed with a dashed stroke. Drawing only the enabled
flow would hide topology you configured and Task Manager lists.

- **Input → Model** — one edge per flow. If that flow's model is missing from the
  model list, the edge renders red/invalid pointing at a ghost node instead of
  silently disappearing. An invalid edge stays loud even when dimmed: a dangling
  model reference is a fault whether or not that flow is the one running.
- **Model → Output** — one edge per output the flow binds, suppressed when the
  model cannot actually feed that sink (unparseable or mismatched channel count).
  An output bound to the **enabled** flow that nothing can feed is flagged
  **Not connected**, so a misconfigured output stays visible instead of quietly
  doing nothing. An output belonging to no enabled flow is simply dimmed — not
  live is not a fault.

**Why every flow is drawn**

An earlier version of this canvas could only draw one Input → Model edge per
datasource, because the pairing was a single column on the datasource row. Flows
made that representation impossible: with three flows on one input and three
different models, there was no place for the answer. The page is called Preview
Flow, so it now draws the flows and dims the ones that are not running.

## Live data-flow animation

While inference is **running**, the streaming chain — input → its flow's model →
that model's connected outputs — animates to give a live "data flow" cue. Every other
edge on the canvas stays static. Because inference is a singleton, at most one chain
animates at a time: the effect always reflects the one pipeline that is genuinely
running, never implies flow through an idle path.

Dimming and animation answer different questions. Dimmed means "not the enabled
flow"; animated means "predictions are moving right now". A flow can be enabled and
not animated — that is Ready but not started, which is a valid state, not a fault.

**Controls follow your theme**

The zoom-in / zoom-out / fit-view controls in the corner of the canvas match your
current light/dark theme, so they no longer stand out as a mismatched white box under
dark mode.

## Interacting with a node

Preview Flow is a viewer, not an editor — you can't drag nodes or draw new
connections. Clicking a node opens the same configuration dialogs you'd reach from the
Data Sources or Model Manager pages, in a drill-in drawer:

- **Input node** — Edit config, Pair model, Map tags, and the Enable/Disable toggle.
- **Output node** — Edit config, Map outputs, Test write, and the Enable/Disable toggle.
- **Model node** — a read-only summary (Version, Status, Input shape, Output shape).
  Model details are read-only here; manage models on the Model Manager page.

Saving any change re-derives the canvas from the updated configuration, so the graph
always reflects the current pairing/enable state after you close the drawer.

**Read-only view, no new mutation surface**

Preview Flow itself writes nothing. Every action available from a node's drawer is an
existing Data Sources / Model Manager operation reused here — the page adds no new way
to change your configuration beyond what those pages already expose.

## If something goes wrong

- The canvas shows a dangling/invalid pairing or a "not connected" output — pair the
  input with a valid model, or match the output's shape to the active model. See the
  [Troubleshooting](/troubleshooting/) runbook.

## Next steps

  - [Monitor predictions](/operate/monitoring/) — Latency, throughput, and KPIs once a datasource is streaming.
  - [Configure an input datasource](/configure/input-datasources/) — Pair, enable, and tag-map an input to feed a model.
