Step Picker

Choose what a workflow step does from a searchable catalog of apps and events.

    • Team ChatChannels and direct messages.
    • Pipeline CRMContacts, companies and deals.
    • FilterOnly continue when conditions are true.
    • PathsSplit into paths with their own rules.
    • DelayWait before the next step.
    • FormatterChange text, numbers and dates.
    • Pipeline CRMContacts, companies and deals.
    • Team ChatChannels and direct messages.
    • MailSend and receive email.
    • BillingPayments and subscriptions.
    • Data WarehouseYour admin hasn’t allowed this app.

Search “send”, or open an app.

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/step-picker

Usage

import { StepPicker, type StepPickerApp } from "./ui/uicontext/components/kit/StepPicker.ts"
const Message = UiSchema.TaggedEnum({	PickedStep: { app: Schema.String, event: Schema.String },	ClosedPicker: {},})export const AddStep = (h: Html.H<typeof Message.Type>, apps: ReadonlyArray<StepPickerApp>) =>	StepPicker(h, {		props: { apps, for: "action" },		onEmit: {			Picked: ({ app, event }) => Message.PickedStep({ app, event }),			RequestedClose: () => Message.ClosedPicker(),		},	})

Examples

Choose a trigger

For the first step, only apps with triggers are offered, and an app with one trigger picks it at once.

    • ScheduleStart on a schedule.
    • FormsResponses to your forms.
    • Pipeline CRMContacts, companies and deals.
    • Team ChatChannels and direct messages.
    • MailSend and receive email.
    • BillingPayments and subscriptions.

Loading

Placeholder rows hold the space while the catalog loads.

API reference

Props

StepPicker props
NameTypeDefaultDescription
appsrequiredStepPickerApp[]—Every app and built-in tool the workspace offers
forrequired"trigger" | "action"—A trigger starts the workflow; any later step is an action or a search
recentstring[]—Apps used recently, by id, newest first; shown above the catalog
status"loading" | "ready"—loading shows placeholder rows while the catalog loads
autoFocusboolean—Move focus to the search box when it appears, as when a step was just added
labelstring—The search box's label; "Search apps" by default
agentIdstringstep-pickerThe id agents know this picker by; step-picker by default

Events

StepPicker events
EventPayloadDescription
Picked{ app: string; event: string }The person chose what the step does
RequestedClose{}Escape with nothing left to clear: close the picker

Agent actions

What agents can do with StepPicker
ActionDescription
UpdatedQuerySearch apps and what they do
ClickedAppOpen an app by id to see its events
ClickedEventPick what the step does, by app id and event id (see page_query choices, app/event)
ClickedBackGo back to all apps

Accessibility

  • The search box is a combobox: the arrows move through the results, Enter opens an app or picks an event, and Escape clears the search, then goes back, then asks to close.
  • Results are a listbox in labelled groups; the number of results is announced as you type.
  • Apps and events the workspace doesn't allow stay listed, marked unavailable, with the reason.

Source