GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(app): ignore IME-owned composer keys by usrnk1 · Pull Request #62318 · anomalyco/opencode

Conversation

@usrnk1

@usrnk1 usrnk1 commented Nov 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Fixes #62290.

  • Return before composer focus restoration and shortcut handling when isComposing is true, or Escape/Enter/Tab carries legacy keyCode: 229.
  • Leave native IME handling intact: report the key as handled to the editor without calling preventDefault().
  • Remove the now-redundant composition checks on paging and history arrows. Keep the draft-only Enter guard in editor.tsx unchanged.
  • Restrict the legacy fallback to Escape/Enter/Tab so Android keyboards reporting 229 on other keys retain their existing behavior.

This is the narrow keyboard-ownership fix, not the composition/DOM reconciliation work in #55295. No composition timers, new state, public API changes, or GUI plugin SDK changes. No feature flag: this is a bug fix. Only packages/app changed.

Verification

  • Before the fix: 5 new regression rows fail on real controller behavior (IME Escape stops the agent; IME Tab/Enter selects suggestions); 2 plain-key control rows pass.
  • After the fix: 7 cases pass, including 10 repeated runs (70/70).
  • bun typecheck in packages/app: passed.
  • bun run test:unit: 2,575 passed.
  • bun run test:browser: 353 passed.
  • Prettier and git diff --check: passed.
  • bun run lint:changed origin/dev: no problems.
  • Pre-push full lint/typecheck check: passed, with existing repository-wide lint warnings.

Native verification

The maintainer reports the quick native macOS Pinyin check passed: Escape dismisses the candidate window without stopping the running agent, and a subsequent plain Escape stops it.

WeChat specifically and Japanese Tab remain untested on native input methods. No before/after recordings were captured. Automated browser-condition tests exercise the real controller with synthetic events, not an OS candidate window or the mounted editor.

Visual

Conceptual illustration, not a recording of native IME verification.

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none">
  <style>@media (prefers-reduced-motion:no-preference){.work{animation:pulse 1.6s ease-in-out infinite}.dismiss{animation:fade 3s ease-in-out infinite}}@keyframes pulse{50%{opacity:.35}}@keyframes fade{0%,30%,100%{opacity:.65}55%,85%{opacity:0}}</style>
  <rect x="8" y="30" width="143" height="34" rx="7" stroke="currentColor" opacity=".35"/>
  <text x="18" y="51" fill="currentColor" font-family="sans-serif" font-size="12">Prompt</text>
  <g class="dismiss" opacity=".65"><rect x="18" y="5" width="74" height="21" rx="4" stroke="currentColor"/><text x="28" y="20" fill="currentColor" font-family="sans-serif" font-size="11">IME · Esc</text></g>
  <circle class="work" cx="169" cy="47" r="4" fill="currentColor"/>
  <text x="179" y="51" fill="currentColor" font-family="sans-serif" font-size="11">Running</text>
</svg>

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@usrnk1
fix(app): ignore IME-owned composer keys
39e1570
@github-actions github-actions Bot added the contributor label Nov 6, 2026
@usrnk1
usrnk1 marked this pull request as ready for review November 6, 2026 10:05
@usrnk1
usrnk1 requested review from Brendonovich and Hona as code owners November 6, 2026 10:05
@usrnk1
Merge branch 'dev' into ime-escape-stop
f401f69
@usrnk1
usrnk1 enabled auto-merge (squash) November 6, 2026 10:06
@usrnk1 usrnk1 mentioned this pull request Nov 6, 2026
desktop: ESC with active IME candidate window also interrupts the agent loop #62290
Closed
opencodejr[bot]
opencodejr Bot reviewed Nov 6, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The change looks sound. I couldn't verify it against a real IME: that needs the macOS desktop app with a native Chinese input method, which this sandbox doesn't have. At the controller level it works. The new test fails on 5 of its 7 cases against the base code (IME Escape stops the agent, IME Tab/Enter selects the suggestion) and passes in full with this PR. The full test:browser suite (353) and tsc -b also pass.

The early return comes before focus restoration, the suggestion machine, the queue-edit Escape, Stop and history. It returns handled without preventDefault(), so the IME keeps the key. It also correctly skips the editor's Mod+ArrowUp and Enter-to-send paths during composition, and it covers the history and command-menu search input, which shares this handler. Limiting the keyCode 229 fallback to Escape, Enter and Tab keeps the change narrow.

Public API: unchanged (only packages/app internals and a test).

No blocking concerns.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
opencodejr[bot]
opencodejr Bot reviewed Nov 6, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The new commit only merges dev. The PR's own change is the same as in my last review, and the new IME test still passes (7/7) on the new head. I still couldn't verify it against a native IME, since that needs macOS with a CJK input method.

Public API: unchanged.

No new concerns.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@usrnk1
usrnk1 merged commit 4a9b2b6 into dev Nov 6, 2026
20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@usrnk1
usrnk1 deleted the ime-escape-stop branch November 6, 2026 10:18
@adamdotdevin adamdotdevin mentioned this pull request Nov 6, 2026
release: opencode.ai site launch (dev → production) #62352
Merged
@amrkmn amrkmn mentioned this pull request Nov 7, 2026
opencode 2.2.6 amrkmn/homebrew-tap#1217
Closed
1 task
This was referenced Nov 7, 2026
feat: opencode release v2.2.6 sprisa/opencode-server#84
Merged
Tool release: OpenCode 2 v2.2.6 (was v2.2.5) agent-sh/agnix#1808
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments
@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

desktop: ESC with active IME candidate window also interrupts the agent loop

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@usrnk1
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.