Roll back anytime

codraft keeps a version history of every document. Every time you write, your agent writes, or a comment-driven rewrite lands, a snapshot is saved. You can browse the history and restore any version with one click.

There's nothing to set up, it's on by default for every document.

Open the history panel

Click the clock icon in the right rail, or press ⌘⇧H. The panel slides open with the latest versions at the top.

Each entry shows:

  • A timestamp ("Just now", "2 min ago", "Yesterday at 4:18 PM")
  • A short note about what changed ("added accessibility section", "tightened the problem line")
  • An indicator showing which version is currently in the document

Preview a version

Click any version in the list. The document previews that version, scroll through to see what it looked like. The current version is preserved; you're just looking.

A banner appears at the top of the document: "Viewing version from 2 min ago, Restore or Close."

Restore

Click Restore to make the previewed version the current one. The document content snaps back; the restored version becomes the new latest snapshot, your forward versions aren't lost, they're still in the history.

Restoring is non-destructive. If you restore version A and then change your mind, version B is still there to go back to.

Compare two versions

Click one version, then hold and click another. Both are highlighted; a side-by-side diff opens above the document showing what changed.

When versions are saved

A snapshot is captured when:

  • You stop typing for a few seconds (a quiet moment).
  • Your agent finishes a write or rewrite.
  • A comment-driven edit is applied.
  • You explicitly save (⌘S) or save-as.

You don't need to "commit" anything, the history captures itself.

Tips

  • Roll back, don't undo, for big changes. ⌘Z is great for the last few keystrokes; the history panel is better when you want to go back to a coherent earlier state.
  • Name a version by adding a brief note in the title bar before a snapshot ("v2 sent to legal") so it's easy to find later.
  • Restore in private. Previewing a version doesn't change the file on disk, only Restore does.

Related

  • Take it anywhere, export the current version (or restore-then-export to share an older one).