fix: avoid rewriting all passwords when editing one connection - #289
Merged
Maxteabag merged 1 commit intoAug 7, 2026
Merged
Conversation
Owner
|
Thanks for the PR — it's a nice improvement. I’m merging this now. I found one rename-ordering edge case around omitted credentials and failed keyring rename; I’ll handle that now in another pr so your core optimization can land without asking you for another revision. |
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.
Context
Connection details are stored in a single
connections.jsonindex, while passwords (database and SSH) are stored securely in the OS keyring — macOS Keychain, Windows Credential Locker, or Linux Secret Service.Until now, saving a change to one connection rewrote the keyring entries for every saved connection, not just the one being edited. Adding, updating, and deleting a connection all funneled through a "save everything" path that looped over the full list and re-wrote each connection's stored password.
Why this was necessary
On many systems a keyring write is not free: it can be slow and, in some configurations, prompt the user for access each time. As a user's list of saved connections grows, editing a single connection became progressively slower and could surface repeated keyring access prompts — a poor experience for what should be a trivial change.
What changed
Impact
Testing