Skip to content

Keyboard shortcut search does not prioritize visible label matches #3737

Description

@novnski

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

  1. Open the bb desktop app.
  2. Open Settings -> Keyboard.
  3. Enter sidebar in Search shortcuts.
  4. 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:

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, or Toggle sidebar.
  • This is not a missing-command problem: Toggle sidebar is present and can be assigned normally.
  • Source inspection confirms the same order-preserving filter remains on main at the commit above; main was 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

  1. added
    uiApp shell, sidebar, composer, rendering
    on Sep 15, 2026
  2. bb-slop-cop commented on Sep 15, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied 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.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    uiApp shell, sidebar, composer, rendering

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions