Trigger list
Everything that starts an agent, from schedules to webhooks to app events, with when each last fired and when it runs next.
Loading preview…
Install
- 1
Run this command in your Tailwind CSS project. It adds
components/ai/trigger-list-list.tsxand installs its dependencies.$ npx shadcn@latest add https://gradientdeck.com/ai-components/r/trigger-list-list.json
Usage & API
Example
import { TriggerGlyph } from "@/components/ai/trigger-list-list"
<TriggerGlyph
kind={kind}
/>Props TriggerGlyph
| Prop | Type & description | Required |
|---|---|---|
kind | TriggerKind | Required |
app | TriggerApp | Optional |
size | number | Optional |
Dependencies
- React
- Tailwind CSS
- motion
- lucide-react
Implementation notes
The list is headed Triggers, with a count of how many are on, and Add trigger. The menu adds a schedule, a webhook, an event or an email. Each row shows the glyph, the title, the detail, last fired and next run. A switch turns it on. Off rows are marked Paused. A failure note such as failing twice is visible on the row. The overflow menu renames in place, duplicates, runs now, or deletes. Run now can show a starting state. Delete raises an undo that lasts a few seconds and then calls restore with the row and its old index if the person clicks it. No triggers is the empty state. The preview is the settings of a release-notes agent.
Example
import { TriggerGlyph } from "@/components/ai/trigger-list-activity"
<TriggerGlyph
kind={kind}
/>Props TriggerGlyph
| Prop | Type & description | Required |
|---|---|---|
kind | TriggerKind | Required |
app | TriggerApp | Optional |
size | number | Optional |
Dependencies
- React
- Tailwind CSS
- motion
- lucide-react
Implementation notes
Activity groups firings under day labels. A filter row lists each trigger, using the same glyphs, and choosing one calls onFilterChange. Outcomes read succeeded, failed, skipped or running, and a running row can count duration up from the number you pass. The payload pairs are on the row. A failed firing can offer Retry when you pass the handler. A firing with a run id can open that run. If the selected trigger has nothing in the list, the empty copy says it has not fired in the last 7 days. The screen does not itself decide that window. It prints the line. You choose which firings to pass.
Choosing a layout
Use the list on the agent's settings, next to where a schedule is edited or a webhook URL is copied. Use activity when the question is what fired today and which of those runs failed, not whether the trigger is switched on. The two share the same four kinds and the same glyphs, so a row in the log is recognizable as a row in the list.
Editing the cadence itself, with the next five runs and a holiday switch, is the schedule card. Copying the URL and reading one delivery's body is the webhook trigger. Building the when-where-then rule for an app event is the event trigger. This list is the index of all of them, plus the log of firings.
Does Run now wait for the run to finish?
Run now calls onRunNow with the trigger id. The row can show a running flag while you say so. The list does not poll the run. Opening the resulting run is the activity view, which has an optional onOpenRun.
What comes back if a deleted trigger is restored?
onRestore receives the trigger and the index it had. The undo stays up for a few seconds and then clears. Turning a trigger off is a different action, the switch, and it keeps the row in place as paused.