Skip to content
Back

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-workflow

Escalate urgent support email

Runs on every new email to support@corvel.dev

  1. New email in GmailFetching the latest emailRunning
  2. Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
  3. Route by labelIf label is UrgentWaiting
  1. Post to #support in SlackAs Triage bot, mentions @oncallWaiting
  2. Create Linear issueSupport team, priority UrgentWaiting
Running the test
The code is part of Oxyn Pro

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.

Get Pro

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

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.

Terminal
oxyn add ai-workflow

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

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

  1. New email in GmailFetching the latest emailRunning
  2. Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
  3. Route by labelIf label is UrgentWaiting
  1. Post to #support in SlackAs Triage bot, mentions @oncallWaiting
  2. Create Linear issueSupport team, priority UrgentWaiting
Running the test
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Fails

The Linear step fails; Retry resumes from it.

Escalate urgent support email

Runs on every new email to support@corvel.dev

  1. New email in GmailFetching the latest emailRunning
  2. Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
  3. Route by labelIf label is UrgentWaiting
  1. Post to #support in SlackAs Triage bot, mentions @oncallWaiting
  2. Create Linear issueSupport team, priority UrgentWaiting
Running the test
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

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

  1. New email in GmailFetching the latest emailRunning
  2. Classify with Claude Sonnet 4.5Urgent, billing, question or feedbackWaiting
  3. Route by labelIf label is UrgentWaiting
  1. Post to #support in SlackAs Triage bot, mentions @oncallWaiting
  2. Create Linear issueSupport team, priority UrgentWaiting
Running the test
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Empty

No steps yet: pick a trigger.

Escalate urgent support email

Runs on every new email to support@corvel.dev

Start with a trigger

0 steps, test runs are simulated
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

AiWorkflow

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
scenarioString"passes"`passes`, `fails` (the Linear step fails once), `empty` or `loading`.
autoplaybooltrueStart a test run on mount.
editablebooltrueShow the add menu and remove buttons.
gateboolDefault::default()Ask for approval before the first action (Oxyn extra).
titleString"Escalate urgent support email"Heading.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabTest run (or Stop), each remove button, the branch tabs, Retry, Add step
EnterorSpaceRun or stop, remove, retry, open the menu
←or→ · HomeorEndMove between branch paths
TypeFilter the add menu
↑or↓ · EnterMove in the menu and add
1–9With an empty search, add that step
EscapeClose 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.

TransitionDurationEasing
Connector travel240 ms per wire (TRAVEL_MS)ease-in-out
Output stream34 ms per word ticklinear
Step settle160 msease-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 AiWorkflow from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView in oxyn_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.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI