Failure clusters
ProFailing runs grouped by what went wrong, largest first, each with its share of failures, how it moved since last period, and a few real examples. The bar is length only; the count is always printed beside it.
Preview
Install
With the Candor CLI
First time? Get started sets up the registry and theme. Or with shadcn directly: npx shadcn@latest add @candor/failure-clusters
Brings in: agent-avatar, collapsible, locale, ops, utils · npm: lucide-react@^1.67.0
Usage
"use client"
import { FailureClusters } from "@/components/failure-clusters"
import type { FailureCluster } from "@/lib/ops"
const clusters: FailureCluster[] = [
{ id: "x1", label: "Row lock during data backfill", count: 14, delta: 9, agent: { id: "dev", name: "Dev agent", role: "coder" }, examples: ["Add region to customers: batch 12, lock timeout ×4", "Backfill tier on subscriptions: batch 3 locked by a nightly job"] },
{ id: "x2", label: "Code search timed out", count: 9, delta: -2, agent: { id: "qa", name: "QA agent", role: "tester" }, examples: ["Find code reading legacy_score: timed out after 30s"] },
{ id: "x3", label: "Asked to act without a clear target environment", count: 6, delta: 0, examples: ["“Clean up the old flags” with Production and Staging both connected"] },
]
export default function Example() {
return <FailureClusters className="max-w-xl" clusters={clusters} />
}<FailureClusters>
| Prop | Type | Default | Description |
|---|---|---|---|
| clustersrequired | FailureClusterInput[] | — | Failure groups, each with its count, change since the comparison and example runs. Shown largest first. A `delta` of null (nothing to compare with) is shown as unknown. |
| title | string | undefined | — | The heading. Defaults to "Why runs failed". |
| unit | string | undefined | — | What the total counts, plural, as in "12 failures". Defaults to "failures". |
| since | string | undefined | — | What the change is measured against, read after "more than" and "fewer than", as in "production's run". Defaults to "last period". |
| className | string | undefined | — | Extra classes for the outer element. |
Strings
The fixed words, in English by default. Change any of them under failureClusters in <LocaleProvider strings={{ … }}>; the table is exported as failureClustersStrings.
| Key | English |
|---|---|
| title | Why runs failed |
| unit | failures |
| total | {total} {unit} |
| since | last period |
| more | more than {since} |
| fewer | fewer than {since} |
| noChange | no change since {since} |
| unknown | change unknown |