AI workflowPro
A small automation on a single rail: new mail in Gmail starts it, Claude decides, a branch splits it, and Slack or Linear act; Test run walks the rail and unfolds what each step produced. New steps are picked from a searchable menu of apps.
oxyn add ai-workflowEscalate urgent support email
Runs on every new email to support@corvel.dev
- New email in GmailFetching the latest emailRunning
- Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
- Route by labelIf label is UrgentWaiting
- Post to #support in SlackAs Triage bot, mentions @oncallWaiting
- Create Linear issueSupport team, priority UrgentWaiting
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Build and test a small automation: a trigger, an AI step, a branch and actions on one hairline rail, then watch a test run go through it.
When not to use
- Replays a multi-agent run on one clock: use Agent timeline instead.
- One model at a glance: use Model card instead.
- Four variations grow out of a grid of dots: use Image generation instead.
Installation
AI workflow is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add ai-workflowUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Passes
A test run that passes; the untaken path is skipped.
Escalate urgent support email
Runs on every new email to support@corvel.dev
- New email in GmailFetching the latest emailRunning
- Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
- Route by labelIf label is UrgentWaiting
- Post to #support in SlackAs Triage bot, mentions @oncallWaiting
- Create Linear issueSupport team, priority UrgentWaiting
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Fails
The Linear step fails; Retry resumes from it.
Escalate urgent support email
Runs on every new email to support@corvel.dev
- New email in GmailFetching the latest emailRunning
- Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
- Route by labelIf label is UrgentWaiting
- Post to #support in SlackAs Triage bot, mentions @oncallWaiting
- Create Linear issueSupport team, priority UrgentWaiting
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Approval gate
The run waits for your approval before the first action (Oxyn extra).
Escalate urgent support email
Runs on every new email to support@corvel.dev
- New email in GmailFetching the latest emailRunning
- Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
- Route by labelIf label is UrgentWaiting
- Post to #support in SlackAs Triage bot, mentions @oncallWaiting
- Create Linear issueSupport team, priority UrgentWaiting
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Empty
No steps yet: pick a trigger.
Escalate urgent support email
Runs on every new email to support@corvel.dev
Start with a trigger
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AiWorkflow
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
scenario | String | "passes" | `passes`, `fails` (the Linear step fails once), `empty` or `loading`. |
autoplay | bool | true | Start a test run on mount. |
editable | bool | true | Show the add menu and remove buttons. |
gate | bool | Default::default() | Ask for approval before the first action (Oxyn extra). |
title | String | "Escalate urgent support email" | Heading. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Test run (or Stop), each remove button, the branch tabs, Retry, Add step |
| EnterorSpace | Run or stop, remove, retry, open the menu |
| ←or→ · HomeorEnd | Move between branch paths |
| Type | Filter the add menu |
| ↑or↓ · Enter | Move in the menu and add |
| 1–9 | With an empty search, add that step |
| Escape | Close the menu |
Accessibility
- A labelled section with aria-busy while running; steps are an ordered list and each branch path its own list.
- Every step is named with its app and where it stands, shown as a glyph and a word.
- Adding a step opens a combobox driving a listbox (aria-activedescendant); the two branch outcomes form a radio group.
- Each step has its own named delete button, shown on hover or keyboard focus and always on touch screens.
- Run start, results, failures and the outcome (simulated, nothing was sent) are announced politely.
From the spec
Steps are a list; each step announces its status. Run, Retry and Approve are buttons; the menu is a menu with menuitems and type-ahead. Progress lines go to the polite live region. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
The connector fills top to bottom as the dot travels; a finished step settles with a check and its output streams word by word. Add step opens a command menu with app marks; remove is a small button on hover/focus. Skipped steps fade to 50 %.
Timing
Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.
| Transition | Duration | Easing |
|---|---|---|
| Connector travel | 240 ms per wire (TRAVEL_MS) | ease-in-out |
| Output stream | 34 ms per word tick | linear |
| Step settle | 160 ms | ease-out |
Reduced motion: streamed text and moves appear at their end state; progress still advances, without travel animation.
Responsive behaviour
- Rows are 36 px with the detail inline; under 520 px the detail drops under the title and the status slot narrows.
- Status labels sit in a fixed 72 px slot so titles never shift.
- The add menu opens above the button and caps its height with a thin scrollbar.
Edge cases (spec)
Step titles truncate; outputs wrap and scroll inside the step when long. The rail stays one column at every width. Reduced motion shows filled connectors immediately. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the providers' coloured brand marks.
Notes for AI
- Import
AiWorkflowfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AiKitViewinoxyn_gpui. - Props to set first:
now. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.