Skip to content

[FEAT] Fuzzy matching for cross-session search #219

Description

@1fanwang

Is your feature request related to a problem? Please describe.

Cross-session search (the Cmd+K command palette, including its "Global"
across-all-projects mode) matches only exact, case-insensitive substrings. A
small typo or an approximate recollection of a phrase returns nothing — e.g.
searching authentcation surfaces none of the sessions that discuss
"authentication". When you're hunting for a session you only half-remember
across hundreds of transcripts, exact-only matching is the wrong default for
recall.

Describe the solution you'd like

An opt-in "Fuzzy" toggle in the command palette, next to the existing "Global"
toggle. When enabled, the backend scores each session's searchable text with
Fuse.js and returns ranked, typo-tolerant matches,
with snippets taken from the matched ranges. It applies in both project-scoped
and global modes.

Opt-in (default off) is deliberate: exact substring stays the fast path and
existing behaviour is unchanged, so there's no latency or result-quality
regression for people who don't want fuzziness.

Describe alternatives you've considered

  • Always-on fuzziness — scoring every entry on every keystroke across many
    sessions is heavier than the current substring fast-path, and some people
    want exact. A toggle keeps both.
  • A regex search mode — powerful, but solves precise-pattern matching, not
    approximate recall.
  • A hand-rolled subsequence matcher (no dependency) — viable, but Fuse.js is
    small, well-tested, and gives ranking + match indices for free. Flagging the
    new dependency here, per CONTRIBUTING.

Additional context

I have a working, tested implementation ready — the opt-in toggle, threaded
through both the IPC and the HTTP/standalone search paths — and can open the PR
if the approach and the Fuse.js dependency look right to you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions