Repository navigation
Sync on unlock, off by default (0.9.0) - #12
Merged
Merged
Conversation
Settings -> Sync gets a "Sync when I unlock" switch once sync is set up. On, PassMan syncs a moment after the vault opens; a conflict still waits for the user's choice, and an unreachable server is a warning, not an error. Stored with the vault's sync settings, so it is per vault and per PC; a vault restored onto a new PC starts with it off. A sync can now be running when the vault is locked, so a late result no longer touches a locked vault (or one unlocked since): sync_ui._still_open checks an unlock/lock counter. Locking during a sync skips its safety-net save, which could otherwise put the pre-merge copy back on disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH
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.
Sync on unlock (0.9.0)
TODO step 4 (owner, 2026-11-06): a setting, off by default.
sync_ui._still_open, an unlock/lock counter). It also no longer pops a confusing error after the lock. Locking during a sync skips its safety-net save, which could otherwise land after the merge and put the pre-merge copy back on disk.No vault-format change. README: the sync section and the feature list.
Tests
tests/test_sync_on_unlock.py, 20 tests: default off, only a realTruecounts, needs a server, survives an address edit, a merge keeps this PC's choice, a restore starts off; late prepare/commit/mismatch results after lock; the window's delayed start; lock vs a running sync.E:\CLAUDE\PassMan\Lab\dev-shots\flows_unlock.py, a throwaway server on 127.0.0.1:8797 with its own store in Lab): 15/15 on this source too. It checks: off by default; the switch is saved; another PC's entry arrives on unlock; lock at once → no sync; lock mid-sync → nothing comes back and no error; the next unlock catches up; server down → the vault opens with a warning. The missing guard fails it.🤖 Generated with Claude Code
https://claude.ai/code/session_011ojnyVg7ccsR3pZ64s7aRH