feat(sync): write state under the Stashden names and carry the old ones over - #246
Merged
Merged
Conversation
…es over Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
…count's sync folder Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
BryanFRD
added this pull request to stack #252
October 3, 2026 11:41
Contributor
There was a problem hiding this comment.
Nothing blocking. The legacy state file is adopted before load and skipped by both the scan and the watcher. The localStorage migration runs in the PLATFORM factory, and sync-view injects that before it reads stashden.sync-folder:*, so the prefixed folder keys carry over as well.
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.
Refs #245. Bottom of the six-PR rename stack.
.stashden-sync.json, and partial downloads end in.stashpart. Opening a folder that only has.roxycloud-sync.jsonrenames it in place first (adopt_legacy), so a folder an older version synced keeps its history instead of resyncing from scratch. When both exist, the current one wins..roxycloud-sync.json,.roxycloud-sync.tmpand.roxypart, so a file an older version left behind is never uploaded as a user file.roxycloud.*storage key moves tostashden.*once at startup: the token, the server, and each account's sync folder (roxycloud.sync-folder:<email>). A value already under the new name is not overwritten.Tested: two engine tests, one per case (taking over the old state keeps a local deletion recognised; with both files the current one wins), with removing the takeover failing the first; watcher tests for the old names. The key migration was checked in a real browser: old token, server and per-account folder moved, an existing new value kept, unrelated keys untouched.