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-cardFix the refresh-token race
- 1.Read the auth middleware
- 2.Write a failing test
- 3.Hold the lock across the refresh
- 4.Run the auth tests
- 5.Update the changelog
- 6.Bump the session schema
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
- 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
- The agent's task list: use Todo list instead.
- Switch the agent between Ask, Plan and Agent: use Mode switch instead.
- How much the agent may do without asking: use Permission selector instead.
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.
oxyn add plan-cardUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Proposed
Waiting for sign-off.
Fix the refresh-token race
- 1.Read the auth middleware
- 2.Write a failing test
- 3.Hold the lock across the refresh
- 4.Run the auth tests
- 5.Update the changelog
- 6.Bump the session schema
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Drafting
Still being written.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Executing
Running.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Superseded
Replaced by v3.
Fix the refresh-token race
- 1.Read the auth middleware
- 2.Write a failing test
- 3.Hold the lock across the refresh
- 4.Run the auth tests
- 5.Update the changelog
- 6.Bump the session schema
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
PlanCard
| Prop | Type | Default | Description |
|---|---|---|---|
planrequired | Plan | — | The plan. |
nowrequired | ClockMs | — | Shared clock. |
gated | bool | Default::default() | The plan needs sign-off (Approve instead of Build). |
on_build | EventHandler<()> | — | Build / Approve pressed. |
on_revise | EventHandler<()> | — | Request changes pressed. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | To Approve / Build and Revise |
| Enter | Activate 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 isaria-describedbyof 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-keyshortcutsand 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 msease.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
| Transition | Duration | Delay | Easing / spring | Stagger | Frame rate |
|---|---|---|---|---|---|
| Footer rise | 200 ms | 0 | ease.out | — | 60 Hz |
| Scope line fill / count roll | 160 ms / 280 ms | 80 ms | ease.out | 30 ms | 30 Hz |
| Input guard | 400 ms | from mount | — | — | — |
| Level glyph + tone crossfade | 240 ms | 0 | ease-in-out | — | 60 Hz |
| Consequence line swap | 80 ms out / 160 ms in, 3 px | 0 | ease.in / ease.out | — | 60 Hz |
| Confirm panel in | 200 ms | 0 | height spring.snap | — | 60 Hz |
| Arming (Full access) | 600 ms | 0 | linear | — | 60 Hz |
| Approve → "Approved ✓" | 160 ms | 0 | spring.snap | — | 60 Hz |
| Footer collapse | 220 ms | 0 | spring.snap | — | 60 Hz |
| Card fold to pill | 280 ms | after collapse | ease.in-out | — | 60 Hz |
| Spark to mode chip + chip morph | per composer-mode-switch.md | after fold starts | — | — | 60 Hz |
| Editing row swap | 200 ms, 8 px | 0 | spring.snap | — | 60 Hz |
| Feedback field grow | per line | 0 | spring.snap | — | 60 Hz |
| Plan-changed re-arm | 600 ms after last change | coalesce 300 ms | linear | — | 60 Hz |
| Version chip pulse | 600 ms once | 0 | ease-in-out | — | 60 Hz |
| Countdown (Pro) | 1 s steps | — | digit swap | — | 1 Hz |
| Reduced motion | 80 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 | — | linear | none | 1 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
Hiddenuntil the plan card reachesProposed/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
SandboxUnavailablerule (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
PlanCardfromoxyn_dioxusand includeRUN_CSSplus the token stylesheet once. - A GPUI version exists:
PlanCardElinoxyn_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.