Run status
The state of a whole agent run for a header or thread row: idle, running, waiting for input, done, failed or stopped, with elapsed time.
On this page
Idle, running, waiting for input, done, failed and stopped.
Installation
Usage
import { RunStatus } from "@/components/ui/chatcn/run-status"
<RunStatus status={awaitingApproval ? "waiting" : "running"} startedAt={run.startedAt} />
<RunStatus status="done" durationMs={run.durationMs} variant="plain" />Props
| Prop | Type | Notes |
|---|---|---|
status | "idle" | "running" | "waiting" | "done" | "failed" | "stopped" | |
label | ReactNode | Replaces the default label |
startedAt, durationMs | number | Measured automatically when omitted |
showElapsed | boolean | Default true |
variant | "badge" | "plain" | Plain for surfaces that already have a fill |
Accessibility
- The label is a polite live region, so Waiting for input and Failed are announced. The ticking time is not.
- Every status has an icon and a word. Failed is red text next to a red cross, never color alone.
Motion
- The glyph crossfades over 150 ms when the status changes, never on first paint.