Skip to content

slash autocomplete and @ file picker use different fuzzy engines #6650

Description

@bug-ops

Description

The TUI has two independent fuzzy-matching implementations for its two completion surfaces:

  • The @ file picker uses the nucleo_matcher crate (crates/zeph-tui/src/file_picker.rs, Pattern::new(query, CaseMatching::Smart, Normalization::Smart, AtomKind::Fuzzy) with a reused Matcher).
  • The / slash autocomplete uses a hand-rolled fuzzy_score (crates/zeph-tui/src/command.rs:1085-1112) that treats :/-/space as equivalent separators.

Two engines mean inconsistent ranking behavior between adjacent UI surfaces (a query that matches well in one picker may rank differently in the other), duplicated maintenance, and no match-index highlighting for the slash list (nucleo provides match indices; the hand-rolled scorer does not).

With the @ picker expanding to skills and agents (all categories on nucleo), the slash autocomplete becomes the only surface on the bespoke scorer.

Expected Behavior

Both completion surfaces use nucleo_matcher with the same pattern configuration. The hand-rolled fuzzy_score is removed. Separator-equivalence behavior (:/-/space) is preserved either by nucleo's Normalization/CaseMatching options or by query preprocessing, with tests pinning the current top-ranked results for representative command queries (e.g. mem st, agents-list, sess) so ranking does not silently regress.

Notes

Environment

  • Version: main @ v0.22.3
  • Crate: zeph-tui

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Research — medium-high complexityenhancementNew feature or requesttech-debtTechnical debttuiTUI dashboard

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions