Run History

Every run of an automation, its status, and each step's result.

Run history
StatusRunTriggerStartedDurationCostActions
Failed
The CRM refused the request: rate limit exceeded.
Webhook4.2 sec2 tasks
Running
For Ada Lovelace
Webhook
Succeeded
Schedule2.1 sec3 tasks
Skipped
Filtered: the lead has no email
Webhook

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/runs

Usage

import { RunHistory } from "./ui/uicontext/components/kit/Runs.ts"import type { RunSummary } from "./ui/uicontext/components/kit/Runs.ts"
const Message = UiSchema.TaggedEnum({	OpenedRun: { id: Schema.String },	ReplayedRuns: { ids: Schema.Array(Schema.String) },})export const InvoiceSyncRuns = (h: Html.H<typeof Message.Type>, runs: ReadonlyArray<RunSummary>, selected: string | null) =>	RunHistory(h, {		props: { label: "Invoice sync runs", status: "ready", runs, selected, timeZone: "Europe/London" },		onEmit: {			RequestedOpen: ({ id }) => Message.OpenedRun({ id }),			RequestedReplay: ({ ids }) => Message.ReplayedRuns({ ids }),			RequestedStop: () => undefined,			RequestedDelete: () => undefined,			RequestedMore: () => undefined,		},	})

Examples

A failed run

One run opened: each step with its input, output and the error that stopped it.

New lead to CRM

Failed
Started
Trigger
Webhook
Duration
4.2 sec
Cost
2 tasks
  1. Read the lead0.3 sec
    Result
    { "name": "Grace Hopper", "email": "[email protected]" }
  2. Look the company up on the web (refused: Web access is off for this automation)
  3. Create the contact: Rate limit exceeded3.9 sec
  • Create the contactRate limit exceeded
  • Look the company up on the web: Web access is off for this automation Open the setting

Fix a failed step

The failed step says what went wrong and offers its fix; replay from it, or pick any step to run again from.

New lead intake

Failed
Started
Trigger
Form response
Duration
1.6 sec
Version
v3
  1. 1. New form response
    Result
    {
      "name": "Tomas Reyes",
      "company_size": "38"
    }
  2. 2. Only continue if Email exists
    Result
    { "passed": true }
  3. 3. Split by company size
    Result
    { "path": "Everyone else" }
  4. 3B.1. Send email: Mail refused the request: the sign-in expired on Nov 24.
    Input
    {
      "To": "[email protected]",
      "Subject": "Thanks for getting in touch, Tomas Reyes"
    }
  5. 4. Add row (skipped: An earlier step failed)
  • 3B.1. Send emailMail refused the request: the sign-in expired on Nov 24.

Loading and empty

status: "loading" while the first page arrives, and an empty title and hint before anything has run.

No runs yet

It runs every Monday at 9:00, or when you press Test.

API reference

RunHistoryComponent

Props

RunHistory props
NameTypeDefaultDescription
runsrequiredRunSummary[]—The runs to list, newest first
statusrequired"loading" | "ready"—loading shows placeholder rows
labelrequiredstring—What the list is of, for screen readers and agents: "Automation history"
timeZonerequiredstring—The person's time zone (IANA)
localestring—The locale dates and numbers are formatted in; the browser's by default
selectedstring | null—The run whose detail is open
selectableboolean—Checkboxes and bulk replay or delete
hideColumns("trigger" | "duration" | "cost")[]—Metadata columns to omit from the history table when the product doesn't show them
noticeNotice | null—A bulk outcome or a refusal: "2 of 5 runs couldn't be replayed: the automation is off."
empty{ title, hint }—What an empty history says, with a hint at what to do next
moreboolean—Older runs exist beyond these: shows "Load older runs"
loadingMoreboolean—Older runs are loading
agentIdstringruns:<label>The id agents know this list by; runs:<label> by default

Events

RunHistory events
EventPayloadDescription
RequestedOpen{ id: string }A row without an href was opened: show its detail
RequestedReplay{ ids: string[]; from: "failed" | "start" }Run these runs again, from their failed step or from the start, after the person confirmed
RequestedStop{ id: string }Stop a run in progress
RequestedDelete{ ids: string[] }Delete these runs, after the person confirmed
RequestedMore{}Load the runs older than these

Agent actions

What agents can do with RunHistory
ActionDescription
ClickedRunOpen a run's detail by id
ToggledRunTick or untick a run for a bulk action
ClickedReplayReplay a run, from the failed step or from the start. With side effects this opens a confirmation.
ClickedStopStop a queued or running run
ClickedDeleteAsk to delete a run (opens the confirmation)
ClickedReplayCheckedReplay the ticked runs
ClickedDeleteCheckedAsk to delete the ticked runs
ConfirmedActionasks firstConfirm the replay or delete waiting for confirmation. Name it as your target.

RunDetailComponent

Props

RunDetail props
NameTypeDefaultDescription
runrequiredRunSummary—The run's status, trigger, start and duration
stepsrequiredRunStep[]—Each step's status, input and output, in order
streamingboolean—Steps are still arriving
timeZonerequiredstring—The person's time zone (IANA)
localestring—The locale dates and numbers are formatted in; the browser's by default
agentIdstringrun:<id>The id agents know this run by; run:<id> by default

Events

RunDetail events
EventPayloadDescription
RequestedReplay{ ids: string[]; from: "failed" | "start" }Run this run again, from its failed step or from the start, after the person confirmed
RequestedReplayFromStep{ id: string; step: string }Run it again from this step, reusing what the steps before it returned
RequestedFix{ id: string; step: string }The person asked for a failed step's fix: open its setup, reconnect its account
RequestedStop{ id: string }Stop the run while it's in progress

Agent actions

What agents can do with RunDetail
ActionDescription
ClickedReplayReplay this run from the failed step or from the start. With side effects this opens a confirmation.
PickedReplayFromReplay this run from a step by id, reusing what the steps before it returned
ClickedFixOpen the fix for a failed step by id
ClickedStopStop this run
ConfirmedReplayasks firstConfirm the replay waiting for confirmation. Name it as your target.

Accessibility

  • The history is a captioned table with times in the reader's time zone.
  • Replaying a run that has side effects, and deleting runs, ask first.
  • Agents must name the runs they replay or delete.

Source