Repository navigation
fix(desktop): account-bound sync without the stale enablement flag - #3
Merged
Merged
Conversation
The profiles.json sync_enabled flag could disagree with the stored per-account server session: migrated accounts looked connected in Settings while background sync silently skipped them. Credentials are now the single source of truth. Switching or creating an account bumps an account generation before the vault changes, so an in-flight run for the previous account can no longer write its response, cursor or blobs into the new vault, and the newly active account is synced right away. Manual and background runs share one serialized gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop the second "advanced" VDS login form: it could attach a server identity unrelated to the active local account. Settings now offers the account toggle, the connected email with a manual "Sync now" button, and account deletion behind password confirmation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Ports the uncommitted 2026-08-21 desktop sync work onto the refactored
main(the server half is in #2).profiles.jsonsync_enabledflag is removed; stored per-account credentials decide whether an account syncs. Previously migrated accounts could look connected in Settings while background sync silently skipped them. Oldprofiles.jsonfiles still load (the extra field is ignored).server_sync/active_account.rs: creating or switching an account bumps a generation counter before the vault changes. A sync run re-checks account + generation before every write (exchange apply, cursor, blob upload/download, on-demand audio), so a response for account A can't land in account B's vault. The newly active account is synced right after the switch.tokio::sync::Mutexgate.ServerAuthForm/ServerAccountCard/useServerAccount) is removed — it could attach a server identity unrelated to the active local account. Settings now shows the account toggle, the connected email with a "Sync now" button, and account deletion behind password confirmation.v1-release-plan.mdrecords this fix and the 2026-08-21 VDS stability rollout.Test plan
scripts/check.ps1— frontend (tsc, eslint, vitest 132), desktop-rust (fmt, clippy, 135 tests incl. newsync_context_expires_when_the_active_account_changes), server (fmt, clippy, tests)🤖 Generated with Claude Code