9a0edc58db45
fix(sw): await restoreFromSession before setupMessageHandler — no spurious lock screen on service-worker respawn (v3.6.115)
- time
- 2026-05-28 20:13 UTC · 5 months ago
- machine
- koh2
- parent
- 2c1167340654
↓ peach-browser-9a0edc58.tar.gzatlas at this save
files changed4 files
manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/background/entry.ts+8 −5manifest.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.114",5+ "version": "3.6.115",66 "description": "Zero-knowledge password manager",77 "browser_specific_settings": {88 "gecko": {manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22 "manifest_version": 3,33 "name": "Peach Password Manager",4- "version": "3.6.114",4+ "version": "3.6.115",55 "description": "Zero-knowledge password manager",66 "action": {77 "default_popup": "src/popup/index.html",package.json+1 −1
@@ -1,6 +1,6 @@11 {22 "name": "peach",3- "version": "3.6.114",3+ "version": "3.6.115",44 "description": "Zero-knowledge password manager",55 "type": "module",66 "scripts": {src/background/entry.ts+8 −5
@@ -29,11 +29,14 @@2929 });3030 });3131 32-export function start() {32+export async function start(): Promise<void> {3333 // Restore vault unlock state from chrome.storage.session if the MV3 service34- // worker was restarted mid-session. Runs before message handlers are active35- // so the first incoming message from the popup sees the correct unlock state.36- void restoreFromSession();34+ // worker was restarted mid-session. This MUST complete before the message35+ // handler is registered: a popup/content message that arrives in the gap36+ // between handler registration and restore completing would see a locked37+ // vault and bounce the user to the lock screen even though the session is38+ // still unlocked (SEV-3-B). The cost is one session-storage read (<1ms).39+ await restoreFromSession();3740 setupMessageHandler();3841 void setupAutoLock();3942 setupCommands();@@ -45,4 +48,4 @@4548 void hydratePersistedSyncState();4649 }4750 48-start();51+void start();