Repository navigation
Add search to project picker - #2939
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
added a commit
that referenced
this pull request
Sep 2, 2026
## Human comments ## What was wrong Project, Branch, and Model each implemented the same autofocus policy differently. That duplication made picker behavior easy to drift: desktop search should receive focus, compact and touch-oriented layouts should wait for a deliberate tap so they do not raise the keyboard, and clicking a Model provider should not steal focus from a search field the user is already typing in. This is a follow-up to #2939. ## What changed The shared Popover now owns the picker autofocus policy. It suppresses passive autofocus on compact or coarse-pointer layouts and focuses an explicit target on fine-pointer desktop, including targets realized after the drawer opens. Branch and Model no longer carry their own platform checks, and pointer-based Model provider switching preserves an already-focused search field while keyboard behavior stays unchanged. The plugin registry's generated Popover item, item index, and new transitive `use-pointer-coarse` hook item were regenerated with the repository generator. There are no wire-contract, daemon-protocol, CLI, or documentation changes. ## How you verified - Added red/green coverage for compact, coarse-pointer, delayed search-target, and Model provider-switch focus behavior. - `pnpm exec turbo run test --filter=@bb/app --force -- "src/components/ui/responsive-overlay.test.tsx" "src/components/pickers/ProjectSelector.test.tsx" "src/components/pickers/BranchPicker.scroll.test.tsx" "src/components/pickers/ModelReasoningPicker.test.tsx" "src/components/pickers/ParentThreadPicker.test.tsx"` — 5 files and 61 tests passed. - `pnpm exec turbo run test --filter=@bb/plugin-registry --force` — registry freshness and vendoring test passed; 58 items are current. - `pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/shared-ui --filter=@bb/plugin-registry --force` — all three packages passed. - `pnpm exec oxfmt --check` on the five manually authored source files passed. Generator-owned JSON was preserved exactly as emitted. - `node packages/plugin-registry/scripts/build-registry.mjs --check` and `git diff --check origin/main...HEAD` passed. - The full `@bb/app` suite passed previously: 468 files and 3,754 tests, with 4 skipped. - Browser QA confirmed desktop search autofocus, no compact search autofocus or app-root `inert`/`aria-hidden`, and preserved focus while switching populated Model providers. Follow-up to #2939. > AGENT GENERATED
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
What was wrong
The project picker rendered every project as a static dropdown list, so workspaces with many projects required scanning the entire menu to find a target. This addresses #2696.
What changed
Replaced the project dropdown with the shared responsive Popover and Command primitives. When more than five projects exist, the picker now shows a focused search input and filters names case-insensitively. Project creation and no-project actions stay visible for no-match queries, search resets after close, short lists preserve keyboard navigation, and only the results region scrolls. No wire, CLI, guide, or protocol changes.
How you verified
Fixes #2696