Skip to content
Back

Approval pagerPro

Several open requests in one card: page through them with ‹ › and allow the whole batch once.

oxyn add approval-pager
Read .env.example
Coder · this session
1 of 3○Low risk
Allow all 3 once
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

  • An agent stops and asks before it does something the user has not already allowed: run a command, write a file, reach a host, call an MCP tool, start executing a plan, spend money, use a credential, or take control of a screen.
  • The user is trying to answer, in a second or two and without scrolling: 1.
  • What exactly will happen? (the command, the files and diff, the host, the amount, the secret's name — never its value) 2.
  • How risky is it? (a tier they can read without colour: icon shape + label + reason line) 3.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • A plan as a document you review before the agent runs it: use Plan card instead.
  • How much the agent may do without asking: use Permission selector instead.

Installation

Approval pager 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-pager

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

First

Request 1 of 3.

Read .env.example
Coder · this session
1 of 3○Low risk
Allow all 3 once
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

Last

Request 3 of 3.

Run npm install
Coder · this session
3 of 3◇Medium risk
Allow all 3 once
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

ApprovalPager

PropTypeDefaultDescription
queuerequiredApprovalQueue—Open requests.
nowrequiredClockMs—Shared clock.
pageusizeDefault::default()Page.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabThrough the pager and the decision buttons

Accessibility

  • The pager text ("1 of 3") and the batch row are real text next to the card's buttons.
From the spec
  • Each open request is announced assertively once: "Approval needed. High risk. Run cargo publish. Reason: release the crate. Press Y to allow once, N to deny" (keys only if the user's focus can reach the card). Further queue arrivals are polite: "2 more approvals waiting".
  • Risk is in text (label + reasons) and shape, never colour only; contrast ≥ 4.5:1 for text, ≥ 3:1 for borders and glyphs in light, dark and daltonized themes.
  • Arming and hold are exposed: aria-disabled="true" during arming, then "Allow is available"; the hold button is button with aria-describedby "Press and hold for 1.2 seconds", and keyboard users hold Y or Space for the same duration; an app setting hold_alternative = TypePhrase lets users who cannot hold type the target name instead (proposed).
  • Focus never moves into a newly arrived card while the user is typing; the jump shortcut (⌘/Ctrl+Shift+A) and the status strip's Review move it there. After a decision, focus moves to the next page's card, or back to where it was before the jump.
  • Shortcuts are listed with aria-keyshortcuts; single-key shortcuts can be turned off (WCAG 2.1.4 character key shortcuts) — then Alt+key is used (proposed).
  • Resolved rows read as "Allowed once by you, 4 seconds after asking" / "Denied, reason sent to agent".

Motion & interaction

  • Arrival. The gated row switches to the amber hand glyph and pauses its timer; the card / footer rises from the bottom edge of its host (200 ms ease.out, the tool-call hand-off). The waiting loader motion (hourglass / hold-and-breathe in color.loader.waiting, loaders.md §3.2) replaces any spinner. The permission selector chip gets its attention badge and pulses once (selector §4).
  • Risk entrance. Low / Medium: no extra motion. High: the 2 px border draws in 160 ms. Critical: the hatch appears static (no animated stripes — danger is calm and constant, the selector's rule).
  • Arming (High). Allow buttons show a left-to-right fill over 600 ms (linear); early press does a 2-cycle 3 px shake and announces "Available in a moment".
  • Hold (Critical). A ring (or bar on the footer layout) fills over 1200 ms while held; releasing early drains it in 200 ms ease.in; completion gives a 1-step scale 1 → 1.04 → 1 and, on touch, one haptic tick at 50 % and one at 100 % (proposed).
  • Resolve. The card height collapses (220 ms spring.snap) into a one-line resolved row: "Allowed resolved-row morph, note 11 §17). The row's glyph morphs hand → ✓ / ⊘.
  • Pattern editing. The "Always" chip expands in place into an editor; narrowing / broadening steps slide the highlighted part of the command (160 ms); the match count rolls (280 ms dur.count.roll).
  • Deny with reason. The footer swaps to a one-line field (height spring.snap); on send the text flies up 8 px and fades into the resolved row (220 ms dur.travel).
  • Paging. Next page slides in from the inline-end 12 px with a 160 ms fade; the "1 of 3" numerator rolls.
  • Stale. Card desaturates to 60 % over 160 ms; buttons crossfade to "Run stopped"; collapses to one line after 4 s.

Responsive behaviour

  • Fills its container; the batch row stays under the card.
Edge cases (spec)
  • Many parallel requests (fan-out of 20 sub-agents): the queue shows "1 of 20 · 3 agents"; the approval inbox variant (Pro) groups by agent; batch actions only per the §2.6 rule.
  • Request arrives while the user types in the composer: no focus steal; announcement + attention badge; input guard prevents stray keys; composer placeholder changes to "Approve above, or type why not…".
  • Same request twice (agent retries after a deny): the new card shows "Asked again · you denied this 0:30 ago" with the previous reason.
  • Rule added on page 1 matches page 3: page 3 resolves in place as AutoResolved{Rule}, the queue count rolls down.
  • Very fast agents: requests resolved by a rule within 150 ms (delay.row_guard) never show a card.
  • Very slow agents / remote: Submitting shows a 2 px underline progress after 300 ms; after 10 s "Still sending…"; failure → SubmitFailed with Retry; the gated call stays blocked (fail safe).
  • Offline: actions disabled with "Offline · answers can't reach the agent"; Deny stays enabled only if the adapter can enforce it locally (client-side gate).
  • Secrets in arguments: the redactor masks values (sk-…•••• last 4); the "Edit and allow" editor never reveals them; audit snapshots store masked values.
  • Long commands (> 8 lines, heredocs): first 4 lines + "Show all 23 lines"; dangerous tokens found by the classifier are highlighted even if they sit in the hidden part ("contains rm -rf on line 17").
  • RTL: layout mirrors; commands, paths and diffs stay LTR in isolated spans; arming and hold fills run from the inline-start.
  • Tiny sizes (16–20 px): the risk glyph alone; Critical adds a 4 px corner dot so risk never depends on hue; approval actions move to the card / overflow.
  • Dense IDE panels: approval-card/footer compact (28 px buttons with key hints); pattern editor opens as a popover.
  • Touch: 44 px targets; no single-key shortcuts; Critical hold uses haptics; swipe is never an approval gesture (too easy to trigger) — proposed.
  • Multiple devices: a request answered on the phone resolves the desktop card with "Answered on your phone" (origin).
  • Policy-managed: rows / options disabled with reason "Your organisation requires approval for this".

Notes for AI

  • Import ApprovalPager from oxyn_dioxus and include HITL_CSS plus the token stylesheet once.
  • There is no GPUI version yet; use the Dioxus component.
  • Props to set first: queue, 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