Skip to content

Let people clear the Search, Selection, and Go to folder recents in one go #359

Open

Description

@vdavid

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:

  1. 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.
  2. Command palette entries: "Clear recent searches", "Clear recent selections", and "Clear recent folders". Keyboard-first, no dialog to open, and the same undo toast.
  3. 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).
  4. 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.svelte over createRecentItemsState (recent-items-state.svelte.ts). Add clear() there next to remove.
  • Go to folder has its own mirror in apps/desktop/src/lib/go-to-path/recent-paths-state.svelte.ts and its own rows.
  • Wrappers clearRecentSearches and clearRecentSelections already exist in src/lib/tauri-commands/. clear_recent_paths has no wrapper yet.
  • Drop the three entries from scripts/check/checks/desktop-ipc-unused-allowlist.json once they have callers (the check reports them when they're no longer needed).
  • Palette commands need a COMMAND_IDS entry, a command-registry.ts entry, 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

  1. added
    enhancementNew feature or request
    needs-decisionWaits on a product or architecture call from David; the issue carries the question and its context
    on Oct 3, 2026
  2. self-assigned this
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

claude-createdenhancementNew feature or requestneeds-decisionWaits on a product or architecture call from David; the issue carries the question and its context

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions