Skip to content

Centralize picker autofocus policy - #2953

Merged
ymichael merged 1 commit into
mainfrom
bb/fixer-restore-compact-project-search-focus-thr_ivfrvcyksx
Sep 2, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/fixer-restore-compact-project-search-focus-thr_ivfrvcyksx

Conversation

@ymichael

@ymichael ymichael commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

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

@ymichael
ymichael force-pushed the bb/fixer-restore-compact-project-search-focus-thr_ivfrvcyksx branch from 89c1ebb to 559ec25 Compare September 2, 2026 19:20
@ymichael
ymichael merged commit cffc82a into main Sep 2, 2026
15 checks passed
@ymichael
ymichael deleted the bb/fixer-restore-compact-project-search-focus-thr_ivfrvcyksx branch September 2, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant