451d5a169ed5

keep vault alive while new entry form is open via 30s TOUCH_AUTO_LOCK heartbeat

time
2026-05-10 23:37 UTC · 5 months ago
machine
koh2
parent
917ff03ad570
6 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/background/messages.ts+5 −0src/popup/views/Add.tsx+7 −1src/shared/types.ts+1 −0
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach",4-  "version": "2.38.10",4+  "version": "2.38.11",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.38.10",4+  "version": "2.38.11",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.38.10",3+  "version": "2.38.11",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/background/messages.ts+5 −0
@@ -736,6 +736,11 @@736736         if (!vault.isUnlocked()) return { ok: false, error: "vault locked" };737737         return { ok: true, data: vault.getIdentities() };738738       }739+      case "TOUCH_AUTO_LOCK": {740+        // touchAutoLock() is already called by shouldRefreshAutoLock above;741+        // this case just gives the popup a typed message to keep the session alive.742+        return { ok: true };743+      }739744       case "GET_ADVANCED_HEALTH_REPORT": {740745         const gate = await requirePro("advanced_health");741746         if (!gate.allowed) return { ok: false, error: "pro_required" };

view file

src/popup/views/Add.tsx+7 −1
@@ -1,4 +1,4 @@1-import { createSignal, createMemo, createEffect, For, Show, onMount } from "solid-js";1+import { createSignal, createMemo, createEffect, For, Show, onMount, onCleanup } from "solid-js";22 import type { VaultEntry } from "../../shared/types";33 import { sendMessage } from "../App";44 import { parseOtpauthURI } from "../../crypto/totp";@@ -170,6 +170,12 @@170170       const tabUrl = tabs[0]?.url;171171       if (tabUrl && tabUrl.startsWith("http")) setCurrentTabUrl(tabUrl);172172     });173+    // Keep the vault alive while the form is open — the auto-lock alarm fires on174+    // a timer and doesn't know the user is actively filling in a new entry.175+    const keepAlive = setInterval(() => {176+      chrome.runtime.sendMessage({ type: "TOUCH_AUTO_LOCK" }).catch(() => {});177+    }, 30_000);178+    onCleanup(() => clearInterval(keepAlive));173179   });174180 175181   function getNormalizedTotp(): string | undefined {

view file

src/shared/types.ts+1 −0
@@ -304,6 +304,7 @@304304   | "SYNC_SESSION_STARTED"305305   | "GET_LOCAL_IP"306306   | "GET_IDENTITY_SUGGESTIONS"307+  | "TOUCH_AUTO_LOCK"307308   | "POPULATE_INLINE_VAULT"308309   | "TEST_LOCAL_WEBSOCKET"309310   | "TEST_SUBNET_DETECTION"

view file