Skip to content
GitHub (opens in a new tab)
BillingScreen

Incident timeline

The war room for a live billing incident: impact, owner and every event on one timeline.

What a screen is

A screen is a whole page exported from the kit, built only from kit components and tokens. Import it once, pass your data and callbacks, and render it as the page: it brings its own nav and <main>, and its loading and empty states are built in. A pattern is the copy-in version you own and change; a block is one area that sits inside your <main>.

When to use

  • a live incident that costs money, like a failed payment run, where people and agents work it together
  • the team needs one shared record of what happened, in order, with who did it
  • an agent proposes a fix that a person must approve before it runs
  • the incident is over and the postmortem summary should lead the page

When not to use

  • the morning overview of everything at risk — BillingOpsCommandCenterScreen
  • the steps of one agent run — RunHandoffs or RunDetail
  • every action across the workspace — AuditLogScreen
  • a queue of approvals across the product — NotificationsInboxScreen or AgentInbox

Usage

The header says how bad it is, where it stands, how long it has been open and who owns it, with one primary action that moves it on. Under it, the impact: charges not sent, money at risk, customers affected and what is recovered so far. The timeline is the hero: every system event, agent action, person's action and comment on one rail, split by Detected, Mitigated and Resolved, and each one opens with its tool call, payload and logs. When an agent proposes a fix, a person approves it from the timeline. Beside it, the affected customers, the follow-up tasks and the notes. A resolved incident shows its postmortem on top. Import it once and pass your data and callbacks.

<IncidentTimelineScreen incident={incident} metrics={impact} events={events} proposal={proposal} affected={affected} affectedTotal={386} tasks={tasks} comments={notes} members={members} currentUserId={me.id} postmortem={postmortem} onStatusChange={setStatus} onApprove={approve} onDeny={deny} onAction={(action, id) => handle(action, id)} onComment={addNote} onNavigate={(to, detail) => go(to, detail)} workspace={{ name: "Northwind" }} user={{ id: "alex", name: "Alex Morgan" }} />
import { IncidentTimelineScreen } from "agentic-ds-kit";

export default function IncidentPage({ data, loading, error }) {
  // The screen renders its own app nav and <main>: don't wrap it in another main.
  return (
    <IncidentTimelineScreen
      incident={data.incident}                 // title, severity, status, startedAt, mitigatedAt, resolvedAt, owner
      metrics={data.impact}                    // charges not sent, at risk, customers affected, recovered
      events={data.events}                     // system, agent and person events; newest first on the rail
      proposal={data.proposal}                 // an agent fix that waits for a person
      affected={data.affected}
      affectedTotal={data.customersAffected}
      tasks={data.followUps}
      comments={data.notes}
      members={data.people}
      currentUserId={me.id}
      postmortem={data.postmortem}             // shown on top once resolved
      onStatusChange={(status) => save({ status })}
      onApprove={(id) => approve(id)}
      onDeny={(id) => deny(id)}
      onAction={(action, id) => handle(action, id)} // mark-mitigated | resolve | share-postmortem | complete-task | reopen-task
      onComment={(body) => addNote(body)}
      onNavigate={(to, detail) => (to === "run" ? router.push(`/runs/${detail.runId}`) : router.push(`/${to}`))}
      loading={loading}
      error={error}                            // { title, reference? }: LoadError with Try again
      onRetry={refetch}
      workspace={{ name: "Northwind" }}
      user={{ id: me.id, name: me.name, email: me.email }}
    />
  );
}

Props

IncidentTimelineScreen props, from the screen contract.
PropTypeDefaultNotes
incidentobject—{ id, runId, title, severity: "sev1" | "sev2" | "sev3", status: "investigating" | "mitigated" | "resolved", startedAt, mitigatedAt?, resolvedAt?, owner: { id, name, initials?, src? } } startedAt, mitigatedAt and resolvedAt (epoch ms or ISO) place the Detected, Mitigated and Resolved markers on the timeline and set the duration. Mark mitigated and Resolve incident move the screen on by themselves (stamping the missing time from the clock) and call onStatusChange. Sample PR-2291 when omitted.
metricsarray—{ id, label, value, hint?, delta?, trend?, goodWhen?, meter?: { value, max, label } }[] The impact strip, formatted by you: charges not sent, at risk, customers affected, recovered so far (with a meter of recovered against at risk). Sample figures when omitted.
eventsarray—{ id, at, actor: { id, name, kind: "system" | "agent" | "person", initials? }, sentence, meta, reason?, proposalId?, detail?: { facts?: { label, value }[], toolCall?: { name, summary?, status: "done" | "error", duration?, args?, result?, error?, attempt? }, payload?, logs? } }[] Everything that happened, any order; shown newest first. meta names the actor and its kind in words ("Payments agent · Agent · Payment runs"), since the rail Avatar is hidden from screen readers. A comment is a person's event ("Commented: …"). proposalId makes Open show the ApprovalCard. [] shows kit Empty "No events yet". Sample events when omitted.
proposalobject—{ id, agent, title, description?, risk: "low" | "medium" | "high", action: ApprovalCardAction, facts?, status?: "pending" | "approved" | "denied" } | null An agent proposal that waits for a person. While pending and investigating: the warning Alert, and the header primary is Review proposal. Approve or Deny in the Drawer's ApprovalCard calls onApprove or onDeny and says so in a Toast; the event's reason then reads Approved or Denied.
affectedarray—{ id, customer, charges, amount, status: "not-sent" | "retrying" | "recovered" | "declined", meta? }[] The Affected tab. amount is in US dollars. Sample rows when omitted; [] shows kit Empty.
affectedTotalnumber—How many customers in all, for the group line "Largest 8 of 386".
tasksarray—{ id, title, owner: { id, name, initials?, src? }, due?, done? }[] The Actions tab. Done and Reopen toggle a task, call onAction("complete-task" | "reopen-task", id) and say so in a Toast. The tab's count is the open tasks.
commentsarray—CommentThread comments The Notes tab. Comment adds the note to the thread and calls onComment(body). The tab's count is the notes.
membersarray—CommentThread members for @mentions.
currentUserIdstring—Your notes get Edit and Delete.
postmortemobject—{ summary, cause, impact, fix } | null Shown on top when the status is resolved; with none, the Postmortem Card shows kit Empty.
nownumber—Epoch ms: the clock at first render. The duration counts on from it once a minute. Default the time of first render (the sample's own time with sample data).
onStatusChangefunction—(status) => void, from Mark mitigated and Resolve incident.
onApprovefunction—(proposalId) => void.
onDenyfunction—(proposalId) => void.
onOpenfunction—(kind: "event" | "proposal", id) => void. An event or the proposal opened in the Drawer.
onActionfunction—(action, id?) => void. "mark-mitigated", "resolve" and "share-postmortem" from the header; "complete-task" and "reopen-task" with the task id.
onCommentfunction—(body) => void.
onNavigatefunction—(destination, detail?) => void. An app nav row ("overview" | "customers" | "invoices" | "subscriptions" | "agents"), "billing-ops" from the breadcrumb, or "run" ({ runId }) from Open run.
workspaceobject—{ name: string, icon?: KitIcon } App nav brand. Northwind when omitted.
userobject—{ id?, name, email?, src? } Account menu at the foot of the app nav (kit DropdownMenu: the avatar on the rail, the account card in the Drawer, both with src as the photo and an online presence mark; the menu holds View profile, Account settings, Documentation, Switch account with a sample second account, Add account and Sign out, all samples that only close the menu except Account settings, which goes to a Settings row when the screen has one), and the author of new notes.
loadingbooleanfalseThe title stays and the primary is disabled; Skeletons for the impact strip, the timeline and the rail; main is aria-busy.
errorobject—{ title, reference? } | null kit LoadError in place of the page body with the reference and Try again (onRetry). The nav and title stay; the primary is disabled.
onRetryfunction—() => void. Try again on the LoadError.
classNamestring—On the root layout-shell.

States

  • page: default, loading, empty, awaiting-approval, mitigated, resolved, error
  • status: investigating (default: warning Investigating Badge, Open with a live duration, the primary Mark mitigated), awaiting approval (warning Alert with Review; the primary Review proposal opens the ApprovalCard), mitigated (info Mitigated Badge, a Mitigated marker on the timeline, the primary Resolve incident), resolved (success Resolved Badge, Resolved in with the fixed duration, the Postmortem Card on top, the primary Share postmortem)
  • timeline: events newest first, with Detected, Mitigated and Resolved markers, agent, person and system events told apart by the rail Avatar and by the meta words, an event opened (Drawer with who, when, phase, tool call, payload and logs), the proposal opened (Drawer with the ApprovalCard; Approve is the Drawer's one solid primary), empty (events [] : kit Empty "No events yet")
  • rail: Affected (customers with a status Badge; [] shows kit Empty), Actions (tasks with To do or Done; Done and Reopen toggle them), Notes (CommentThread; Comment is soft because the header has the solid primary)
  • layout: the timeline beside the rail, the rail sticky (--grid-breakpoint-lg and wider), the rail under the timeline (below --grid-breakpoint-lg), the nav in a left Drawer (below --grid-breakpoint-md), the impact strip two by two, the timeline's time column folded into the meta line, the Drawer full screen (below --grid-breakpoint-sm)

Accessibility

  • Renders its own main landmark named by the incident title; the app SideNav is an aside named App. Don't wrap the screen in another main
  • PageHeader title is the page h1; Card titles are h2
  • Severity, status, phases, affected status and task status are words in Badges, never colour alone
  • The impact strip is a Scoreboard named Impact
  • The timeline is an ordered list per day; each step reads its time, sentence, meta and reason; marker rows read their label and time; the rail Avatar is hidden, so meta names the actor and its kind
  • Open on each event is named Open plus the event's sentence
  • The rail is an aside named Incident details with kit Tabs; tab counts are part of the tab names
  • The Drawer returns focus on close; Toasts are role=status
  • loading sets aria-busy on main
  • The duration updates once a minute without announcing; no motion of its own

Responsive

  • Wide (--grid-breakpoint-lg and wider): SideNav on the canvas, the page on the inset panel, the timeline beside a sticky rail (layout-split--primary)
  • Below --grid-breakpoint-lg: the rail goes under the timeline
  • Below --grid-breakpoint-md: the nav moves into a left kit Drawer behind a Menu IconButton
  • Below --grid-breakpoint-sm: the subtitle line wraps, the impact strip goes two by two, the timeline drops its time column into the meta line and the Drawer fills the screen
  • Dark mode follows the root theme; semantic tokens only

Do not

  • Do not copy the screen's parts into a local cousin; change it through its props or compose the kit pieces yourself
  • Do not wrap it in an app shell or another main
  • Do not add a second solid primary Button; the header has exactly one, the Drawer's ApprovalCard has its own, and Comment in Notes is soft
  • Do not show severity, status or a phase by colour alone
  • Do not use raw hex

Built from

  • Screen
    →

    Billing ops command center

    The morning page for a billing ops lead: what is at risk today, what agents are doing about it, and what needs a person.

  • Block
    →

    Run detail

    One agent run on one screen: clock, cost, pending approval and every step, all following the step you pick.

  • Screen
    →

    Audit log

    Every action by people and agents in the workspace, filterable, with before and after for each change.

  • Screen
    →

    Notifications inbox

    Every notification on one page, grouped by day, and acted on in place.