6a30323ef695
feat: UI-6 popup lock port uses nonce'd name popup-<uuid> (pairs with LV-5 entry.ts acceptance)
- time
- 2026-06-10 03:34 UTC · 4 months ago
- machine
- koh2
- agent
- claude-opus-4-8
- session
- audit fix integration
- parent
- 9af036ca50b9
↓ peach-browser-6a30323e.tar.gzatlas at this save
files changed1 file
src/popup/App.tsx+4 −1src/popup/App.tsx+4 −1
@@ -463,7 +463,10 @@463463 // The SW's onConnect listener locks when this port disconnects.464464 let popupPort: chrome.runtime.Port | null = null;465465 try {466- popupPort = chrome.runtime.connect({ name: "popup" });466+ // UI-6 / LV-5: nonce the port name per popup open. The SW's onConnect467+ // listener accepts the "popup-" prefix; the random suffix is defence in468+ // depth against a port named exactly "popup" from anything but our popup.469+ popupPort = chrome.runtime.connect({ name: `popup-${crypto.randomUUID()}` });467470 } catch { /* extension context invalidated — ignore */ }468471 onCleanup(() => { try { popupPort?.disconnect(); } catch {} });469472