Run History
Every past run: how it ended, how long it took, what it cost.
PROGet Run History and 168 other Pro components with pro lifetime — Get Pro
- Category
- AI Agent
- Access
- ProPro · unlocked
- Source
- 364 lines · one file
- States
- 5 drawn
The decision inside it
The strip is one bar per run
The strip is drawn in shades of grey with a failed run as the darkest bar, so it stands out without adding colour. The bar's height is how long the run took, so a slow day and a failing day look different.
When to use it
Use Run History for past agent runs: three headline numbers, a strip of recent runs in grey shades, filter tabs and a table with open, rerun and cancel. Pass runs; it works out the rest.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Liro's Run History for this.
Install it: npx shadcn@latest add @liro/run-history
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/run-history.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @liro registry with your CLI token: see the Namespaced tab.
Usage
import { RunHistory, type AgentRun } from "@/components/ui/run-history";
export function Runs({ runs, open, rerun }: { runs: AgentRun[]; open: (id: string) => void; rerun: (id: string) => void }) {
return <RunHistory runs={runs} onOpen={(run) => open(run.id)} onRerun={(run) => rerun(run.id)} pageSize={10} />;
}API reference
“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Type | Notes | ||
|---|---|---|---|
runs | AgentRun[] | Yes | – |
onOpen | (run: AgentRun) => void | No | – |
onRerun | (run: AgentRun) => void | No | – |
onCancel | (run: AgentRun) => void | No | Offered on runs that are still live. |
title | React.ReactNode | false | No | The heading. Pass `false` to hide it. |
summary | boolean | No | Show the three numbers and the strip of recent runs. Default true. |
pageSize | number | No | Rows per page. Default 8. |
currency | string | No | ISO 4217 code for the cost column. Default "USD". |
now | Date | number | No | "Now", for the relative times. Defaults to the moment it renders. |
Dependencies
npm packages
clsxframer-motionlucide-reacttailwind-mergeLiro foundations, installed alongside it
liro-themeagent-run-statusbuttondata-tabledropdown-menustatetabsStates
All of them are drawn by the component. None is left for you to design.
- With runs
- Filtered
- No matches
- Empty
- Live run
Accessibility
- Keyboard reachable throughout, in visual order
- Focus trapped in overlays, Escape closes them
- Focus returns to whatever opened it
- Live regions announce what changed, not that something did
- Honours prefers-reduced-motion
Responsive behavior
- Sizes to its container, not the viewport
- Usable from 320px up
- Pointer-based interaction, so trackpad and touch both work
- No hover-only affordances