4a072a117aa0

fix sub-surface back navigation — health/import/export return to settings, add returns to caller (v3.6.30)

time
2026-05-19 17:31 UTC · 5 months ago
machine
koh2
parent
af020d18934b
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/popup/App.tsx+24 −17
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",5-  "version": "3.6.29",5+  "version": "3.6.30",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",4-  "version": "3.6.29",4+  "version": "3.6.30",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.29",3+  "version": "3.6.30",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/popup/App.tsx+24 −17
@@ -162,6 +162,9 @@162162   // onBack fires we return to Panic instead of Settings so the user keeps the163163   // destruction context they came from.164164   const [returnToPanic, setReturnToPanic] = createSignal(false);165+  // The view to return to when the add/edit view is dismissed. Normally "entry"166+  // but "health" when the user arrives via the fix-entry path from Vault Health.167+  const [editBackView, setEditBackView] = createSignal<View>("entry");165168   const [settingsExiting, setSettingsExiting] = createSignal(false);166169   const [showNotes, setShowNotes] = createSignal(false);167170   const [openNoteId, setOpenNoteId] = createSignal<string | undefined>(undefined);@@ -521,10 +524,9 @@521524         window.dispatchEvent(new Event("peach:settings-back"));522525         return;523526       }524-      if (v === "import" || v === "export" || v === "add" || v === "health") {525-        handleBack();526-        return;527-      }527+      if (v === "import" || v === "health") { setView("settings"); return; }528+      if (v === "export") { handleExportBack(); return; }529+      if (v === "add") { handleBack(); return; }528530       if (v === "chirp-sync") { setView("settings"); return; }529531     };530532     window.addEventListener("peach:back", handlePeachBack);@@ -712,7 +714,9 @@712714       if (e.key === "Escape") {713715         if (showNotes()) { setShowNotes(false); setOpenNoteId(undefined); return; }714716         if (v === "list") { setView("entry"); return; }715-        if (v === "settings" || v === "import" || v === "export" || v === "add" || v === "health") { handleBack(); return; }717+        if (v === "settings" || v === "add") { handleBack(); return; }718+        if (v === "import" || v === "health") { setView("settings"); return; }719+        if (v === "export") { handleExportBack(); return; }716720         if (v === "chirp-sync") { setView("settings"); return; }717721       }718722 @@ -976,10 +980,21 @@976980   }977981 978982   function handleBack() {983+    const dest = editBackView();984+    setEditBackView("entry");979985     setEditEntry(undefined);980-    setView("entry");986+    setView(dest);981987   }982988 989+  function handleExportBack() {990+    if (returnToPanic()) {991+      setReturnToPanic(false);992+      setView("panic");993+      return;994+    }995+    setView("settings");996+  }997+983998   function handleLock() {984999     clearCanarySuppressions();9851000     setEntries([]);@@ -1031,6 +1046,7 @@10311046       setView("entry");10321047       return;10331048     }1049+    setEditBackView(view()); // preserve caller view so back returns here10341050     setEditEntry(entry);10351051     setView("add");10361052   }@@ -1436,21 +1452,12 @@14361452             </Show>14371453             <Show when={view() === "import"}>14381454               <Suspense fallback={<div class="peach-loading"><PeachWordmark /></div>}>1439-                <ImportView onBack={handleBack} onImport={handleSave} />1455+                <ImportView onBack={() => setView("settings")} onImport={handleSave} />14401456               </Suspense>14411457             </Show>14421458             <Show when={view() === "export"}>14431459               <Suspense fallback={<div class="peach-loading"><PeachWordmark /></div>}>1444-                <ExportView1445-                  onBack={() => {1446-                    if (returnToPanic()) {1447-                      setReturnToPanic(false);1448-                      setView("panic");1449-                    } else {1450-                      handleBack();1451-                    }1452-                  }}1453-                />1460+                <ExportView onBack={handleExportBack} />14541461               </Suspense>14551462             </Show>14561463             <Show when={view() === "panic"}>

view file