affectUI › Components › Agents
Run Transit
An agent carrying a job from one place to another like a flight on its way – where it comes from, where it goes, the time left and a bar its pixel mark rides on.
Part of affectUI Pro. Install: npx shadcn@latest add https://www.affectui.com/r/run-transit.json · Import from @/components/ui/run-transit
When to use
- An agent moves something from one place to another – a migration, a sync, an import, a deploy – and people want to see how far it is and when it lands
- A dashboard tile for one long-running job, next to other agent tiles
When not to use
- Many tasks at once – use Fan-out Grid
- Where the time of one run goes, step by step – use Trace Waterfall
- A task travelling through several agents – use Handoff Relay
Usage
import { RunTransit } from "@/components/ui/run-transit";
<RunTransit
title="Customer migration"
from={{ code: "Postgres", label: "prod-eu-1" }}
to={{ code: "Supabase", label: "eu-central-1" }}
progress={0.62}
eta={5 * 60_000}
agent={{ id: "migrator", name: "Migrator" }}
onAction={() => openRun()}
/>Props
| Name | Type | Default | Description |
|---|---|---|---|
from / to | { code: string; label?: string } | Where the job comes from and where it goes – a large name and a muted line under it | |
progress | number | How far it is, 0 to 1 | |
eta | number | Time left in ms – shown in the pill while it runs | |
took | number | How long it took in ms – shown in the pill once it's done | |
status | "running" | "paused" | "done" | "failed" | "running" | Running sweeps a light over the bar; paused rests; done fills it; failed turns it pink |
agent | { id: string; name: string } | The agent doing it – its id picks the pixel mark that rides at the head of the bar | |
title | string | "Run Transit" | Heading on the frame |
icon | ReactNode | A small mark before the title – defaults to a route, in cyan | |
actionLabel / onAction | string / () => void | "Open" | The button on the top right – it shows when onAction is given |
className | string | Extra class on the root |
Keyboard
- Tab: Moves to Open
Accessibility
- The bar is a progressbar with its percentage; its label says who carries what where and how long is left
- Open is a plain button with a visible focus ring
Responsive
- Built on a container query; under 360px the names get smaller and the card tighter
- Long names end in an ellipsis and show in full on hover
- Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"
Requirements
- React 19
Related
- Handoff Relay – One task passed from agent to agent like a baton, played back live – every agent a tile with its pixel mark that fills in as the baton travels, and a log of the run
- Fan-out Grid – One agent hands a big job to many workers – every task a cell on a live grid that fills in as they get through it, with retries, failures, cost and the time left
- Trace Waterfall – Where the time and money of an agent run go – every LLM call, tool call and sub-agent as a bar on a live timeline, with cost per step and the slowest call marked
- Agent Timing – An agent run as a timing diagram – a signal line per agent that steps up when it thinks or calls a tool, with hand-offs drawn straight between rows