Preflight Checklist

Locks a deploy or publish button until automatic and manual checks pass, and re-verifies right before it runs.

StopsShipped with checks skipped

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/preflight-checklist.json

The files land in your project. They're yours to edit.

Usage

preflight-checklist-usage.tsx
import { PreflightChecklist, type PreflightCheck } from "@/components/ui/preflight-checklist"

<PreflightChecklist
  checks={checks}
  revision={commits[index]}
  actionLabel="Deploy to production"
  onAction={() => new Promise<void>((resolve) => setTimeout(() => { setLog(`Deployed ${commits[index]}`); resolve() }, 900))}
/>

What it catches

  • Action started with failing or pending checks
  • Manual ticks left over from an earlier revision
  • A check that started failing since it was ticked: re-verified on run
  • Auto-check that throws: counted as a failure

Props

PreflightChecklist props
PropTypeDefault
checks* (required)

The checks to run, in order; omit run for a manual tick.

PreflightCheck[]—
actionLabel* (required)

Label of the gated action, e.g. "Deploy to production".

string—
onAction* (required)

The gated action. Return a promise to show a pending state; a rejection is shown under the button.

() => void | Promise<void>—
revision

What's being shipped (a commit, a draft version). When it changes, manual ticks reset and auto-checks re-run.

string—
recheckOnAction

Re-run auto-checks right before the action fires, so a result can't go stale between check and click.

booleantrue
title

Header text.

string"Preflight"
rerunLabel

Re-run button text.

string"Re-run checks"
blockedLabel

Text before the blocker chips.

string"Blocked by"
passedLabel

Shown when nothing blocks.

string"All checks passed."
verifyingLabel

Button text while auto-checks re-run before the action.

string"Re-verifying…"
workingLabel

Button text while the action runs.

string"Working…"

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

Accessibility

  • Each check row is focusable and its state is read as text
  • Status is a polite live region linked to the action button
  • Locked action uses aria-disabled and stays focusable
  • Re-run button has a title and visually hidden text

Only what the source does. Test with your own screen reader and content before shipping.

Limitations

This is a UX guard rail. Enforce on the server: Gate the real deploy in CI or the API with the same required checks.

  • The lock is in this UI; the same action through an API or CLI isn't gated
  • Checks are only as good as the functions you pass

What it stops

Shipped with checks skipped

Also known as

checklist · pre-launch · release checklist · deploy · publish · gate · ci checks · go live

Dependencies

Pairs well with