Skip to content
Back

Undo ladderPro

The agent's steps as a vertical stepper you can walk back down and up again; a step that can't be taken back locks every rung under it.

oxyn add undo-ladder
Agent steps · 2026-11-146 of 6 applied
  1. Added the pricing table3 files · +120 −4
  2. Renamed Plan to Tier6 files · +38 −38
  3. Deployed the preview buildpreview environmentCan't undo
  4. Moved prices to cents2 files · +21 −17
  5. Added the annual toggle2 files · +54 −6
  6. Updated the snapshot tests4 files · +12 −12Now
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

  • The agent just broke something three turns ago, or the user wants to try a different approach from an earlier point.
  • They want to find the right moment, see what it looked like, and go back — choosing whether to bring back the files, the conversation, both, or to branch off — without fear of losing work they want to keep.

When not to use

  • Review an agent's change set: use Diff viewer instead.
  • Send, stop, queue and steer in one control, in twelve styles: use Send control instead.
  • Messages typed while the agent works wait above the composer: use Queue stack instead.

Installation

Undo ladder 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 undo-ladder

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

All

Everything applied.

Agent steps · 2026-11-146 of 6 applied
  1. Added the pricing table3 files · +120 −4
  2. Renamed Plan to Tier6 files · +38 −38
  3. Deployed the preview buildpreview environmentCan't undo
  4. Moved prices to cents2 files · +21 −17
  5. Added the annual toggle2 files · +54 −6
  6. Updated the snapshot tests4 files · +12 −12Now
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

Walked back

Two steps undone.

Agent steps · 2026-11-144 of 6 applied · 2 undone
  1. Added the pricing table3 files · +120 −4
  2. Renamed Plan to Tier6 files · +38 −38
  3. Deployed the preview buildpreview environmentCan't undo
  4. Moved prices to cents2 files · +21 −17Now
  5. Added the annual toggle2 files · +54 −6Undone
  6. Updated the snapshot tests4 files · +12 −12Undone
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

Free

Every step reversible, walked to the bottom.

Agent steps · 2026-11-140 of 6 applied · 6 undone
  1. Added the pricing table3 files · +120 −4Undone
  2. Renamed Plan to Tier6 files · +38 −38Undone
  3. Deployed the preview buildpreview environmentUndone
  4. Moved prices to cents2 files · +21 −17Undone
  5. Added the annual toggle2 files · +54 −6Undone
  6. Updated the snapshot tests4 files · +12 −12Undone
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

UndoLadder

PropTypeDefaultDescription
stepsrequiredVec<UndoStep>—Steps, oldest first.
appliedOption<usize>Default::default()Steps in effect at first (default: all).
titleString"Steps"Heading.
on_changeEventHandler<usize>—The number of steps in effect changed.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
↑or↓ · HomeorEndMove between rungs
EnterorSpaceMake the focused rung the newest step in effect
⌘ZorCtrlZUndo one step
⇧⌘ZorCtrlYRedo one step

Accessibility

  • An ordered list with one tab stop; each rung says its step, what it touched and applied, undone or locked.
  • The newest step in effect has aria-current=step; the summary is a polite live region.
  • Undo and Redo are real buttons with aria-keyshortcuts and disable at the ends.
From the spec
  • Marker role: a button with aria-haspopup="menu"; accessible name "Checkpoint, auto, 3:42 PM, before 'now add rate limiting', 3 files changed, available". Chat-only: "…, no file changes". Current: "…, you are here".
  • Menu items are named by scope with counts ("Restore 3 files", "Rewind 2 turns", "Restore 3 files and rewind 2 turns", "Fork from here"); disabled items keep focusability with aria-disabled and the reason as description.
  • Side list: listbox grouped by day (group with the date as label); scrubber is a slider whose value text names the checkpoint (as run-replay.md §8).
  • Live region (polite): "Restored 3 files to 3:42 PM. Undo available for 10 seconds." · "Restore undone." · "Opened fork from 3:42 PM." Failures assertive once. No announcements on hover.
  • Keyboard: Tab to marker; Enter menu; R / C / B / F / P inside menu; Esc closes; in the side list ↑/↓ move, Enter preview, Shift+Enter open menu; ⌘S save manual checkpoint (side list and timeline focus only); ⌘Z undo restore while the toast is visible and focus is not in an editable field; F6 cycles to the toast region.
  • Focus order after restore: focus returns to the marker (now "You are here") unless the user was in the sheet, in which case it moves to the toast's Undo button; after the toast closes, focus goes back to the marker.
  • Contrast: hairline ≥ 3:1 against the transcript background on focus/hover (rest may be 2:1 as decoration since the diamond and text carry it); "You are here" accent text ≥ 4.5:1.
  • Undo is never toast-only: the RestorePoint stays in the side list and menu ("Undo last restore").
  • Reduced motion: §5 last row.

Motion & interaction

  • Marker enter. The hairline draws from the start edge to the end over 240 ms (ease.out) as the turn begins; the diamond scales 0 → 1 (spring.snap) at the start. A marker never pushes content: its 24 px row height is reserved when the turn row is created.
  • Hover reveal. After delay.marker.hover (150 ms) the actions fade in with x −4 → 0 (dur.marker.reveal, 120 ms); leaving hides them after a 300 ms grace so the pointer can travel to them. Hover over a user message also reveals a ↶ on that message (the hover-revert placement).
  • Preview popover. 200 ms hover delay, 140 ms fade; the file list rows show counts with no roll (static); clicking a file opens the diff viewer filtered to that file at the checkpoint → head range.
  • Menu. Opens with dur.sheet.enter; items carry letter hints; disabled items show their reason as secondary text, not a tooltip only.
  • Scope switch inside the sheet. Switching Files / Chat / Both crossfades the impact summary (160 ms) and rolls the confirm button counts ("Restore 3 files" → "Restore 3 files and rewind 2 turns"); the button keeps its width reserved for the longest label (one cell, Arc idea, note 12).
  • Restore — files. Each later file-edit chip touched by the restore morphs to Reverted (↶ rotates −90° → 0, 160 ms) in transcript order with stagger.bulk (30 ms, cap 8); the "Restoring n of m" count rolls with dur.digit.roll.
  • Restore — chat. Turns after the marker fold upward into a single "2 rewound turns · Bring back" row (dur.rewind.fold, 280 ms, stagger 20 ms cap 6), then the rewound user prompt travels from its bubble into the composer (dur.travel, ≤ 260 ms) with the caret at its end. If the composer has a draft, the prompt is not moved; a chip "Rewound prompt · Insert" appears above the composer instead (proposed).
  • Restored. The marker label crossfades to "You are here" and an accent wash fades over 600 ms.
  • Undo toast. Rises 8 px from the composer edge (200 ms ease.out); a 1 px hairline depletes over undo.window (10 s, proposed); hover or focus pauses it and it resumes with at least 3 s left. Undo plays the same choreography backwards (chips un-revert, fold re-expands).
  • Fork. The marker duplicates: a ghost diamond slides 12 px toward the end edge and fades (200 ms) while the toast appears; if the host opens the fork in a new tab, the tab strip owns that animation.
  • Failure. Toast in danger tone, glyph nudge 2 × 3 px (tools.md error nudge); text never shakes.
  • Auto vs manual. Auto markers are hairline-only at rest; Manual markers always show their name and a flag; saving a manual checkpoint (⌘S in the timeline) stamps the diamond with a 160 ms scale pulse 1 → 1.2 → 1.
Timing
TransitionDurationDelayEasing / springStaggerFrame rate
Marker hairline draw240 msat turn startease.out—60 Hz
Diamond enter160 ms, scale 0 → 10spring.snap—60 Hz
Actions reveal / hide120 ms / 120 ms150 ms / 300 ms graceease.out / ease.in—60 Hz
Preview popover140 ms200 msease.out—60 Hz
Menu / sheet enter220 ms, y +12 → 00spring.snap—60 Hz
Menu / sheet exit160 ms0ease.in—60 Hz
Impact skeleton—150 ms——30 Hz shimmer (skeletons.md)
Scope switch160 ms crossfade + 280 ms count roll0ease.in-out / ease.out30 ms digits60 Hz
Chip revert cascade160 ms each0spring.snap30 ms, cap 860 Hz
Rewind fold280 msafter files settleease.in-out20 ms, cap 660 Hz
Prompt → composer≤ 260 msafter foldease.in-out—60 Hz
"You are here" wash600 ms0ease.out—30 Hz
Undo toast enter / exit200 ms / 160 ms0ease.out / ease.in—60 Hz
Undo hairline10 s (paused on hover/focus)0linear—10 Hz
Manual save pulse160 ms0spring.snap—60 Hz
Fork ghost200 ms, x +12, fade0ease.out—60 Hz
Reduced motionhairline and diamond appear instantly; reveals, popovers, sheets and toasts use 80 ms opacity crossfades with no offsets; no cascade (all chips swap together); rewind fold is instant with an 80 ms crossfade; prompt appears in the composer without travel; no wash (static 2 px accent outline for 2 s); undo countdown is text "Undo · 9 s" updated at 1 Hz—linearnoneevent-driven

Responsive behaviour

  • Rungs grow with their text; the header buttons wrap under the summary when narrow.
Edge cases (spec)
  • Restore while the agent runs. Restore actions are Blocked; "Stop and restore" stops the run (send-control Stop semantics), waits for Cancelled, then opens the impact sheet. Preview and Fork stay available because they change nothing in this thread.
  • User has a draft in the composer when rewinding chat: the rewound prompt goes to a chip above the composer, never overwrites the draft.
  • Very fast agents writing many turns quickly: markers still enter one per turn; a burst of markers inside 1 s merges visually into one hairline with a count badge "3 checkpoints" until hovered.
  • Hundreds of checkpoints. Inline markers remain one per turn; side list virtualises and groups by day; scrubber aggregates diamonds closer than 4 px into a stacked diamond with a count.
  • Same file restored twice (restore, then restore an older one): each creates its own RestorePoint; undo always targets the most recent restore only; older ones are reachable in the list.
  • Undo after further edits. If files changed after the restore (user or agent), Undo opens the impact sheet instead of applying directly ("2 files changed since the restore").
  • Partially captured checkpoints. Preview lists skipped files with the reason; the confirm sheet says "1 file can't be restored (too large)".
  • Checkpoint on a different git branch than the current one: preview shows "Captured on feature/auth, you're on main"; restore writes files into the current branch's working tree and the sheet says so (no checkout happens, checkpoints-git.md §2.1 rule 3).
  • Fork without worktree support. Fork starts on current files with a note "Files in the fork start as they are now".
  • Long prompt excerpts. One line, 60 ch, ellipsis; full text in the preview and accessible name.
  • RTL. Marker hairline and side list mirror; times, paths and counts stay LTR; the scrubber's time axis keeps left → right (run-replay.md §7 convention).
  • Tiny sizes (16–20 px). Marker is the diamond only; Enter / tap opens the menu; preview disabled.
  • Dense IDE panels. 20 px marker rows, no labels at rest, preview opens on Enter instead of hover.
  • Touch. 44 px hit area on markers; long-press for preview; menu becomes a bottom sheet; undo toast sits above the keyboard.
  • Slow networks / remote store. Impact skeleton after 150 ms; if impact takes > 5 s, the sheet offers "Restore without summary" with a generic warning (rollback-impact.md ImpactUnavailable).
  • Expired mid-flow. If retention removes files between Confirming and Restoring, the restore fails with "No files were restored · this checkpoint has expired" and nothing changes.

Notes for AI

  • Import UndoLadder from oxyn_dioxus and include HITL_CSS plus the token stylesheet once.
  • A GPUI version exists: CheckpointsView in oxyn_gpui.
  • Props to set first: steps.
  • 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