Repository navigation
Unify picker search matching - #2943
Merged
Merged
Conversation
ymichael
added a commit
that referenced
this pull request
Sep 2, 2026
## Human comments ## What was wrong The searchable Project picker used cmdk's moving `aria-selected` state as its only option-selection signal after #2939. That state identifies the keyboard-highlighted row, not the persisted project value, so assistive technology could report Alpha selected while Charlie was the actual checked project; the trigger also exposed only the generic name “Project.” Parent Thread had the same current-value ambiguity. ## What changed - Name the Project trigger with its displayed current value. - Mark the persisted Project, no-project choice, and Parent Thread value with `aria-current`. - Keep cmdk's `aria-selected` behavior for the movable keyboard highlight. - Hide decorative check icons from assistive technology. - Add focused regressions proving current value remains stable while keyboard highlight moves. This is semantically separate from #2943's open search-matching change and composes with it. No daemon wire contract, server API, public Plugin SDK API, CLI, documentation, or protocol version changed. ## How you verified - The four focused accessibility assertions failed before the implementation and passed afterward. - `pnpm exec turbo run test --filter=@bb/app --force -- --run src/components/pickers/ProjectSelector.test.tsx src/components/pickers/ParentThreadPicker.test.tsx` — 11 tests passed. - Full app suite — 3,744 tests passed and 4 skipped. - `pnpm exec turbo run typecheck --filter=@bb/app` — passed. - `pnpm exec oxfmt --check apps/app/src/components/pickers/ProjectSelector.tsx apps/app/src/components/pickers/ProjectSelector.test.tsx apps/app/src/components/pickers/ParentThreadPicker.tsx apps/app/src/components/pickers/ParentThreadPicker.test.tsx` — passed. - `git diff --check origin/main...HEAD` — passed. - Matching desktop and compact QA confirmed the current project remains visually checked while ArrowDown moves the command highlight. > AGENT GENERATED
ymichael
force-pushed
the
bb/unify-picker-search-policy
branch
from
September 2, 2026 18:20
ff8aaaa to
1ab71f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
left: before, right after
What was wrong
Searchable pickers did not share a matching policy. Project and Branch used case-insensitive substring filtering in source order, Model used an unranked subsequence regex, and Parent Thread implicitly inherited cmdk scoring. Matching behavior and result ordering therefore changed depending on which picker a user opened.
The first revision centralized picker behavior but introduced another fuzzy-matching implementation even though
@bb/fuzzy-matchalready owns shared text-search policy. It also treated visible labels and hidden aliases as equivalent fields. A strong hidden-ID match could therefore outrank a useful visible-label match: the query55placed Nemotron above GPT-5.5 because Nemotron's raw ID contains550b-a55b.What changed
All searchable pickers now use one
searchPickerOptionsadapter backed by@bb/fuzzy-match. The adapter trims input and explicitly supplies each option's visible label as its primary text plus any type-specific aliases.fuzzyMatchTextnow owns one field-aware policy:Aliases still add results. Parent Thread adds the thread ID, Model adds the route provider and raw model ID, mention suggestions add entity IDs, and command-palette groups remain searchable. Project and Branch search their visible names. Branch search no longer pins a weaker selected result above stronger matches, and Model search ranks primary and selected-only models together after flattening them.
Path matching remains structurally specialized through
fuzzyMatchPaths; generic text matching has one policy.No wire, CLI, guide, documentation, or protocol changes.
Query behavior
55550b-a55bcould outrank visibleGPT-5.5labelsGPT-5.5label matches rank first; Nemotron remains included later through its raw-ID aliasaw→atlas-webawis not contiguousfth→feature/threefthis not contiguousgpt4cdxp→Codex Parentfrontend_parentATLASfuzzyMatchTextused smart-case and rejected lowercase-only textatlas-webcase-insensitivelyHow you verified
pnpm exec turbo run test --filter=@bb/fuzzy-match --force(26 passed)pnpm exec turbo run test --filter=@bb/app --force(468 files; 3,751 passed, 4 skipped)pnpm exec turbo run typecheck --filter=@bb/fuzzy-match --filter=@bb/app --forcepnpm exec turbo run lint --filter=@bb/app --force(0 errors; 177 existing warnings)pnpm exec oxfmt --checkon changed filesaw, uppercase project queryAW, and model query55; the model results show visible GPT-5.5 matches ahead of alias-only Nemotron matchesFixes: no linked issue.