Repository navigation
Description
What's missing. The three recents lists (Search ⌘H, Selection, and Go to folder) can only be emptied one entry at a time. Someone who wants a clean slate (privacy, a demo, a list full of stale paths) has to remove entries one by one. In Search and Selection, removing an entry is a right-click on the row with no visible hint, so many people won't find even that.
What exists. The backend has had "clear all" since the stores were built (2026-05-22 and 2026-05-23) and nothing ever called it: clear_recent_searches, clear_recent_selections, and clear_recent_paths. The IPC dead-code audit found them (docs/notes/ipc-dead-code-audit.md), and they sit on the desktop-ipc-unused allowlist until this lands.
Needs UI design. My ideas, roughly in order of value:
- A "Clear history" row at the bottom of each recents popover, below the list and above the key hint. One click clears, and a toast offers Undo ("Cleared 24 recent searches"). Undo beats a confirmation step here: it's faster, nothing is lost for good, and it matches how the rest of Cmdr treats reversible actions. The undo can live in the frontend: keep the cleared entries in memory while the toast is up, and re-add them on Undo.
- Command palette entries: "Clear recent searches", "Clear recent selections", and "Clear recent folders". Keyboard-first, no dialog to open, and the same undo toast.
- Make removing one entry discoverable, while we're in there. Today Go to folder shows an × on each row, but Search and Selection hide removal behind a right-click. Suggest one model for all three: an × on the hovered or cursor row, plus Delete removing the cursor row (the popover already owns ↑↓ and Enter).
- Optional, in Settings: a "Clear now" button beside each "how many to keep" setting (
search.recentSearches.maxCount,selection.recentSelections.maxCount). It's where privacy-minded people look first. Low priority if 1 and 2 land.
Recommendation: 1 + 2 + 3. Skip 4 unless it's nearly free.
For the implementer.
- Search and Selection share
apps/desktop/src/lib/query-ui/recent-items/RecentItemsPopover.svelteovercreateRecentItemsState(recent-items-state.svelte.ts). Addclear()there next toremove. - Go to folder has its own mirror in
apps/desktop/src/lib/go-to-path/recent-paths-state.svelte.tsand its own rows. - Wrappers
clearRecentSearchesandclearRecentSelectionsalready exist insrc/lib/tauri-commands/.clear_recent_pathshas no wrapper yet. - Drop the three entries from
scripts/check/checks/desktop-ipc-unused-allowlist.jsononce they have callers (the check reports them when they're no longer needed). - Palette commands need a
COMMAND_IDSentry, acommand-registry.tsentry, and a handler (lib/commands/CLAUDE.md). - New copy goes to David for review, then the translator agents.
Origin: the IPC dead-code audit, 2026-10-03.
Activity
docs(ipc): link the open IPC dead-code questions to their issues (#359 …