Skip to content

Guard palette keyboard actions during IME composition - #3414

Open
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-3413
Open

Guard palette keyboard actions during IME composition#3414
bb-slop-cop[bot] wants to merge 1 commit into
mainfrom
slopcop/issue-3413

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🚨 SLOP COP 🚨 · new-issue-autopilot

Human comments

What was wrong

The palette keydown handler consumed Enter and selected the highlighted result even when the native event was composing. Reproduction report.

What changed

Ignore composing events before palette keyboard handling. Add a regression that checks the event remains unconsumed, the palette stays open, no command runs, and a subsequent normal Enter activates the command. Two files in the command subsystem; 28 added lines, 0 deleted lines (28 total).

How you verified

  • The regression failed against unchanged production code in two clean checkouts at 8ac123f3551e7502a91c93e87329797f34ee626b: defaultPrevented was true, expected false.
  • pnpm exec turbo run test --filter=@bb/app -- src/components/commands: 55 tests passed across 4 files, including the new regression.
  • pnpm exec turbo run typecheck --filter=@bb/app: passed. Full Turbo build: passed.
  • git diff --check: passed; no binary changes. Working tree, HEAD, report artifacts, and push range passed the EAP codename scan using an equivalent Python check because the installed Bash cannot run the scanner.
  • Native OS IME candidate UI was not exercised; reproduction uses the real React component in jsdom.

Fixes #3413

AGENT GENERATED

ymichael pushed a commit that referenced this pull request Sep 10, 2026
## 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
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

1 participant