feat: Persistent checkpoint & session history (Issue #72)#95
Merged
Conversation
Serialize checkpoints to disk and restore on extension restart. ### Changes - Add CheckpointStore class: filesystem persistence for checkpoints - Saves checkpoints as JSON files under .champ/checkpoints/ - Loads checkpoints on manager initialization - Handles Uint8Array serialization via base64 encoding - Gracefully skips corrupted files - Update CheckpointManager with persistence: - Constructor accepts optional storagePath parameter - Load checkpoints from disk on initialization via async loadFromDisk() - Save checkpoints to disk when created - Delete checkpoints from disk when restored or cleared - Maintain backward compatibility: clear() remains synchronous - Update extension.ts: - Initialize CheckpointManager with .champ/checkpoints storage path ### Testing - TDD: 9 new tests for CheckpointStore persistence - TDD: 6 new tests for CheckpointManager persistence - All 1283 tests pass (including new tests) - No breaking changes to existing functionality ### Acceptance Criteria - Checkpoints persist across extension restarts ✓ - Checkpoint state is restored from disk on initialization ✓ - Checkpoints are serialized to human-readable JSON files ✓ - Corrupted checkpoint files are skipped gracefully ✓ - Storage path is configurable (defaults to .champ/checkpoints) ✓ Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DLSvxucbfqMjup96KyKVyE
Resolves TypeScript noUnusedLocals error in PR #95 (Issue #64). The 'path' module was imported but never used. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DLSvxucbfqMjup96KyKVyE
hellodk
force-pushed
the
feat/issue-72-persistent-checkpoints
branch
from
July 16, 2026 18:34
49fe915 to
eada476
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements persistent checkpoint and session history restoration across extension restarts.
.champ/checkpoints/Implementation Details
New Files
src/checkpoints/checkpoint-store.ts: Filesystem persistence layer for checkpointstest/unit/checkpoints/checkpoint-store.test.ts: Comprehensive tests for checkpoint storageModified Files
src/checkpoints/checkpoint-manager.ts: Added persistence integrationstoragePathparameterloadFromDisk()on initializationwaitForLoad()method for testing/synchronizationsrc/extension.ts: Initialize CheckpointManager with storage pathtest/unit/checkpoints/checkpoint-manager.test.ts: Added 6 persistence testsTest Results
Acceptance Criteria
.champ/checkpoints/Testing
Run checkpoint tests:
npm test -- checkpointRun full test suite:
npm test🤖 Generated with Claude Code
https://claude.ai/code/session_01DLSvxucbfqMjup96KyKVyE