Skip to content

feat(sync): write state under the Stashden names and carry the old ones over - #246

Merged
BryanFRD merged 2 commits into
mainfrom
rename/state-files
Oct 3, 2026
Merged

BryanFRD merged 2 commits into
mainfrom
rename/state-files

Conversation

@BryanFRD

@BryanFRD BryanFRD commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Refs #245. Bottom of the six-PR rename stack.

  • A synced folder now keeps .stashden-sync.json, and partial downloads end in .stashpart. Opening a folder that only has .roxycloud-sync.json renames 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.
  • The scan and the watcher still ignore .roxycloud-sync.json, .roxycloud-sync.tmp and .roxypart, so a file an older version left behind is never uploaded as a user file.
  • In the browser and the desktop WebView, every roxycloud.* storage key moves to stashden.* 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.

…es over

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
…count's sync folder

Signed-off-by: BryanFRD <bryanferrando59@gmail.com>
@BryanFRD
BryanFRD added this pull request to stack #252 October 3, 2026 11:41

@ferrfleet ferrfleet Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@BryanFRD BryanFRD changed the title rename/state files feat(sync): write state under the Stashden names and carry the old ones over Oct 3, 2026
@BryanFRD
BryanFRD merged commit a58c268 into main Oct 3, 2026
10 of 11 checks passed
@BryanFRD
BryanFRD deleted the rename/state-files branch October 3, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant