Timelines, Flow Graphs and Status Boards
The three most common ways to visualize a process: a timeline answers "what happened when", a flow graph answers "how do the steps relate and where are we now", and a status board answers "how are things overall and where are the problems". Their data usually comes from the same event stream.
Core concepts
| Form | Question it answers | Data | Common implementation |
|---|---|---|---|
| Timeline | What happened, and when? | Timestamped event sequence | Custom list + virtual scrolling |
| Swimlane / Gantt | With several executors in parallel, who did what when? | Intervals with start/end time and executor | Custom SVG/CSS Grid, or a chart library |
| Flow graph (DAG) | How do steps depend on each other, which node are we at? | Nodes + edges | React Flow (@xyflow/react), Vue Flow (@vue-flow/core) |
| Status board | Overall health, what needs attention? | Aggregates across tasks | Metric cards + grouped lists + simple charts |
How it works
1. One data source: event stream + reducer
ts
type TaskEvent =
| { id: number; ts: string; type: 'step.started'; stepId: string; agent: string }
| { id: number; ts: string; type: 'step.retrying'; stepId: string; attempt: number; reason: string }
| { id: number; ts: string; type: 'step.failed'; stepId: string; error: string }
| { id: number; ts: string; type: 'step.succeeded'; stepId: string }
| { id: number; ts: string; type: 'human.requested'; stepId: string; request: string }
function reduce(state: TaskView, e: TaskEvent): TaskView {
if (e.id <= state.lastEventId) return state // idempotent: ignore duplicate or stale events
// …update steps / timeline / stats by e.type
return { ...state, lastEventId: e.id }
}- Timeline = events sorted by time (groupable, filterable)
- Flow graph = the static step graph + each node's state computed by the reducer
- Status board = aggregation of many tasks' reducer results
Events carry a monotonically increasing id, and the front end dedupes and sorts by it. When SSE reconnects, the browser sends the Last-Event-ID header and the server replays what was missed (see Streaming UI and long-running tasks).
2. Timeline design
| Point | How |
|---|---|
| Layers | Grouped and collapsed by step by default; expand for events within a step; raw logs as a third layer |
| Navigation | "Jump to failure" and "Jump to what needs you" buttons; #event-123 in the URL to share a position |
| Filters | By type (error / human / tool call), by agent |
| Time | Relative time ("3 minutes ago") with absolute time on hover; per-step duration for long tasks |
| Performance | Virtual list for thousands of events; commit new events in batches (once per frame) |
| Follow mode | Auto-follow the newest when the user is at the bottom; stop when they scroll up, and show "N new events" |
3. Flow graph design
| Point | How |
|---|---|
| Nodes are components | A React Flow custom node is a normal React component, so it can show a status icon, duration and retry count |
| Auto layout | React Flow doesn't lay out nodes itself; its docs recommend layout libraries such as dagre or elkjs to compute positions |
| Live coloring | Node state comes from the reducer; update only the nodes that changed |
| Current position | Highlight the running node and pan to it automatically (stop auto-panning once the user drags) |
| Scale | Collapse sub-flows when there are many nodes; at larger scale, show only what's related to the current node |
| Accessibility | A graphical view needs an equivalent text view (timeline or list); never canvas only |
4. Status board design
- 3–5 metric cards at the top: running, waiting for a human, failed (last 24 hours), average duration, cost
- Cards are clickable and lead to the filtered list
- Put "needs attention" first: requests waiting longest, tasks that just failed
- Group by error type to see which errors are most common and locate system problems
- State the definition and time range behind every number
In practice
React Flow custom node (sketch)
tsx
import { ReactFlow, Handle, Position, type NodeProps } from '@xyflow/react'
import '@xyflow/react/dist/style.css'
function StepNode({ data }: NodeProps) {
return (
<div className={`step-node step-node--${data.status}`}>
<Handle type="target" position={Position.Top} />
<StatusIcon status={data.status} />
<span>{data.label}</span>
{data.attempt > 1 && <small>retry {data.attempt}</small>}
<Handle type="source" position={Position.Bottom} />
</div>
)
}
const nodeTypes = { step: StepNode } // defined outside the component so it isn't recreated on every render
export function StepGraph({ nodes, edges }) {
return <ReactFlow nodes={nodes} edges={edges} nodeTypes={nodeTypes} fitView />
}Follow the current React Flow docs for the API. Vue projects can use Vue Flow; the concepts map closely, but the exact API is to be verified.
Batching high-frequency events
ts
const buffer: TaskEvent[] = []
let scheduled = false
function onEvent(e: TaskEvent) {
buffer.push(e)
if (!scheduled) {
scheduled = true
requestAnimationFrame(() => {
dispatch({ type: 'batch', events: buffer.splice(0) }) // one update per frame
scheduled = false
})
}
}Common pitfalls
- Each view fetches and computes state on its own: the timeline and graph disagree. Use one reducer.
nodeTypesdefined inside the component: a new object on every render; React Flow warns and rebuilds nodes.- Auto-scroll steals the user's position: they get yanked to the bottom while reading older events.
- A graph with no text equivalent: screen reader and small-screen users can't use it; the graph needs an equivalent list or timeline view.
- Status board numbers without a definition: is "12 failed" today or all time?
- Every timeline event looks equally important: errors and human requests must stand out visually.
Common interview questions
- Which question does each of timeline, flow graph and status board answer?
- How does the front end drive several views from one event stream? How do you handle out-of-order and duplicate events?
- How do you keep a timeline with thousands of live events smooth?
- How do you lay out nodes in React Flow? What if there are many nodes?
- How do you make a flow graph accessible?
Related projects
- Agent Run Console: the timeline,
@xyflow/reactflow graph and agent swimlanes in D6–10; the multi-task status board in the extensions. - The timeline's data model corresponds to the back end's Traces and LLM call records.
Sources
- React Flow docs / Custom Nodes / Layouting
- npm: @xyflow/react
- npm: @vue-flow/core
- MDN: Using server-sent events — the
idfield andLast-Event-ID - MDN: requestAnimationFrame
- TanStack Virtual docs
