Skip to content
Back

Approval GatesPro

Every approval request of a run as a stack: the one to decide now on top with who asks, what exactly and why, its input or diff; approve, change it first or reject, and it drops into the Decided list while the next rises. Open gates say how many steps they hold.

oxyn add approval-gates
ApprovalsLaunch the spring newsletter3 waiting · holds 3 steps
WWritermessageholds 2
Send “Spring is here” to 4,210 subscribers
The draft passed review and the segment is ready.
to: list:spring-2026
subject: Spring is here 🌱
send_at: now
Decided1
web.search “newsletter send times 2026”Approved
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

  • All approval requests of an agent run in one block: open gates form a stack with the one to decide now on top (who asks, kind, what exactly, why, its input or diff, how many steps it holds), and decided gates move into a Decided list with their outcome.
  • Approve, Change (edit the input, then approve) or Reject.
  • While the run is live and nothing is open the block reads Running.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Approval Gates 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 approval-gates

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

Stack

Three open gates; the message send on top.

ApprovalsLaunch the spring newsletter3 waiting · holds 3 steps
WWritermessageholds 2
Send “Spring is here” to 4,210 subscribers
The draft passed review and the segment is ready.
to: list:spring-2026
subject: Spring is here 🌱
send_at: now
Decided1
web.search “newsletter send times 2026”Approved
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

File

A file change with its diff on top.

ApprovalsLaunch the spring newsletter3 waiting · holds 3 steps
CCoderfileholds 1
Edit pricing.tsx
The newsletter links to the new annual plan.
const plans = [
- { id: "pro", price: 12 },
+ { id: "pro", price: 12, annual: 120 },
+ { id: "team", price: 30, annual: 300 },
];
Decided1
web.search “newsletter send times 2026”Approved
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

Decided

Everything decided: Approved, Edited, Rejected.

ApprovalsLaunch the spring newsletterRunning
Running · new requests appear here
Decided4
web.search “newsletter send times 2026”Approved
Hand analytics to the Analyst agentRejected
Edit pricing.tsxApproved
Send “Spring is here” to 4,210 subscriberssend_at: 9:00Edited
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

Idle

Nothing open and the run is over.

ApprovalsLaunch the spring newsletterAll decided
Nothing waiting
Decided4
web.search “newsletter send times 2026”Approved
Hand analytics to the Analyst agentRejected
Edit pricing.tsxApproved
Send “Spring is here” to 4,210 subscriberssend_at: 9:00Edited
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

ApprovalGates

PropTypeDefaultDescription
gatesrequiredGates—Gates of the run.
titleString"Approvals"Heading.
decidedbooltrueShow the Decided list.
on_decideEventHandler<(String, GateDecision)>—A gate was decided.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
⌘/CtrlEnterApprove the top gate
TabReject, Change, Approve

Accessibility

  • A section named Approvals; the waiting count and held steps are text in the header.
  • The peeking cards behind the stack are aria-hidden; only the top gate is interactive.
From the spec
  • section named by the title; status line is text.
  • Peeking layers are aria-hidden; only the top gate is focusable.

Motion & interaction

Timing
  • Top card rises in (translateY 8 px, scale .98 → 1, 280 ms); decided rows fade in.
  • Reduced motion: no rise, rows appear.

Responsive behaviour

  • Max 520 px; the decided rows truncate the action and keep the outcome.
Edge cases (spec)
  • Max 520 px; decided rows truncate the action and keep the outcome visible.

Notes for AI

  • Import ApprovalGates from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: ApprovalGatesEl in oxyn_gpui.
  • Props to set first: gates.
  • 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