Blast radius

Pro

What a plan step can reach in the environment, grouped by kind of thing. Measured, it lists each component with how it changes; metadata types the agent couldn't read are named, because it can't rule them out. When the reach can't be measured, it says so and why — never an empty "nothing affected".

Markdown

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/blast-radius

Brings in: entity-chip, locale, work, utils · npm: lucide-react@^1.67.0

Usage

TSX · The example above
"use client"

import type { BlastRadiusScope } from "@/lib/work"
import { BlastRadius } from "@/components/blast-radius"

const measured: BlastRadiusScope = {
  kind: "measured",
  unread: ["Mobile app screens"],
  components: [
    { entity: { kind: "component", name: "web/src/customers/CustomerHeader.tsx", label: "CustomerHeader" }, change: "update", diff: { added: 1, removed: 1 } },
    { entity: { kind: "component", name: "web/src/admin/CustomerAdmin.tsx", label: "CustomerAdmin" }, change: "update", diff: { added: 1, removed: 0 } },
    { entity: { kind: "column", name: "customers.region", label: "region" }, change: "read", diff: null },
  ],
}

const unknown: BlastRadiusScope = {
  kind: "unknown",
  reason: "A data backfill touches rows, not code. Which rows change depends on billing country at run time.",
}

export default function Example() {
  return (
    <div className="grid max-w-3xl gap-4 md:grid-cols-2">
      <BlastRadius step="Show region on the customer and admin pages" scope={measured} />
      <BlastRadius step="Backfill region from billing country" scope={unknown} />
    </div>
  )
}

<BlastRadius>

PropTypeDefaultDescription
steprequiredstring—The plan step's title, shown as the heading.
scoperequiredBlastRadiusScope—What the step can reach, or why that couldn't be measured.
classNamestring | undefined—Extra classes for the outer element.

Strings

The fixed words, in English by default. Change any of them under blastRadius in <LocaleProvider strings={{ … }}>; the table is exported as blastRadiusStrings.

KeyEnglish
labelWhat “{step}” can reach
blastRadiusBlast radius
reach{changed} changed · {read} read
reachUnknownReach unknown.
group{noun}s · {count}
createNew
updateChanged
deleteDeleted
readRead
unreadCouldn’t read {kinds}, so effects there aren’t ruled out.