Repository navigation
fix(workspace): leave the legacy .vmark tree untouched on migration - #1586
Merged
Merged
Conversation
…WI-WS1.1) `read_config_in` migrated `.vmark/vmark.code-workspace` into app data and then called `cleanup_old_vmark`, which deleted the workspace file and removed the directory. In a repository that tracks `.vmark`, opening the workspace silently destroyed tracked files on first open. Migration is now read-only with respect to the repository: the app-data copy is written, and the legacy file and directory are left byte-for-byte intact. The legacy exclusion list is carried over unchanged, because `.vmark` still exists and stripping it would expose a tree the user had chosen to hide. The migration is still one-shot: the next read finds the app-data config and returns before the legacy branch. The regression test reads the workspace twice and asserts both that the legacy file is unchanged and that its content matches after the second read. Fixes #1579
xiaolai
deleted the
fix/issue-1579-workspace-migration-preserves-files
branch
October 20, 2026 03:16
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
.vmark/vmark.code-workspace, and no longer removes the.vmarkdirectory, from the repository..vmark; stripping it would expose a directory that still exists.Closes #1579
Why
read_config_inwrote the app-data config and then calledcleanup_old_vmark, which deleted the legacy workspace file and tried to remove the directory. In a repository that tracks.vmark, the first open destroyed tracked files with no prompt and no undo.Migration is now read-only with respect to the repository. It is still one-shot: the next read finds the app-data config and returns before the legacy branch.
What changed
src-tauri/src/workspace/legacy.rs: removedcleanup_old_vmarkandclean_excludes; migration carries the legacy exclusion list over unchanged.src-tauri/src/workspace/mod.rs: the durable app-data write no longer triggers cleanup; a failed write is still logged..claude/feature-ledger.md: records the non-destructive migration.Validation
cargo test --manifest-path src-tauri/Cargo.toml --lib workspace::— 140 passedcargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warningscargo fmt --manifest-path src-tauri/Cargo.toml --checkpnpm check:predelta