Skip to content

fix(inputs): ignore IME confirmation Enter in filter editors - #627

Merged
IzumiSy merged 4 commits into
mainfrom
fix/ime-composition-enter
Oct 22, 2026
Merged

IzumiSy merged 4 commits into
mainfrom
fix/ime-composition-enter

Conversation

@IzumiSy

@IzumiSy IzumiSy commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Motivation

DataTable filter inputs treat every Enter keydown as a request to apply the filter, including the Enter used to confirm an IME conversion. When composing a value in multiple parts, the chip editor closes after the first confirmation, preventing further input. The add-filter panel stays open but applies intermediate values and can trigger unnecessary searches.

The command palette and AI chat already ignore isComposing events, but do not handle browsers that dispatch compositionend before the confirmation keydown. Such events can have isComposing: false while retaining keyCode: 229.

Fixes https://github.com/tailor-inc/platform-planning/issues/2138

Design Decision

Shared internal IME detection

Use one internal predicate for native isComposing, the keyCode: 229 fallback, and existing locally tracked composition state. Apply it to all eight filter commit handlers and reuse it in the command palette, AI chat, and cell editors to keep the behavior consistent.

Preserve existing interaction contracts

Keep ordinary Enter commits, explicit Apply actions, validation, and event propagation behavior unchanged. Cell editors retain their composition refs and Base UI handler suppression. No public API or dependency is added.

Summary

  • Prevent IME confirmation Enter from applying filters or closing chip value editors, allowing multi-part input to continue.
  • Consolidate IME guards across filter inputs, cell editors, the command palette, and AI chat.
  • Add regression coverage for both IME signals and subsequent normal Enter behavior, plus a patch changeset.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (7f27830) #627 (4c5b5d7) +/-
Coverage 89.2% 89.3% +0.0%
Test Execution Time 2m39s 2m44s +5s
Details
  |                     | main (7f27830) | #627 (4c5b5d7) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          89.2% |          89.3% | +0.0% |
  |   Files             |            226 |            227 |    +1 |
  |   Lines             |           7239 |           7240 |    +1 |
+ |   Covered           |           6464 |           6469 |    +5 |
- | Test Execution Time |          2m39s |          2m44s |   +5s |

Code coverage of files in pull request scope (88.8% → 89.2%, patch 100.0%)

Files Coverage +/- Patch Coverage Status
packages/core/src/components/ai-chat/composer.tsx 100.0% 0.0% - modified
packages/core/src/components/command-palette/command-palette.tsx 92.8% 0.0% 100.0% modified
packages/core/src/components/data-table/editable-cell.tsx 95.3% 0.0% 100.0% modified
packages/core/src/components/data-table/toolbar.tsx 84.5% +0.6% 100.0% modified
packages/core/src/lib/is-composing.ts 100.0% +100.0% 100.0% added

Reported by octocov

@IzumiSy
IzumiSy requested a balanced review from Copilot October 21, 2026 02:47
@IzumiSy
IzumiSy marked this pull request as ready for review October 21, 2026 02:48
@IzumiSy
IzumiSy requested a review from a team as a code owner October 21, 2026 02:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow changes preserve existing interaction contracts, include targeted regression coverage, and have no unresolved findings.

No open issues 🎉

What changed in this PR

Prevents IME confirmation Enter from prematurely committing DataTable filters, while aligning composition handling across AppShell inputs.

Changes:

  • Adds shared IME detection with the keyCode: 229 fallback.
  • Preserves normal Enter commits and existing cell-editor safeguards.
  • Adds regression coverage and a patch changeset.
File Description
packages/​core/​src/​lib/​is-composing.ts Adds shared IME detection.
packages/​core/​src/​lib/​is-composing.test.ts Tests composition signals and defaults.
packages/​core/​src/​components/​data-table/​toolbar.tsx Guards eight filter commit handlers.
packages/​core/​src/​components/​data-table/​toolbar.test.tsx Tests IME handling in panel and chip editors.
packages/​core/​src/​components/​data-table/​editable-cell.tsx Reuses detection while preserving existing safeguards.
packages/​core/​src/​components/​command-palette/​command-palette.tsx Adds fallback detection to keyboard handling.
packages/​core/​src/​components/​command-palette/​command-palette.test.tsx Tests IME suppression and normal Enter.
packages/​core/​src/​components/​ai-chat/​composer.tsx Guards submission with shared detection.
packages/​core/​src/​components/​ai-chat/​ai-chat.test.tsx Tests IME suppression and subsequent submission.
.changeset/​quiet-inputs-compose.md Records the patch release changes.

Review effort: Balanced

@IzumiSy
IzumiSy merged commit b0fd352 into main Oct 22, 2026
7 checks passed
@IzumiSy
IzumiSy deleted the fix/ime-composition-enter branch October 22, 2026 05:53
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.

3 participants