Captain UI

Run timeline

An agent run you can scrub. Drag the playhead and the step, the files touched and the money spent replay at that moment; let go mid-flick and the run rolls on and settles.

npx shadcn@latest add @captain/run-timeline
Pro

Read billing/invoice.ts and 3 callers

Reading, step 0 of 10

$0.00

2:04 of 4:12

billing/invoice.tsapi/routes/invoices.tsweb/app/billing/page.tsxbilling/rounding.tsbilling/rounding.test.tsbilling/invoice.test.ts

Usage

import { RunTimeline } from "@/components/ui/run-timeline"

<RunTimeline events={run.events} duration={run.seconds} />

Props

PropTypeDefaultWhat it does
eventsRunEvent[]{ at (seconds), kind: read | think | edit | run | ask, label, cost (cumulative $), files }.
durationnumberRun length in seconds.
defaultTimenumberWhere the playhead starts. Defaults to the end.
onTimeChange(t: number) => voidEvery frame while scrubbing or replaying.

Keyboard

← →
One second (Shift: ten)
[ ]
Previous or next step
Home / End
Start or end
Space
Replay or pause

Accessibility

  • role=slider with aria-valuetext that reads the time, the step and the spend.
  • The readout re-renders only when a second, a cent or the step changes, never per pointer event.
  • Under reduced motion a release stops dead and key jumps are instant.