Repository navigation
Description
@-mention path search fails for Cyrillic filenames when query contains uppercase Cyrillic letters
Environment
- bb version: 0.49.0 (Stable)
- Platform: macOS (Apple Silicon)
- Workspace: a large Obsidian-style Markdown vault with many Cyrillic filenames
Summary
The @-mention file/folder picker in the composer does not find files whose names contain Cyrillic characters when the typed query includes an uppercase Cyrillic letter. Files are only findable when the query is typed entirely in lowercase.
The same files are found by bb's general search and file navigation — the problem is specific to the @-mention composer path picker.
Root cause (confirmed in compiled source)
The @-mention path search calls fuzzyMatchPaths() in apps/host-daemon/src/command-handlers/file-list.ts, which delegates to rankPlainQueryMatches():
const matcher = new Fzf(items, {
selector: (item) => item.path,
casing: "smart-case", // ← problem
forward: true,
tiebreakers,
});The vendored fzf implementation (packages/fuzzy-match/) uses this casing logic:
case "smart-case":
if (query.toLowerCase() !== query) {
caseSensitive = true;
}query.toLowerCase() !== query is true for any uppercase character — including uppercase Cyrillic (e.g. С U+0421). This switches matching to case-sensitive mode, but on-disk paths in this workspace use lowercase kebab-case slugs (e.g. actors/<cyrillic-slug>.md), so a query starting with a capital Cyrillic letter cannot match them.
Reproduction (API-level, deterministic)
All requests against the same project (/api/v1/projects/<id>/paths?query=…&limit=16&includeFiles=true&includeDirectories=true), with <cyrillic-word> standing for a lowercase kebab-case filename present in the workspace (anonymized here):
| Query | Case | Result |
|---|---|---|
<cyrillic-word> (lowercase) |
all lowercase Cyrillic | 16 results, includes actors/<cyrillic-word>.md ✅ |
<Cyrillic-Word> (capitalized) |
leading uppercase Cyrillic | 0 results ❌ |
<Cyr> (capitalized prefix) |
uppercase Cyrillic prefix | 16 results, but only files with uppercase Cyrillic in name; misses <cyrillic-word>.md ❌ |
<cYr> |
uppercase Cyrillic in middle | 0 results ❌ |
<cyR> |
uppercase Cyrillic in middle | 0 results ❌ |
dacha (control) |
all lowercase ASCII | 15 results, includes projects/personal/dacha/dacha.md ✅ |
The UI shows "No matching mentions" for the capitalized Cyrillic query but immediately shows Workspace results for the lowercase ASCII control query, confirming this is a matching bug rather than an indexing problem.
Expected behavior
A capitalized Cyrillic query should find the same lowercase kebab-case filename as its all-lowercase form, the same way bb's general search and file navigation do.
Suggested fix
Change the path-search Fzf instantiation to casing: "case-insensitive", or make the smart-case trigger consider only ASCII uppercase letters:
case "smart-case":
// Only ASCII uppercase should enable case-sensitive matching
if (/[A-Z]/.test(query)) {
caseSensitive = true;
}
break;The existing ASCII pre-filter in mayContainPathCandidateNeedle already uses ASCII-only case folding; the same principle should apply to the smart-case trigger.
Impact
Any user with non-Latin filenames (Cyrillic, Greek, Coptic, etc. in title-case source material) cannot @-mention those files unless they type the query in all lowercase. This makes the @-mention feature unusable for a significant class of real-world workspaces.
Activity
bb-slop-cop commentedon Nov 9, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotui,confirmed-repro.origin/main; the live macOS UI/API was not exercised.Normalize non-ASCII path queries before smart-case matching (get-bb#7276