Version History
cdbx tracks every change you make and every save you take so you can always get back to a working state.
There are two panels in the editor sidebar dedicated to this: Changes and Timeline.
Changes panel
The Changes panel shows every file that has been modified, added, or deleted since the last time you saved your app.
Open it by clicking the branch icon in the left sidebar. A badge appears on the icon when there are unsaved changes.
File statuses
| Icon | Colour | Meaning |
|---|---|---|
| Modified | Yellow | File exists in the save but content has changed |
| Added | Green | File was created after the last save |
| Deleted | Red | File existed in the save but has been removed |
Each row shows the file name, its path, and the +N / -N line count for the diff.
Viewing a diff
Click any file row to expand an inline diff — removed lines in red, added lines in green.
Discarding changes
- Per file — click ↺ (modified/deleted) or Delete (added) on the file row to revert that file to its saved state.
- Discard all — click the Discard all button in the panel header to revert every changed file at once.
Discarding does not save; it just restores the in-editor state. Your preview updates immediately and the file shows as clean.
Merging hunks
For modified files, click Merge to open a hunk picker. Each changed block in the file is shown as a card. For each hunk you choose:
- Snapshot — use the saved version of that block
- Current — keep your current version
Click Apply merge when done.
Timeline panel
The Timeline panel shows the full save history for your app — one entry per time you clicked Save.
Open it by clicking the history icon (Git pull request draft) in the left sidebar.
Browsing saves
Each row shows:
- The save name (or a relative timestamp if unnamed)
- The exact date and time
- How many files differ between that save and the current state
Click any row to open the detail view for that save.
Renaming a save
Hover a row and click the pencil icon to rename it inline. Press Enter to confirm, Escape to cancel.
Snapshot detail view
The detail view lists every file that differs between the selected save and your current state.
File statuses in the detail view:
| Status | Meaning |
|---|---|
| Modified | Exists in both but content changed since the save |
| New | Added after the save (not in the snapshot) |
| Removed | Was in the save, deleted since |
Click a file row to expand the inline diff.
Per-file actions:
- Restore — revert that file to its snapshot version (or re-create it if it was deleted since)
- Remove — delete the file (for files that didn't exist at snapshot time)
- Merge — open the hunk picker to cherry-pick changes block by block
Restore all — restores every file to its snapshot state, deletes any files created after the snapshot, and re-bundles. Nothing is written to the database; dirty dots appear and you save explicitly when satisfied.
Auto-snapshot on AI write
Every time the AI auto-applies files to your app, cdbx automatically captures a snapshot of the state before the write. This means every AI edit is immediately undoable from the Timeline — no manual save required.