Ballmac UI home

Run Replay

New

Transport controls for replaying a recorded agent run: play and pause, a scrubber with marker dots, step to the previous or next marker, and 0.5 to 4 times speed. It owns the clock so one control can drive a trace, lanes or a log.

v1.0.0Updated Oct 24, 2026Ships with a test
What changed

0:42 / 4:30

Installation

$ pnpm dlx shadcn@latest add @ballmac/run-replay

Usage

import { RunReplay } from "@/components/ballmac/run-replay"

The full example is in the Code tab above.

Examples

Driving Agent Lanes

Planner
Coder
  • Planner hands over to Coder at 0:40
  • Thinking
  • Using a tool
  • Waiting
  • Blocked
  • Done

Select a step to see what happened. Arrow keys move between steps.

0:20 / 2:20

API reference

PropTypeDefault
duration*

Length of the run in seconds.

number—
time

Where playback is, in seconds. Controlled.

number—
defaultTime

Where playback starts, for uncontrolled use.

number0
onTimeChange

Called as the time changes, from playing or from the person.

(time: number) => void—
playing

Whether it is playing. Controlled.

boolean—
defaultPlaying

Whether it starts playing. Playback never starts by itself unless you ask.

booleanfalse
onPlayingChange

Called when play or pause changes.

(playing: boolean) => void—
markers

Points of interest to jump between: a failure, a handoff, an approval.

ReplayMarker[][]
speeds

Speeds to offer.

readonly number[]SPEEDS
formatTime

Turns seconds into text. Defaults to m:ss.

(seconds: number) => stringclock

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
TabPrevious marker, Play or Pause, Next marker, the speeds, the scrubber, then each marker
Space / EnterToggles play and pause
ArrowRight / ArrowLeft on the scrubberMoves one second (native range input); Home and End go to the ends
Screen readersThe scrubber reads '1:12 of 4:30'; a polite note says which marker playback just reached

Use with AI

duration in seconds; time / defaultTime / onTimeChange; playing / defaultPlaying / onPlayingChange; markers [{ time, label }]; speeds (0.5, 1, 2, 4). It only keeps the clock and renders controls; read `time` to show the run. Playback never starts by itself. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Run Replay (@ballmac/run-replay) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Debugging a finished agent run by watching it unfold
  • Letting people scrub a recorded session next to its trace or logs

Not for

  • Playing audio or video; use video-dialog or audio-player
  • A live run; use trace or agent-lanes with now

Registry JSON: https://ui.ballmac.com/r/run-replay.json

Credits

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.