Skip to content
Back

Plan cardPro

A plan as a document you review before the agent runs it: drafting, proposed with Approve or Build, executing, or superseded by a newer version.

oxyn add plan-card
Plan6 steps

Fix the refresh-token race

  1. 1.Read the auth middleware
  2. 2.Write a failing test
  3. 3.Hold the lock across the refresh
  4. 4.Run the auth tests
  5. 5.Update the changelog
  6. 6.Bump the session schema
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

  • In Plan mode (or whenever the app gates execution on a plan) the agent has proposed what it will do and waits.
  • The user wants to: approve and let it build; approve and choose how freely it runs (switch to Agent mode at Ask / Auto-edit / Full access); edit the plan themselves and approve the edited version; send it back with feedback so the agent revises; or reject it outright.
  • The footer must make the run level of the approval explicit (a plan approved "with Full access" is a much bigger yes than one approved "with Ask"), and must never approve a version of the plan the user did not see.

When not to use

Installation

Plan card 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 plan-card

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

Proposed

Waiting for sign-off.

Plan6 steps

Fix the refresh-token race

  1. 1.Read the auth middleware
  2. 2.Write a failing test
  3. 3.Hold the lock across the refresh
  4. 4.Run the auth tests
  5. 5.Update the changelog
  6. 6.Bump the session schema
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

Drafting

Still being written.

Plan
Planning
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

Executing

Running.

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

Superseded

Replaced by v3.

Planv26 steps

Fix the refresh-token race

  1. 1.Read the auth middleware
  2. 2.Write a failing test
  3. 3.Hold the lock across the refresh
  4. 4.Run the auth tests
  5. 5.Update the changelog
  6. 6.Bump the session schema
Replaced by v3
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

PlanCard

PropTypeDefaultDescription
planrequiredPlan—The plan.
nowrequiredClockMs—Shared clock.
gatedboolDefault::default()The plan needs sign-off (Approve instead of Build).
on_buildEventHandler<()>—Build / Approve pressed.
on_reviseEventHandler<()>—Request changes pressed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabTo Approve / Build and Revise
EnterActivate the focused action

Accessibility

  • role=region labelled with the plan title and version.
From the spec
  • Footer: role="group" labelled "Plan approval, version 2, 7 steps"; consequence line is aria-describedby of Approve ("Approve and build. Switches to Agent mode. Edits and commands will ask").
  • Arrival: assertive "Plan ready for approval: 7 steps. Press Enter to approve, R to request changes" (owned here; plan-todo.md defers it to family G).
  • Level menu: radiogroup "Run with"; Full access row has "High risk" in its name, not only its tone.
  • Confirm panel: alertdialog, focus on Cancel; armed state announced.
  • Plan changed: polite "Plan updated, 2 steps added. Approve is available again" after the re-arm.
  • Countdown (Pro): announced at start and when paused; never announces every second; pauses on focus so a keyboard user is never raced.
  • Focus after Approve: composer; after Request changes: the plan card heading (so the user hears v+1 arrive); after Reject: composer.
  • Keys are listed via aria-keyshortcuts and can be remapped; contrast and shape rules as approvals.md §8.

Motion & interaction

  • Rise. As plan-todo.md: footer rises from the card's bottom edge (200 ms ease.out); the scope line fills in after 80 ms; numbers roll once (dur.count.roll) as the plan's file / command counts settle.
  • Level chip. "Run with: Ask ⌄" carries the selector's glyph and tier tone; changing it crossfades glyph + tone (240 ms) and rewrites the consequence line (80 ms out / 160 ms in, y 3 px). Picking Full access morphs the footer into the inline confirm panel (200 ms height spring) with the 600 ms arming fill.
  • Approve. Press scale 0.97 → the button turns into "Approved ✓" (160 ms), footer collapses (220 ms spring.snap), the plan card folds to the "Plan · 0/7" pill (280 ms ease.in-out), the todo dock unfolds, and in Plan mode the Approve button flies a spark to the mode chip which morphs Plan → Agent (composer-mode-switch.md); if the level changed, the permission chip morphs on the same frame as the mode chip (one choreography, not two).
  • Edit plan. Footer slides its button row 8 px down and swaps to the editing row; the change counter rolls with each edit; "Discard edits" restores steps with a 200 ms crossfade per changed step.
  • Request changes. The footer height follows the field (spring.snap); on send the note lifts and docks into the Revising line as a quote; the old version dims to 60 % (plan-todo.md) and v+1 streams.
  • Plan changed while open. The version chip pulses once (opacity 1 → 0.6 → 1, 600 ms); Approve shows a 600 ms re-arm fill so a click aimed at the old version cannot land on the new one.
  • Reject. Footer collapses to "Rejected" (220 ms); no shake, no red flash.
  • Countdown (Pro). Ring drains 1 Hz with digit swaps; hover / focus freezes it immediately and shows "Paused"; any edit cancels it for this version.
Timing
TransitionDurationDelayEasing / springStaggerFrame rate
Footer rise200 ms0ease.out—60 Hz
Scope line fill / count roll160 ms / 280 ms80 msease.out30 ms30 Hz
Input guard400 msfrom mount———
Level glyph + tone crossfade240 ms0ease-in-out—60 Hz
Consequence line swap80 ms out / 160 ms in, 3 px0ease.in / ease.out—60 Hz
Confirm panel in200 ms0height spring.snap—60 Hz
Arming (Full access)600 ms0linear—60 Hz
Approve → "Approved ✓"160 ms0spring.snap—60 Hz
Footer collapse220 ms0spring.snap—60 Hz
Card fold to pill280 msafter collapseease.in-out—60 Hz
Spark to mode chip + chip morphper composer-mode-switch.mdafter fold starts——60 Hz
Editing row swap200 ms, 8 px0spring.snap—60 Hz
Feedback field growper line0spring.snap—60 Hz
Plan-changed re-arm600 ms after last changecoalesce 300 mslinear—60 Hz
Version chip pulse600 ms once0ease-in-out—60 Hz
Countdown (Pro)1 s steps—digit swap—1 Hz
Reduced motion80 ms opacity crossfades; heights jump; no spark (mode and permission chips swap with 80 ms fade); arming and re-arm show static text "Available in 0.6 s" (delays kept); no pulse (version chip shows a static "updated" dot for 4 s); countdown digits swap, no ring drain—linearnone1 Hz idle

Responsive behaviour

  • Fills its container.
Edge cases (spec)
  • Very long plans (> 30 steps): scope line summarises ("32 steps · 18 files"); Approve still binds to the whole version; partial (Pro) for ranges.
  • Plan streams slowly: footer stays Hidden until the plan card reaches Proposed / AwaitingApproval; no "approve while streaming".
  • Agent revises while the user is editing: user edits are kept as a draft; the footer shows "The agent updated the plan · Keep my edits / Use v3"; nothing merges silently.
  • Level capped by policy: options above the cap disabled with "Limited by your organisation" (selector Locked).
  • Sandbox unavailable and Full access chosen: routes through the selector's SandboxUnavailable rule (blocked or Bypass-style confirm, app policy).
  • Not in Plan mode (plan gate from an Agent-mode run): Approve does not switch modes; label "Approve & continue".
  • Two plans pending (sub-agents): each plan card has its own footer; the queue pager from approval-card.md appears in the status strip's Review, not inside plan cards.
  • Run stopped while editing: edits kept locally in the card (plan-todo.md draft); footer Stale.
  • RTL: mirrors; version chip moves inline-start; arming fills from inline-start.
  • Tiny / dense IDE (≤ 320 px): buttons become Approve ⏎ + overflow (level, edit, request changes, reject); scope line truncates with tooltip.
  • Touch: 44 px buttons; level menu as a bottom sheet; feedback field opens the keyboard with the plan still visible above (sheet ≤ 50 % height).
  • Slow network: Submitting underline after 300 ms; the mode chip does not switch until the adapter acknowledges the approval.
  • Very fast agent: if execution starts in < 600 ms after Approve, the Approved hold is cut short; the fold still runs to completion (no skipped frames mid-morph).

Notes for AI

  • Import PlanCard from oxyn_dioxus and include RUN_CSS plus the token stylesheet once.
  • A GPUI version exists: PlanCardEl in oxyn_gpui.
  • Props to set first: plan, now.
  • 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