94fda772d1b5

fix: Show full used-email picker in entry editor (v4.9.9)

time
2026-08-14 20:47 UTC · 2 months ago
machine
koh2
parent
d550f48a729d
5 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/popup/views/Entry.tsx+4 −2src/popup/views/contracts.test.tsx+25 −0
manifest.firefox.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "4.9.8",4+  "version": "4.9.9",55   "description": "Zero-knowledge password manager",66   "browser_specific_settings": {77     "gecko": {

view file

manifest.json+1 −1
@@ -2,7 +2,7 @@22   "manifest_version": 3,33   "minimum_chrome_version": "116",44   "name": "Peach Password Manager",5-  "version": "4.9.8",5+  "version": "4.9.9",66   "description": "Zero-knowledge password manager",77   "action": {88     "default_popup": "src/popup/index.html",

view file

package.json+1 −1
@@ -1,6 +1,6 @@11 {22   "name": "peach",3-  "version": "4.9.8",3+  "version": "4.9.9",44   "description": "Zero-knowledge password manager",55   "license": "GPL-3.0-only",66   "type": "module",

view file

src/popup/views/Entry.tsx+4 −2
@@ -179,9 +179,11 @@179179   const identitySuggestions = createMemo(() => {180180     const field = editingField();181181     if (field !== "username" && field !== "email") return [];182-    const input = draft().toLowerCase();183182     return allIdentities()184-      .filter(s => s.type === field && (!input || s.value.toLowerCase().includes(input)))183+      // Inline editing starts with the saved value selected. Keep the full184+      // identity list visible so editing an existing value is a picker, not a185+      // one-row exact-match result. AddView still filters while typing.186+      .filter(s => s.type === field)185187       .slice(0, 8);186188   });187189 

view file

src/popup/views/contracts.test.tsx+25 −0
@@ -1052,6 +1052,31 @@10521052     );10531053   });10541054 1055+  it("Entry keeps the full used-email list available while editing an email", async () => {1056+    const container = mount(1057+      <EntryView1058+        entry={sampleEntry({ email: "[email protected]" })}1059+        entries={[1060+          sampleEntry({ email: "[email protected]" }),1061+          sampleEntry({ id: "entry-2", email: "[email protected]" }),1062+          sampleEntry({ id: "entry-3", username: "duckuccino" }),1063+        ]}1064+        onDelete={vi.fn()}1065+        onFieldSaved={vi.fn(async () => undefined)}1066+      />1067+    );1068+1069+    const emailValue = Array.from(container.querySelectorAll(".peach-field-card")).find(1070+      (card) => card.querySelector(".peach-label")?.textContent === "email"1071+    )?.querySelector(".peach-inline-clickable") as HTMLSpanElement;1072+    emailValue.click();1073+    await flushView();1074+1075+    const suggestions = Array.from(container.querySelectorAll(".peach-identity-suggestion-value"))1076+      .map((element) => element.textContent);1077+    expect(suggestions).toEqual(["[email protected]", "[email protected]"]);1078+  });1079+10551080   it("Entry lets TOTP secrets be edited inline", async () => {10561081     sendMessageMock.mockResolvedValue({ ok: true });10571082     const onFieldSaved = vi.fn(async () => undefined);

view file