> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Undo and redo

> Reverse the last action, redo what you reversed. The keyboard-driven sibling of version history.

For quick reversals — last prompt, last edit — use Undo / Redo. For anything bigger, use [Version history](/building/version-history).

## Keyboard shortcuts

| Action | Mac | Windows / Linux |
| - | - | - |
| Undo last action | Cmd+Z | Ctrl+Z |
| Redo | Cmd+Shift+Z | Ctrl+Shift+Z |
| Open version history | Cmd+H | Ctrl+H |

Undo / redo work across the editor, the live preview, and visual edits.

## What undo reverts

| Action | Undoable? |
| - | - |
| Code mode hand-edit | ✓ |
| Visual edit | ✓ |
| Agent / Plan mode prompt result | ✓ |
| Schema migration | ✓ (with caveats — see below) |
| Deploy promotion | ✗ (use [rollback](/deployment/rollback)) |
| API key creation | ✗ |
| Workspace member removal | ✗ |

## Schema migration caveat

Undoing a schema-changing prompt restores the *code* but leaves the *database* with the new schema. The orphan field is harmless (no code references it) but stays until the next migration.

For destructive schema changes (renames, drops), undo will warn you and walk through the cleanup. See [Convex migrations](/convex/migrations).

## Tips

<Tip>
  **Undo + Redo + Version history work together.** Undo for the last 5 minutes; version history for older changes. Redo restores after an Undo if you change your mind.
</Tip>

<Tip>
  **Undo is per-user on multi-user projects.** If your teammate prompted last, Cmd+Z undoes *your* last action, not theirs. Use [version history](/building/version-history) to undo cross-user.
</Tip>

## Related

<CardGroup cols={3}>
  <Card title="Version history" icon="history" href="/building/version-history">
    For changes older than the last few actions.
  </Card>

  <Card title="Rollback" icon="rotate-ccw" href="/deployment/rollback">
    For undoing a production deploy.
  </Card>

  <Card title="Branching" icon="git-branch" href="/building/branching">
    For experimental changes you might discard.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.