Repository navigation
Keyboard shortcut search does not prioritize visible label matches #3737
Description
Summary
In Settings -> Keyboard, searching for sidebar leaves several commands whose visible labels do not contain that word above Toggle sidebar, whose label directly matches the query. The search matches hidden descriptions and internal command IDs but preserves the original category order; direct visible-label matches should rank first.
Versions and environment
- bb desktop 0.43.1, installed as the macOS desktop app
- macOS 26.6.2 (25G83)
- No provider, remote machine, or repository state is involved
Steps to reproduce
- Open the bb desktop app.
- Open Settings -> Keyboard.
- Enter
sidebarin Search shortcuts. - Inspect the result order.
Expected vs actual
Actual:
Commands such as Previous thread, Next thread, and Open thread N can appear
above Toggle sidebar even though their visible labels do not contain "sidebar".
Those rows match only because their hidden descriptions mention a visible
sidebar thread. Toggle sidebar remains farther down in the Window and layout
group.
Expected:
Toggle sidebar should rank first because its visible label directly matches the
query. Description-only and internal-command-ID matches should follow visible
label matches.
Evidence
The latest main implementation at 423955ea44fdf8f364d77529237951f8d43f4ab1 filters on label, description, and command ID, then returns the original groups and command order without relevance scoring:
bb/apps/app/src/components/settings/KeyboardSettingsSection.tsx
Lines 552 to 564 in 423955e
| const visibleGroups = useMemo(() => { | |
| const query = search.trim().toLowerCase(); | |
| if (query.length === 0) return commandGroups; | |
| return commandGroups.flatMap((group) => { | |
| const commands = group.commands.filter( | |
| (metadata) => | |
| metadata.label.toLowerCase().includes(query) || | |
| metadata.description.toLowerCase().includes(query) || | |
| metadata.command.toLowerCase().includes(query), | |
| ); | |
| return commands.length === 0 ? [] : [{ ...group, commands }]; | |
| }); | |
| }, [commandGroups, search]); |
A useful ranking would be: exact label match, label prefix/substring match, command-ID match, then description-only match. Showing or highlighting which field matched would also explain otherwise surprising results.
What you ruled out
- No matching open or closed issue was found for
keyboard search,shortcut search,shortcut ranking, orToggle sidebar. - This is not a missing-command problem:
Toggle sidebaris present and can be assigned normally. - Source inspection confirms the same order-preserving filter remains on
mainat the commit above;mainwas not built and run locally.
Suggested priority and effort
Low priority: there is a scrolling workaround and no data loss. Likely low-to-medium effort depending on the desired cross-group ranking behavior and tests.
Investigation thread: https://novnski.getbb.app/projects/proj_y845q9kbmj/threads/thr_d97n5zcnhf
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 15, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type: Feature · Priority: Low · Effort: Medium · Labels:
ui. All classifications were missing; no existing values were replaced. Final Type verified as Feature.On trusted
origin/main(423955ea44fdf8f364d77529237951f8d43f4ab1), shortcut search filters existing categories without relevance sorting, and descriptions are displayed beneath labels. Prioritizing label matches adds ranking behavior and requires choosing how results span categories. Low impact with a scrolling workaround; Medium effort for cross-group behavior and regression coverage.No reproduction report or pull request: the rule skips these for non-Bug issues.
Rank keyboard shortcut search by visible label matches (#3924)