You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Mobile / skill search does not rank, so exact name matches drop below description matches #42865
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/mobile
Steps to reproduce
Have several skills enabled, where some skills mention a word in their description that is also the exact name of another skill.
In the mobile composer, type / followed by the exact name of a skill.
Expected behavior
The skill whose name matches the query exactly is first, then prefix and word-boundary name matches, then description matches. This is how the $ skill menu already ranks.
Actual behavior
The exact name match can appear below skills that only match in their description. Slash commands always come before skills. The list keeps its original order.
Cause
In apps/mobile/src/features/threads/use-composer-command-menu.ts (slash trigger, near line 424), skill items are only filtered with matchesSlashSkillQuery from composerSlashSkillSearch.ts. That function returns a boolean (substring match on name, displayName, shortDescription or description), and the result keeps the source order and is appended after commandItems.
The trigger.kind === "skill" branch in the same file already ranks with scoreQueryMatch and insertRankedSearchResult (exact name 0, prefix 2, boundary 4, ..., description 20+).
Suggested fix
Score the slash-menu skills with the same scoreQueryMatch weights as the $ branch (after stripping the skill: prefix), and merge commands and skills by score, so an exact name match comes first.
Activity