Skip to content
Sign upPro
Chat layoutsAgent timeline layoutMenu

Agent timeline layout (Pro)

ProIncluded in $99

A long running agent's thread as a timeline, with honest gaps between steps and a composer that steers without stopping the run.

ProAn overnight helpdesk migration as a timeline: an approval, a human reply, a pause at dawn, and the finish while you watch.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/agent-timeline-layout

Needs chatcn Pro

This command works with a Pro license, along with every Pro component.

Or start free: sign up and get three Pro components on us, with a new one every month.

Usage

tsx
import { AgentTimelineLayout } from "@/components/ui/chatcn/pro/agent-timeline-layout"

<AgentTimelineLayout
  title="Helpdesk migration"
  events={events}
  status={run.status}
  startedAt={run.startedAt}
  onSend={steer}
  onStop={run.stop}
/>

Agents that run for hours do not fit a chat transcript. Here each step sits on a rail with its time and a mark for its kind (an update, a tool, a wait for someone, a human reply, a milestone, an error) in the kit's status colors. Time is honest: when more than gapMs passes between two steps, the rail turns dashed and says how long, so a run that took a night reads like one; a new day gets a label. While the run is going, the latest step shows as in progress and the header counts how long it has been running. Waits can carry actions inline, such as Approve. The composer always sends, so steering never stops the run; Stop is its own button in the header.

Examples

States

ProWaiting on a person with actions inline, running, and a failed step with the fix.

Props

PropTypeNotes
eventsTimelineEvent[]{ id, at, kind, title, detail?, state?, actions? }; kind is "update" | "tool" | "wait" | "human" | "milestone" | "error"
titleReactNodeThe run's name
statusLayoutChatStatusstreaming or submitted while the agent works
startedAtDate | string | numberFor the elapsed time in the header
gapMsnumberLonger gaps show as dashed stretches. Default 20 minutes
onSend, onStop(text) => void, () => voidSteer, and stop the run
now, timeZone, localeA fixed clock and formatting, for previews
value, onValueChangestringThe draft, controlled or not
labelsPartial<AgentTimelineLabels>Every string, for translation

Keyboard

KeyAction
Enter, Shift EnterSend a steer, new line
TabReach actions on a waiting step, then Stop run

Accessibility

  • The timeline is an ordered list; each step's time is a time element with the full date.
  • Status is shown by color, an icon and the words in the step, never color alone.
  • Gaps are written out (3 h later), not only drawn.

Motion

A new step enters with a short rise at the bottom of the list, which stays scrolled to the latest step unless the reader has scrolled up. Under reduced motion steps appear in place.