Repository navigation
Centralize picker autofocus policy - #2953
Merged
ymichael merged 1 commit intoSep 2, 2026
Merged
Conversation
ymichael
force-pushed
the
bb/fixer-restore-compact-project-search-focus-thr_ivfrvcyksx
branch
from
September 2, 2026 19:20
89c1ebb to
559ec25
Compare
ymichael
deleted the
bb/fixer-restore-compact-project-search-focus-thr_ivfrvcyksx
branch
September 2, 2026 19:27
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
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-coarsehook item were regenerated with the repository generator. There are no wire-contract, daemon-protocol, CLI, or documentation changes.How you verified
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 --checkon the five manually authored source files passed. Generator-owned JSON was preserved exactly as emitted.node packages/plugin-registry/scripts/build-registry.mjs --checkandgit diff --check origin/main...HEADpassed.@bb/appsuite passed previously: 468 files and 3,754 tests, with 4 skipped.inert/aria-hidden, and preserved focus while switching populated Model providers.Follow-up to #2939.