Skip to content

Fix command palette IME key handling - #3415

Merged
ymichael merged 3 commits into
get-bb:mainfrom
kongenpei:bb/cmd-k-thr_45jjczbvhq
Sep 10, 2026
Merged

Fix command palette IME key handling#3415
ymichael merged 3 commits into
get-bb:mainfrom
kongenpei:bb/cmd-k-thr_45jjczbvhq

Conversation

@kongenpei

@kongenpei kongenpei commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

The Cmd-K palette consumed Enter and navigation keys during IME composition. Confirming a candidate could activate the highlighted result and close the palette; navigation keys could move the palette selection.

What changed

Return before palette keyboard handling when the native event is composing. Cover Enter, ArrowDown, ArrowUp, Home, and End, preserving selection and leaving composing events unconsumed. Also verify ordinary navigation and exactly-once command activation after composition ends. Combines the useful regression assertions from #3414 without duplicating its identical production fix.

No wire, SDK, CLI, configuration, or host-daemon protocol changes.

How you verified

  • Independently reproduced on pristine main 7ba69eb050c4a800db9255c8fbaaa23ca4bab32d in the running app using Chromium DOM CompositionEvent/KeyboardEvent dispatches.
  • Regression-only run before the guard: 6 failed, 23 passed.
  • pnpm exec turbo run test --filter=@bb/app -- src/components/commands src/lib/command-palette: 76 passed across 7 files.
  • pnpm exec turbo run typecheck build lint --filter=@bb/app: passed; lint reported 190 warnings and zero errors.
  • Changed-file formatting and git diff --check: passed.
  • Real Chromium browser QA: 10 scenarios passed, including unchanged composing selection, default-prevention semantics, resumed navigation and one sidebar toggle after normal Enter.
  • Composition events were synthetic (isTrusted: false); ordinary keys used trusted browser keyboard input. Native OS Pinyin candidate UI, Safari event ordering, and iOS were not verified.

Fixes #3413

AGENT GENERATED

@ymichael
ymichael merged commit b54ffb2 into get-bb:main Sep 10, 2026
14 checks passed
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.

Cmd-K palette selects a result when Enter confirms IME composition

2 participants