25b1cdf118d8

resolve currentTabDomain before openVault so already-unlocked popups pick the domain match (v1.8.6)

time
2026-04-24 22:45 UTC · 6 months ago
machine
koh2
parent
690822a1ea3f
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/popup/App.tsx+6 −1
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "1.8.5",4+  "version": "1.8.6",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": "1.8.5",4+  "version": "1.8.6",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": "1.8.5",3+  "version": "1.8.6",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/popup/App.tsx+6 −1
@@ -237,9 +237,15 @@237237   }238238 239239   onMount(async () => {240+    // Resolve the active tab in parallel with the unlock/has-vault queries —241+    // openVault()'s smart selection picks the entry matching currentTabDomain,242+    // so it must be populated before openVault runs. Previously refreshCurrentTab243+    // ran after openVault, leaving popups that booted already-unlocked falling244+    // back to loadedEntries[0] instead of the domain match.240245     const [unlockResponse, vaultResponse] = await Promise.all([241246       sendMessage({ type: "IS_UNLOCKED" }),242247       sendMessage({ type: "HAS_VAULT" }),248+      refreshCurrentTab(),243249     ]);244250     const unlocked = Boolean(245251       (unlockResponse as { ok: boolean; data?: boolean }).data@@ -255,7 +261,6 @@255261     }256262 257263     await refreshPendingPasskey();258-    await refreshCurrentTab();259264 260265     // Track tab changes so smart sort stays current261266     const handleTabActivated = () => { void refreshCurrentTab(); };

view file