Every run of an automation, its status, and each step's result.
| Status | Run | Trigger | Started | Duration | Cost | Actions | |
|---|---|---|---|---|---|---|---|
| Failed | The CRM refused the request: rate limit exceeded. | Webhook | 4.2 sec | 2 tasks | |||
| Running | For Ada Lovelace | Webhook | |||||
| Succeeded | Schedule | 2.1 sec | 3 tasks | ||||
| Skipped | Filtered: the lead has no email | Webhook |
import { UiSchema } from "@effect/ui"import { Html } from "@effect/ui/html"import * as stylex from "@stylexjs/stylex"import { Schema } from "effect"import { RunHistory, type RunSummary } from "./ui/uicontext/components/kit/Runs.ts"import { sx } from "./ui/uicontext/components/Sx.ts"const styles = stylex.create({ frame: { inlineSize: "100%" },})const runs: ReadonlyArray<RunSummary> = [ { id: "run-41", title: "New lead to CRM", status: "failed", reason: "The CRM refused the request: rate limit exceeded.", trigger: "Webhook", startedAt: "2026-11-29T15:02:00Z", durationMs: 4200, cost: { value: 2, unit: "tasks" }, sideEffects: true, can: ["replay", "replayFromStart", "delete"], }, { id: "run-40", title: "New lead to CRM", status: "running", trigger: "Webhook", onBehalfOf: { id: "ada", name: "Ada Lovelace", kind: "person" }, startedAt: "2026-11-29T15:10:00Z", can: ["stop"] }, { id: "run-39", title: "Weekly digest", status: "succeeded", trigger: "Schedule", startedAt: "2026-11-28T09:00:00Z", durationMs: 2100, cost: { value: 3, unit: "tasks" }, can: ["replay", "delete"] }, { id: "run-38", title: "New lead to CRM", status: "skipped", reason: "Filtered: the lead has no email", trigger: "Webhook", startedAt: "2026-11-28T08:12:00Z", can: ["delete"] },]const Message = UiSchema.TaggedEnum({ OpenedRun: { id: Schema.String }, StoppedRun: { id: Schema.String }, DeletedRuns: { ids: Schema.Array(Schema.String) },})export const AutomationRuns = Html.component({ name: "AutomationRuns", model: Schema.Struct({ selected: Schema.NullOr(Schema.String), stopped: Schema.Array(Schema.String), deleted: Schema.Array(Schema.String) }), message: Message,}).make({ init: () => ({ selected: "run-41", stopped: [], deleted: [] }), update: { OpenedRun: ($, { id }) => $.evolve({ selected: id }), StoppedRun: ($, { id }) => $.evolve({ stopped: (s) => [...s, id] }), DeletedRuns: ($, { ids }) => $.evolve({ deleted: (d) => [...d, ...ids] }), }, view: (h, { selected, stopped, deleted }) => h.div.attrs(sx(styles.frame)).children( RunHistory(h, { props: { label: "Run history", status: "ready", timeZone: "Europe/London", selected, selectable: true, runs: runs .filter((run) => !deleted.includes(run.id)) .map((run) => (stopped.includes(run.id) ? { ...run, status: "stopped", reason: "Stopped by you", can: ["replay", "delete"] } : run)), }, onEmit: { RequestedOpen: ({ id }) => Message.OpenedRun({ id }), RequestedStop: ({ id }) => Message.StoppedRun({ id }), RequestedDelete: ({ ids }) => Message.DeletedRuns({ ids }), RequestedMore: () => undefined, RequestedReplay: () => undefined, }, }), ),})Installation
pnpm dlx shadcn@latest add checkfu/uicontext/runsUsage
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
FailedThe CRM refused the request: rate limit exceeded.
- Started
- Trigger
- Webhook
- Duration
- 4.2 sec
- Cost
- 2 tasks
Read the lead0.3 sec
Result{ "name": "Grace Hopper", "email": "[email protected]" }
- Create the contactRate limit exceeded
- Look the company up on the web: Web access is off for this automation Open the setting
import { Html } from "@effect/ui/html"import * as stylex from "@stylexjs/stylex"import { Schema } from "effect"import { RunDetail, type RunStep, type RunSummary } from "./ui/uicontext/components/kit/Runs.ts"import { sx } from "./ui/uicontext/components/Sx.ts"const styles = stylex.create({ frame: { inlineSize: "min(100%, 40rem)" },})const run: RunSummary = { id: "run-41", title: "New lead to CRM", status: "failed", reason: "The CRM refused the request: rate limit exceeded.", trigger: "Webhook", startedAt: "2026-11-29T15:02:00Z", durationMs: 4200, cost: { value: 2, unit: "tasks" }, can: ["replay", "replayFromStart"],}const steps: ReadonlyArray<RunStep> = [ { id: "read", title: "Read the lead", status: "succeeded", durationMs: 300, output: '{ "name": "Grace Hopper", "email": "[email protected]" }' }, { id: "enrich", title: "Look the company up on the web", status: "refused", reason: "Web access is off for this automation", reasonHref: "#settings" }, { id: "create", title: "Create the contact", status: "failed", reason: "Rate limit exceeded", durationMs: 3900 },]export const FailedRun = Html.component({ name: "FailedRun", model: Schema.Struct({}), message: Schema.Never,}).make({ init: () => ({}), update: ($) => $.model, view: (h) => h.div.attrs(sx(styles.frame)).children( RunDetail(h, { props: { run, steps, timeZone: "Europe/London" }, onEmit: { RequestedReplay: () => undefined, RequestedReplayFromStep: () => undefined, RequestedFix: () => undefined, RequestedStop: () => undefined }, }), ),})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
FailedStep 3B.1, Send email: the Mail account’s sign-in expired.
- Started
- Trigger
- Form response
- Duration
- 1.6 sec
- Version
- v3
1. New form response
Result{ "name": "Tomas Reyes", "company_size": "38" }2. Only continue if Email exists
Result{ "passed": true }3. Split by company size
Result{ "path": "Everyone else" }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" }
- 3B.1. Send emailMail refused the request: the sign-in expired on Nov 24.
import { UiSchema } from "@effect/ui"import { Html } from "@effect/ui/html"import * as stylex from "@stylexjs/stylex"import { Schema } from "effect"import { RunDetail, type RunStep, type RunSummary } from "./ui/uicontext/components/kit/Runs.ts"import { sx } from "./ui/uicontext/components/Sx.ts"import { color, font } from "./ui/uicontext/components/tokens.stylex.ts"const styles = stylex.create({ frame: { inlineSize: "min(100%, 40rem)", display: "flex", flexDirection: "column", gap: 12 }, said: { margin: 0, fontSize: font.sm, color: color.muted },})const run: RunSummary = { id: "run-88", title: "New lead intake", status: "failed", reason: "Step 3B.1, Send email: the Mail account’s sign-in expired.", trigger: "Form response", startedAt: "2026-11-30T13:42:00Z", durationMs: 1610, version: "v3", sideEffects: true, can: ["replay", "replayFromStart", "replayFromStep", "delete"],}const steps: ReadonlyArray<RunStep> = [ { id: "form", title: "1. New form response", status: "succeeded", output: '{\n "name": "Tomas Reyes",\n "company_size": "38"\n}' }, { id: "filter", title: "2. Only continue if Email exists", status: "succeeded", output: '{ "passed": true }' }, { id: "size", title: "3. Split by company size", status: "succeeded", output: '{ "path": "Everyone else" }' }, { id: "reply", title: "3B.1. Send email", status: "failed", reason: "Mail refused the request: the sign-in expired on Nov 24.", input: '{\n "To": "[email protected]",\n "Subject": "Thanks for getting in touch, Tomas Reyes"\n}', fix: { label: "Reconnect Mail" }, }, { id: "log", title: "4. Add row", status: "skipped", reason: "An earlier step failed" },]const Message = UiSchema.TaggedEnum({ Said: { text: Schema.String } })export const FixAStep = Html.component({ name: "FixAStep", model: Schema.String, message: Message,}).make({ init: () => "", update: { Said: (_$, { text }) => text }, view: (h, said) => h.div.attrs(sx(styles.frame)).children( RunDetail(h, { props: { run, steps, timeZone: "Europe/London", agentId: "run-fix-demo" }, onEmit: { RequestedFix: ({ step }) => Message.Said({ text: `The app reconnects the account for ${step}.` }), RequestedReplayFromStep: ({ step }) => Message.Said({ text: `The app replays from ${step}, reusing the steps before it.` }), RequestedReplay: ({ from }) => Message.Said({ text: `The app replays from ${from === "start" ? "the start" : "the failed step"}.` }), RequestedStop: () => undefined, }, }), h.p.attrs({ role: "status", ...sx(styles.said) }).children(said), ),})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.
import type { Html } from "@effect/ui/html"import * as stylex from "@stylexjs/stylex"import { RunHistory } from "./ui/uicontext/components/kit/Runs.ts"import { sx } from "./ui/uicontext/components/Sx.ts"const styles = stylex.create({ stack: { display: "grid", gap: 24, inlineSize: "100%" },})const ignore = { RequestedOpen: () => undefined, RequestedReplay: () => undefined, RequestedStop: () => undefined, RequestedDelete: () => undefined, RequestedMore: () => undefined }export const RunsLoadingAndEmpty = <M>(h: Html.H<M>) => h.div.attrs(sx(styles.stack)).children( // while the first page loads RunHistory(h, { key: "loading", props: { label: "Invoice sync runs", status: "loading", runs: [], timeZone: "UTC" }, onEmit: ignore, }), // an automation that hasn't run yet says what will start it RunHistory(h, { key: "empty", props: { label: "Weekly digest runs", status: "ready", runs: [], timeZone: "UTC", hideColumns: ["cost"], empty: { title: "No runs yet", hint: "It runs every Monday at 9:00, or when you press Test." }, }, onEmit: ignore, }), )API reference
RunHistoryComponent
Props
| Name | Type | Default | Description |
|---|---|---|---|
runsrequired | RunSummary[] | — | The runs to list, newest first |
statusrequired | "loading" | "ready" | — | loading shows placeholder rows |
labelrequired | string | — | What the list is of, for screen readers and agents: "Automation history" |
timeZonerequired | string | — | The person's time zone (IANA) |
locale | string | — | The locale dates and numbers are formatted in; the browser's by default |
selected | string | null | — | The run whose detail is open |
selectable | boolean | — | 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 |
notice | Notice | 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 |
more | boolean | — | Older runs exist beyond these: shows "Load older runs" |
loadingMore | boolean | — | Older runs are loading |
agentId | string | runs:<label> | The id agents know this list by; runs:<label> by default |
Events
| Event | Payload | Description |
|---|---|---|
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
| Action | Description |
|---|---|
ClickedRun | Open a run's detail by id |
ToggledRun | Tick or untick a run for a bulk action |
ClickedReplay | Replay a run, from the failed step or from the start. With side effects this opens a confirmation. |
ClickedStop | Stop a queued or running run |
ClickedDelete | Ask to delete a run (opens the confirmation) |
ClickedReplayChecked | Replay the ticked runs |
ClickedDeleteChecked | Ask to delete the ticked runs |
ConfirmedActionasks first | Confirm the replay or delete waiting for confirmation. Name it as your target. |
RunDetailComponent
Props
| Name | Type | Default | Description |
|---|---|---|---|
runrequired | RunSummary | — | The run's status, trigger, start and duration |
stepsrequired | RunStep[] | — | Each step's status, input and output, in order |
streaming | boolean | — | Steps are still arriving |
timeZonerequired | string | — | The person's time zone (IANA) |
locale | string | — | The locale dates and numbers are formatted in; the browser's by default |
agentId | string | run:<id> | The id agents know this run by; run:<id> by default |
Events
| Event | Payload | Description |
|---|---|---|
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
| Action | Description |
|---|---|
ClickedReplay | Replay this run from the failed step or from the start. With side effects this opens a confirmation. |
PickedReplayFrom | Replay this run from a step by id, reusing what the steps before it returned |
ClickedFix | Open the fix for a failed step by id |
ClickedStop | Stop this run |
ConfirmedReplayasks first | Confirm 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.