Blocks / Run detail

Run detail

One run: its steps as a waterfall, the error and log of a failure, input and output as JSON.

import { RunDetail } from "@forgeron/ui";
/01 → A failed run
Failed#12112026-11-18 09:15:021.8 sSchedule · Weekdays at 09:15
Fetch carrier ratesFailed · 1.6 s · 3 tries
import {
  Clock01Icon,
  Database01Icon,
  GlobeIcon,
  Message01Icon,
  RefreshIcon,
} from "@forgeron/icons";
import { Button, Icon, RunDetail } from "@forgeron/ui";

export default function AFailedRun() {
  return (
    <div style={{ width: "100%", maxWidth: 820 }}>
      <RunDetail
        run={{
          id: "1211",
          status: "error",
          at: "2026-11-18 09:15:02",
          durationMs: 1840,
          trigger: { label: "Schedule · Weekdays at 09:15", icon: Clock01Icon },
        }}
        actions={
          <Button size="sm" variant="ghost">
            <Icon icon={RefreshIcon} size={12} variant="mono" />
            Replay
          </Button>
        }
        onRetry={() => {}}
        steps={[
          {
            id: "t",
            name: "Schedule",
            icon: Clock01Icon,
            status: "success",
            startMs: 0,
            durationMs: 3,
            items: 1,
            output: { firedAt: "2026-11-18T09:15:00+01:00" },
          },
          {
            id: "q",
            name: "Open orders",
            icon: Database01Icon,
            status: "success",
            startMs: 3,
            durationMs: 212,
            items: 14,
            input: { firedAt: "2026-11-18T09:15:00+01:00" },
            output: [
              { order: "SO-4418", weight: 212, to: "Grenoble" },
              { order: "SO-4419", weight: 18, to: "Lyon" },
            ],
          },
          {
            id: "h",
            name: "Fetch carrier rates",
            icon: GlobeIcon,
            status: "error",
            startMs: 215,
            durationMs: 1620,
            attempts: 3,
            input: { order: "SO-4418", weight: 212, to: "Grenoble" },
            error: {
              code: "UPSTREAM_503",
              message: "Geodis answered 503 Service Unavailable three times.",
              log: [
                "09:15:02.21 GET /v2/rates → 503 (412 ms)",
                "09:15:02.83 retry 2 → 503 (398 ms)",
                "09:15:03.84 retry 3 → 503 (402 ms)",
              ],
            },
          },
          { id: "c", name: "Post the cheapest", icon: Message01Icon, status: "skipped" },
        ]}
      />
    </div>
  );
}
/02 → A successful run
Succeeded#12122026-11-18 10:42:07612 msDeal moved to Won
Send itSucceeded · 284 ms · 1 item
Output
{
  "messageId": "<4182@relay>"
}
import { GitForkIcon, Invoice01Icon, Mail01Icon, TrophyIcon } from "@forgeron/icons";
import { RunDetail } from "@forgeron/ui";

export default function ASuccessfulRun() {
  const deal = { id: 4182, name: "Transalp", amount: 9600 };
  return (
    <div style={{ width: "100%", maxWidth: 820 }}>
      <RunDetail
        run={{
          id: "1212",
          status: "success",
          at: "2026-11-18 10:42:07",
          durationMs: 612,
          trigger: { label: "Deal moved to Won", icon: TrophyIcon },
        }}
        steps={[
          {
            id: "t",
            name: "Deal moved to Won",
            icon: TrophyIcon,
            status: "success",
            startMs: 0,
            durationMs: 4,
            items: 1,
            output: deal,
          },
          {
            id: "if",
            name: "Above €5,000?",
            icon: GitForkIcon,
            status: "success",
            startMs: 4,
            durationMs: 1,
            items: 1,
            input: deal,
            output: { branch: "true", deal },
          },
          {
            id: "inv",
            name: "Draft the invoice",
            icon: Invoice01Icon,
            status: "success",
            startMs: 5,
            durationMs: 322,
            items: 1,
            input: deal,
            output: { invoice: "INV-2026-0912", total: 11520 },
          },
          {
            id: "mail",
            name: "Send it",
            icon: Mail01Icon,
            status: "success",
            startMs: 327,
            durationMs: 284,
            items: 1,
            output: { messageId: "<4182@relay>" },
          },
        ]}
      />
    </div>
  );
}
API → Props
PropTypeDefaultDescription
runRunSummary—The header: state, number, start, trigger.
steps{ id, name, icon, status, startMs?, durationMs?, items?, attempts?, input?, output?, error? }[]—error is { code?, message, log? }.
selectedStep / onSelectStepstring / (id) => void—Default: the failed step, else the last that ran.
onRetry(stepId) => void—Retry from here, on a failed step.
actionsReactNode—End of the header: replay, open in editor.
classNamestring—Extra classes.