Description
Add a non-destructive versioning system (like Git for circuits) that lets users create named checkpoints, browse history, and branch into alternative designs without losing previous work.
Features
- Manual named checkpoints ("before adding ALU", "working version")
- Auto-checkpoints at configurable intervals
- Visual timeline of checkpoints
- Restore any checkpoint without losing later ones
Acceptance Criteria
Implementation Guide
1. Checkpoint storage
- Each checkpoint is a serialized snapshot of the circuit (use existing
Serialization::serialize())
- Store as compressed blobs (qCompress) in a sidecar file (e.g.,
.panda.history) or embedded in the .panda metadata
- Delta compression: store only changed elements relative to previous checkpoint (optional optimization)
2. Checkpoint manager
- Create
CheckpointManager class owned by WorkSpace
- Methods:
createCheckpoint(name), restoreCheckpoint(index), listCheckpoints()
- Auto-checkpoint: connect to
Scene::circuitHasChanged with a debounce timer
3. UI
- Add a checkpoint panel (dockable widget or sidebar)
- Show timeline with checkpoint names and timestamps
- Double-click to restore, right-click for rename/delete
- Add toolbar button for quick checkpoint creation
4. Integration with undo stack
- Checkpoints are independent of QUndoStack — they capture full state, not incremental commands
- Restoring a checkpoint clears the undo stack and loads the snapshot
Key files
App/Scene/Workspace.h/.cpp — file management, save/load
App/IO/Serialization.h/.cpp — circuit serialization
App/UI/MainWindow.cpp — UI integration
- New files:
App/Scene/CheckpointManager.h/.cpp, App/UI/CheckpointPanel.h/.cpp
Description
Add a non-destructive versioning system (like Git for circuits) that lets users create named checkpoints, browse history, and branch into alternative designs without losing previous work.
Features
Acceptance Criteria
Implementation Guide
1. Checkpoint storage
Serialization::serialize()).panda.history) or embedded in the .panda metadata2. Checkpoint manager
CheckpointManagerclass owned byWorkSpacecreateCheckpoint(name),restoreCheckpoint(index),listCheckpoints()Scene::circuitHasChangedwith a debounce timer3. UI
4. Integration with undo stack
Key files
App/Scene/Workspace.h/.cpp— file management, save/loadApp/IO/Serialization.h/.cpp— circuit serializationApp/UI/MainWindow.cpp— UI integrationApp/Scene/CheckpointManager.h/.cpp,App/UI/CheckpointPanel.h/.cpp