perf: locking never blocks on argon2; feat: add-code dialog, brand icons, NUL-safe TOTP keys - #14
Merged
Merged
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
… feat: add-code dialog
devin-ai-integration
Bot
force-pushed
the
feat/responsive-lock-and-add-code
branch
from
August 7, 2026 21:31
204fcc6 to
5ca748d
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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
Lock felt sluggish (spinning cursor) because every
save()— including the one insidelock()and every 2s autosave — re-ran Argon2id at themoderateprofile (256 MiB, 3 passes) on the main process, blocking the event loop for seconds.Vaultnow derives the snapshot key once at open and reuses it, so a save costs only gzip + one AEAD pass:The envelope is byte-compatible — the header still carries that salt and the cost params, so
decrypt(envelope, passphrase)is unchanged. The salt is reused across saves of the same file (same secret either way); each envelope still gets a fresh random 24-byte nonce.Vaultno longer retains the passphrase at all, only the derived key, which is zeroed on lock;changePassphrasere-derives.totp:listcrashed withnull character not permittedfor any secret whose decoded key contains a0x00byte (~1 in 16 real secrets). The vendored@pgpm/totpdecoded throughbase32.decode, which assembles its result withchr(byte)and returnstext— and Postgrestextcannot hold a NUL. Vendors the binary-safetotp.base32_to_hexthat already exists onconstructive-db@main(emits hex per byte, never materialising the key as text); these copies drop back to the published module once it ships, since npm's@pgpm/totp@0.36.0predates that fix. Covered by a vault test that generates a code for an all-zero key.Also:
VaultService.lock()clearsthis.vaultsynchronously and tracks the in-flight flush, sounlock()awaits it rather than racing; the renderer switches to the unlock screen immediately instead of awaiting the IPC round-trip.scripts/vendor-svgl.mjsintosrc/main/svgl-icons.json, falling back tosimple-iconsmonochrome glyphs and then a monogram. Both sets are bundled: nothing is fetched at runtime, so the app never reveals to a third party which services you hold accounts with. Lookup lives in the main process behind one batched IPC call, keeping ~4,000 icons out of the renderer bundle (unchanged at 1.37 MB); matching normalizes titles, soGitHub (alice@example.com)andgithub.comboth resolve.Link to Devin session: https://app.devin.ai/sessions/04636534e07048089ffb6b78142e12cd
Requested by: @pyramation