a8d7ee7ebc11

passkey inline unlock: dismiss popup cleanly on vault unlock, skip autofill re-trigger (v2.40.1)

time
2026-05-13 16:29 UTC · 5 months ago
machine
koh2
parent
bf4d8ef41f0d
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/content/index.ts+20 −4
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "2.40.0",4+  "version": "2.40.1",55   "description": "Zero-knowledge password manager",66   "browser_specific_settings": {77     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "2.40.0",4+  "version": "2.40.1",55   "description": "Zero-knowledge password manager",66   "action": {77     "default_popup": "src/popup/index.html",

view file

package.json+1 −1
@@ -1,6 +1,6 @@11 {22   "name": "peach",3-  "version": "2.40.0",3+  "version": "2.40.1",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/content/index.ts+20 −4
@@ -54,6 +54,10 @@5454 const DISMISS_LOCK_MS = 800;5555 let dismissLock = false;5656 let dismissLockTimer: ReturnType<typeof setTimeout> | null = null;57+// Set when the inline popup was summoned specifically for a passkey-unlock58+// flow. The VAULT_UNLOCKED handler checks this to skip re-triggering autofill59+// (the passkey toast handles the next step instead).60+let passkeySummonActive = false;5761 function startDismissLock(): void {5862   dismissLock = true;5963   if (dismissLockTimer) clearTimeout(dismissLockTimer);@@ -870,10 +874,11 @@870874       if (anchor) {871875         currentDismiss?.();872876         currentAnchorField = null;877+        passkeySummonActive = true;873878         currentDismiss = showAutofillSelector(anchor, [], () => {}, {874879           domain: getPageDomain(),875880           locked: true,876-          onDismiss: () => {},881+          onDismiss: () => { passkeySummonActive = false; },877882         });878883       }879884     } else if (isShortcut) {@@ -900,9 +905,20 @@900905     return true;901906   }902907   if (msg?.type === "VAULT_UNLOCKED") {903-    // Close any open selector (e.g. the locked-state prompt) and re-open904-    // with fresh entry data. Use the saved anchor field so we reopen exactly905-    // where the user was — covers both inline unlock and popup unlock.908+    if (passkeySummonActive) {909+      // This unlock was for a pending passkey GET request. Just dismiss the910+      // inline popup — the passkey approval toast takes over from here.911+      passkeySummonActive = false;912+      if (currentDismiss) {913+        currentDismiss();914+        currentDismiss = null;915+        currentAnchorField = null;916+      }917+      sendResponse({ ok: true });918+      return true;919+    }920+    // Normal autofill path: close the locked-state prompt and re-open with921+    // fresh entry data at the same anchor field.906922     const savedField = currentAnchorField;907923     if (currentDismiss) {908924       currentDismiss();

view file