Fix manual checkpoint creation to detect actual workspace changes#4
Merged
christse merged 5 commits intofeature/track-stop-symbolsfrom Feb 5, 2026
Merged
Fix manual checkpoint creation to detect actual workspace changes#4christse merged 5 commits intofeature/track-stop-symbolsfrom
christse merged 5 commits intofeature/track-stop-symbolsfrom
Conversation
Co-authored-by: christse <[email protected]>
…t detection Co-authored-by: christse <[email protected]>
Co-authored-by: christse <[email protected]>
Copilot
AI
changed the title
[WIP] WIP Address feedback on track/stop commands
Fix manual checkpoint creation to detect actual workspace changes
Feb 4, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where manual checkpoints created with boxel history . -m "message" were incorrectly reporting 0 files changed, always being marked as minor, and missing file information needed for restore operations. The issue was caused by passing an empty changes array to checkpoint creation.
Changes:
- Added
detectCurrentChanges()method to CheckpointManager that detects actual workspace changes by syncing files and parsinggit status --porcelainoutput - Updated manual checkpoint creation in history.ts to use the new detection method instead of passing an empty array
- The method properly handles all git status codes including added, modified, deleted, renamed, copied, unmerged, and type-changed files
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/lib/checkpoint-manager.ts | Added detectCurrentChanges() method that syncs workspace files and uses git status to accurately detect changes since the last checkpoint |
| src/commands/history.ts | Updated manual checkpoint creation to call manager.detectCurrentChanges() instead of passing an empty changes array |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
christse
pushed a commit
that referenced
this pull request
Apr 20, 2026
Six fixes in one commit, addressing every Copilot comment except #7 (dead code, deferred to a later cleanup pass). #4 — manifest shape mismatch (critical): push.ts was still reading/writing the old manifest format (files[path] = hashString) while pull.ts and sync.ts use the new {localHash, remoteMtime} shape. push now uses the new shape, migrates old manifests on read (mirrors sync.ts detector), and refreshes remoteMtime via getRemoteMtimes() after a successful upload so the next pull/sync sees a consistent picture. #3 — partial-success manifest (important): In --batch mode we were marking every instance as synced when result.uploaded > 0, even if some failed. Now we derive failed paths from result.errors and only add successes to the manifest. Failed uploads stay out and get retried on the next run. #6 — ATOMIC_SOURCE_EXTENSIONS gap (important): EXTENSION_MAP was missing .tsx/.jsx/.cjs/.scss/.less/.sass, so those extensions got application/octet-stream and were routed through individual POST instead of /_atomic despite being listed as atomic-source compatible. Now mapped to application/typescript/javascript and text/x-* respectively, so isTextFile() returns true and they take the atomic path. #2 — CLI --version out of sync: program.version() was hardcoded to '1.0.0' while package.json is at 1.0.1. Now reads from package.json via createRequire so boxel --version stays accurate on every release. #1 — --batch-size NaN guard: parseInt on bad input (e.g. "abc") returned NaN, which bypasses `?? 10` and flows into the uploader as NaN. Now uses a parsePositiveInt parser that throws InvalidArgumentError with a friendly message on non-positive-integer input. #5 — invalid-JSON test expectation: The test expected data.type='file' but the code (correctly) emits 'source' because /_atomic only accepts 'card' and 'source' resource types. Test updated to match the correct contract. All 164 tests pass (was 163/164 before this commit). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
christse
pushed a commit
that referenced
this pull request
Apr 20, 2026
Six fixes in one commit, addressing every Copilot comment except #7 (dead code, deferred to a later cleanup pass). #4 — manifest shape mismatch (critical): push.ts was still reading/writing the old manifest format (files[path] = hashString) while pull.ts and sync.ts use the new {localHash, remoteMtime} shape. push now uses the new shape, migrates old manifests on read (mirrors sync.ts detector), and refreshes remoteMtime via getRemoteMtimes() after a successful upload so the next pull/sync sees a consistent picture. #3 — partial-success manifest (important): In --batch mode we were marking every instance as synced when result.uploaded > 0, even if some failed. Now we derive failed paths from result.errors and only add successes to the manifest. Failed uploads stay out and get retried on the next run. #6 — ATOMIC_SOURCE_EXTENSIONS gap (important): EXTENSION_MAP was missing .tsx/.jsx/.cjs/.scss/.less/.sass, so those extensions got application/octet-stream and were routed through individual POST instead of /_atomic despite being listed as atomic-source compatible. Now mapped to application/typescript/javascript and text/x-* respectively, so isTextFile() returns true and they take the atomic path. #2 — CLI --version out of sync: program.version() was hardcoded to '1.0.0' while package.json is at 1.0.1. Now reads from package.json via createRequire so boxel --version stays accurate on every release. #1 — --batch-size NaN guard: parseInt on bad input (e.g. "abc") returned NaN, which bypasses `?? 10` and flows into the uploader as NaN. Now uses a parsePositiveInt parser that throws InvalidArgumentError with a friendly message on non-positive-integer input. #5 — invalid-JSON test expectation: The test expected data.type='file' but the code (correctly) emits 'source' because /_atomic only accepts 'card' and 'source' resource types. Test updated to match the correct contract. All 164 tests pass (was 163/164 before this commit). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.
Manual checkpoints created with
boxel history . -m "message"passed an empty changes array, resulting in incorrect metadata (0 files changed, always marked minor, missing file information for restore operations).Changes
Added
detectCurrentChanges()to CheckpointManagergit status --porcelainto detect changes since last checkpointCheckpointChange[]for checkpoint creationUpdated manual checkpoint flow in
history.tsManual checkpoints now show correct file counts, proper major/minor classification, and support accurate restoration.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.