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
Description
The TUI has two independent fuzzy-matching implementations for its two completion surfaces:
@file picker uses thenucleo_matchercrate (crates/zeph-tui/src/file_picker.rs,Pattern::new(query, CaseMatching::Smart, Normalization::Smart, AtomKind::Fuzzy)with a reusedMatcher)./slash autocomplete uses a hand-rolledfuzzy_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_matcherwith the same pattern configuration. The hand-rolledfuzzy_scoreis removed. Separator-equivalence behavior (:/-/space) is preserved either by nucleo'sNormalization/CaseMatchingoptions 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
@mention picker rework (modal @ file picker blocks prompt typing and swallows literal @ characters #6647); not user-visible except for ranking consistency and enabling match highlighting in the slash list.specs/030-tui-slash-autocomplete/spec.mdreferences the filter behavior; update the spec's filtering section if wording pins the bespoke scorer.Environment
zeph-tui