Skip to content

Context: don't commit a name on an IME composition Enter - #1279

Closed
wonjangcloud9 wants to merge 1 commit into
cloudflare:mainfrom
wonjangcloud9:context-ime-enter
Closed

wonjangcloud9 wants to merge 1 commit into
cloudflare:mainfrom
wonjangcloud9:context-ime-enter

Conversation

@wonjangcloud9

@wonjangcloud9 wonjangcloud9 commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

We are not generally accepting outside contributions. We may accept a small
change only when, in the maintainers' assessment, it is obviously correct and
trivially verifiable by reading the patch.

If you found a bug, please file an issue
first. For feature requests and other proposals, please
open a discussion.

What does this change?

#280 and #291 stopped the Workshop from treating an IME's composition Enter as "submit". The Context Library (packages/gatekeeper-context) didn't get that guard: its name and rename inputs still act on every Enter and Escape.

With a Korean IME on macOS Chrome, pressing Enter to finish the last syllable sends two keydown events. The first has isComposing: true / keyCode 229, the second is a normal Enter. So naming a collection in Korean and pressing Enter can call create() twice, and a rename can commit before the last syllable lands. Escape ends a composition the same way, so it also cancels the rename inputs.

This adds the check isImeComposing() already uses in the Workshop (nativeEvent.isComposing || nativeEvent.keyCode === 229) to the 7 handlers: the name field in CreateCollectionDialog and EditCollectionDialog, RenameInput, and in ContextLibraryPage the new-collection name, branch field, inline rename and file-name inputs.

Why is this obviously correct and trivially verifiable?

Each change only adds an early return, or an extra && condition, for a key event that belongs to an active IME composition. That condition is the same one as workshop-frontend/src/keyboardEvent.ts, which #291 reviewed. Nothing changes for any other key event. The check is written inline because gatekeeper-context doesn't depend on workshop-frontend. 7 lines added, 4 changed, no new code paths.

Checklist

Checking every item does not guarantee acceptance. Maintainers determine whether
a pull request meets the contribution policy.

  • This is a small, concrete change; it is not a feature, refactor, or low-value cleanup.
  • I understand that maintainers decide whether the change is obviously correct and trivially verifiable.
  • I have read and followed the contribution guidelines.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the gatekeeper Changes to a gatekeeper integration label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

Thank you for taking the time to contribute. This pull request was automatically closed because:

  • The "small, concrete change" confirmation is not checked.
  • The "maintainer assessment" confirmation is not checked.
  • The "contribution guidelines" confirmation is not checked.

Please update the pull request to meet these automatic checks, then reopen it. Passing these checks does not guarantee acceptance; maintainers still determine whether a change is obviously correct and trivially verifiable.

If an exception is appropriate, a maintainer can apply the policy/override label before reopening the pull request. See the contribution guidelines for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gatekeeper Changes to a gatekeeper integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant