761e69236230

fix: Copy & fill auto-saves and dismisses — no extra Save click (v3.6.158)

time
2026-06-04 16:09 UTC · 4 months ago
machine
koh2
agent
claude-sonnet-4-6
session
signup form username+email+name detection
parent
2adce7cc303e
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/content/inject.ts+21 −2
manifest.firefox.json+1 −1
@@ -2,7 +2,7 @@22   "_comment_audio_capture": "Firefox does not honor the Chrome 'audioCapture' optional_permission — getUserMedia in WebExtensions is gated solely by the runtime permission prompt. Microphone access for chirp pairing works from the popup under the existing '<all_urls>' host permission; no manifest entry is required or accepted here.",33   "manifest_version": 3,44   "name": "Peach Password Manager",5-  "version": "3.6.157",5+  "version": "3.6.158",66   "description": "Zero-knowledge password manager",77   "browser_specific_settings": {88     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "3.6.157",4+  "version": "3.6.158",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": "3.6.157",3+  "version": "3.6.158",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/content/inject.ts+21 −2
@@ -1831,10 +1831,29 @@18311831     fillBtn.className = "gen-fill-btn";18321832     fillBtn.type = "button";18331833     fillBtn.textContent = "Copy & fill";1834-    fillBtn.addEventListener("click", () => {1834+    fillBtn.addEventListener("click", async () => {18351835       if (!currentPw) return;1836+      fillBtn.disabled = true;1837+      fillBtn.textContent = "Saving…";1838+      // Fill the page fields first — password lands immediately.18361839       options.onFillFields?.("", currentPw, "");1837-      renderSaveOffer(filledEmail, currentPw, filledUsername);1840+      // Auto-save to vault. Fall back to the save-offer form only if the save fails1841+      // (vault locked, quota exceeded, etc.) so the user sees the error and can retry.1842+      const saveUsername = filledUsername || filledEmail;1843+      const saveEmail = filledUsername ? (filledEmail || undefined) : undefined;1844+      try {1845+        const res = await chrome.runtime.sendMessage({1846+          type: "ADD_ENTRY",1847+          payload: { title: sTitle, url: sOrigin, username: saveUsername, email: saveEmail, password: currentPw, type: "login" },1848+        });1849+        if ((res as { ok?: boolean }).ok) {1850+          showSuccess(sTitle);1851+        } else {1852+          renderSaveOffer(filledEmail, currentPw, filledUsername);1853+        }1854+      } catch {1855+        renderSaveOffer(filledEmail, currentPw, filledUsername);1856+      }18381857     });18391858   }18401859 

view file