f70e3c342944

revert: remove vault list search-scope toggle (both/emails/usernames) from sort bar; search defaults to full-text 'both' as before (v3.6.153)

time
2026-06-03 15:51 UTC · 4 months ago
machine
koh2
agent
claude-opus-4-8
session
revert vault scope toggle
parent
ae1591d81f00
5 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1src/popup/views/Vault.tsx+1 −16src/popup/views/contracts.test.tsx+0 −43
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 Password Manager",5-  "version": "3.6.152",5+  "version": "3.6.153",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 Password Manager",4-  "version": "3.6.152",4+  "version": "3.6.153",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.152",3+  "version": "3.6.153",44   "description": "Zero-knowledge password manager",55   "type": "module",66   "scripts": {

view file

src/popup/views/Vault.tsx+1 −16
@@ -6,9 +6,7 @@66 import {77   filterAndSortVaultEntries,88   entryMatchesDomain,9-  VAULT_SEARCH_SCOPE_OPTIONS,109   VAULT_SORT_OPTIONS,11-  type SearchScope,1210   type SortOrder,1311 } from "./vault-search";1412 @@ -115,7 +113,6 @@115113 116114 export function VaultView(props: VaultProps) {117115   const [search, setSearch] = createSignal("");118-  const [searchScope, setSearchScope] = createSignal<SearchScope>("both");119116   const [selectedTags, setSelectedTags] = createSignal<Set<string>>(new Set());120117   const [notesOnly, setNotesOnly] = createSignal(false);121118   const [selecting, setSelecting] = createSignal(false);@@ -250,7 +247,7 @@250247       notesOnly: notesOnly(),251248       selectedTags: selectedTags(),252249       query: search(),253-      searchScope: searchScope(),250+      searchScope: "both",254251       sortOrder: props.sortOrder,255252       currentTabDomain: props.currentTabDomain,256253     });@@ -402,18 +399,6 @@402399                   <button403400                     class={`peach-sort-btn${props.sortOrder === key ? " is-active" : ""}`}404401                     onClick={() => props.onSortOrderChange(key)}405-                  >406-                    {label}407-                  </button>408-                )}409-              </For>410-              <For each={VAULT_SEARCH_SCOPE_OPTIONS}>411-                {({ key, label }) => (412-                  <button413-                    class={`peach-sort-btn peach-sort-scope-btn${searchScope() === key ? " is-active" : ""}`}414-                    onClick={() => setSearchScope(key)}415-                    aria-label={`Search ${label}`}416-                    title={`Search ${label}`}417402                   >418403                     {label}419404                   </button>

view file

src/popup/views/contracts.test.tsx+0 −43
@@ -830,49 +830,6 @@830830     expect(document.activeElement).toBe(search);831831   });832832 833-  it("Vault search scope toggle flips between emails and usernames", async () => {834-    const container = mount(835-      <VaultView836-        entries={[837-          sampleEntry({838-            id: "entry-2",839-            title: "Mailbox",840-            username: "june-user",841-            email: "[email protected]",842-            url: "https://mail.example.com",843-          }),844-        ]}845-        sortOrder="recent"846-        onSelectEntry={vi.fn()}847-        onSortOrderChange={vi.fn()}848-        onAdd={vi.fn()}849-        onClose={vi.fn()}850-      />851-    );852-853-    await flushView();854-855-    const search = container.querySelector(".peach-list-top .peach-search-input") as HTMLInputElement;856-    inputText(search, "june-user");857-    await flushView();858-859-    expect(container.querySelectorAll(".peach-entry-row")).toHaveLength(1);860-861-    const scopeButtons = Array.from(container.querySelectorAll(".peach-sort-scope-btn")) as HTMLButtonElement[];862-    const emails = scopeButtons.find((button) => button.textContent?.trim() === "emails");863-    const usernames = scopeButtons.find((button) => button.textContent?.trim() === "usernames");864-    expect(emails).toBeTruthy();865-    expect(usernames).toBeTruthy();866-867-    emails?.click();868-    await flushView();869-    expect(container.querySelectorAll(".peach-entry-row")).toHaveLength(0);870-871-    usernames?.click();872-    await flushView();873-    expect(container.querySelectorAll(".peach-entry-row")).toHaveLength(1);874-  });875-876833   it("Import existing-vault add mode parses a file and batches entries into the vault", async () => {877834     parseImportSourceMock.mockResolvedValue(878835       sampleImportResult({

view file