CI Checks

View as Markdown

A branch's checks with their failures and Re-run.

In progress
1
Passed
2
Failed
1
Skipped
1
  • TypecheckRequiredPassed
    41s
  • LintRequiredPassed
    18s
  • Unit testsRequiredFailed · InvoicesTable › keeps the page after sorting
    1m 36s
  • Preview deployIn progress
  • End-to-endSkipped · Runs on release branches only
Auto-fixA failed check goes back to the agent to fix.
Auto-mergeWaits on 1 failed check.

When to use

A branch's checks with their failures and Re-run. Use Branch Strip instead when you need the branch's next step.

Usage

import type { Outcome } from "./ui/uicontext/components/domain/Outcome.ts"import { type CheckRun, Checks } from "./ui/uicontext/components/Checks.ts"
const Message = UiSchema.TaggedEnum({	RequestedRerunChecks: { check: Schema.String },	RequestedAutoFixChecks: { on: Schema.Boolean },	RequestedAutoMergeChecks: { on: Schema.Boolean },})// the code host owns the checks; answer a re-run through `outcome` with request `rerun:<name>`export const BranchChecks = (h: Html.H<typeof Message.Type>, checks: ReadonlyArray<CheckRun>, auto: { readonly fix: boolean; readonly merge: boolean }, outcome: Outcome | null) =>	Checks(h, {		props: { id: "512", checks, autoFix: auto.fix, autoMerge: auto.merge, can: ["rerun", "auto"], outcome },		onEmit: {			RequestedRerun: ({ check }) => Message.RequestedRerunChecks({ check }),			RequestedAutoFix: ({ on }) => Message.RequestedAutoFixChecks({ on }),			RequestedAutoMerge: ({ on }) => Message.RequestedAutoMergeChecks({ on }),		},	})

API reference

Props

Checks props
NameTypeDescription
idrequiredstringNames the change these checks ran on, in events
checksrequiredCheckRun[]—
autoFixbooleanA failed check goes back to the agent to fix; leave out for no switch
autoMergebooleanMerge once every required check passes; leave out for no switch
canrequired("rerun" | "auto")[]"rerun" offers Re-run on a failed check; "auto" lets the person flip the switches
outcomeOutcome | nullThe app's answer to the last request: "rerun:<check>", "auto-fix", "auto-merge"
labelstring"CI checks" by default
agentIdstring—
localestring—

Events

Checks events
EventPayloadDescription
RequestedRerun{ id: string; check: string }Run a failed check again; answer with outcome rerun:<check>
RequestedAutoFix{ id: string; on: boolean }—
RequestedAutoMerge{ id: string; on: boolean }—

Agent actions

What agents can do with Checks
ActionDescription
ClickedRerunRun a failed check again, by its name
ToggledAutoFixTurn on or off sending failed checks back to the agent
ToggledAutoMergeasks firstTurn on or off merging once every required check passes

Keyboard and accessibility

  • The counts are a description list; each check says its status in words beside its mark.
  • Re-run is a button named for its check, and the switches are labelled. Auto-merge is consequential for agents: a person confirms.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/ci-checks

Source