Skip to content

fix(chat): preserve browser-owned IME composition - #12263

Draft
nwparker wants to merge 1 commit into
nwparker/ime-native-ownership-terminalfrom
nwparker/ime-native-ownership
Draft

fix(chat): preserve browser-owned IME composition#12263
nwparker wants to merge 1 commit into
nwparker/ime-native-ownership-terminalfrom
nwparker/ime-native-ownership

Conversation

@nwparker

@nwparker nwparker commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • leave active textarea composition owned by Chromium instead of driving it with a controlled React value
  • synchronize external drafts only while the browser is idle and reconcile the live DOM value at composition end
  • stop IME-owned events at the existing application-action boundary for submit, picker, typing redirect, font scale, and chat toggle
  • remove the duplicate parent composition ref and callback plumbing

NativeChatComposerField already existed. This adds no class, component abstraction, tracker module, registry, or production file.

Native evidence

A physical macOS 2-Set Korean Electron journey types 테스트 into session chat while the agent is working:

  • the same textarea retains 테스트 through 1.5 seconds of streaming rerenders
  • the recorded Enter shape is key Enter, keyCode 229, isComposing true
  • compositionstart and compositionend are both present in the attached Playwright trace
  • exact PTY input is 테스트 followed by newline, once
  • the paired ordinary path is ordinary followed by newline

Mutation checks

  • deleting the single IME action guard duplicates the composed send in the physical journey while the ordinary path remains ordinary
  • changing the textarea back to controlled value draft fails only the active-composition positive; all six idle and ordinary field tests pass
  • restoring preventDefault on IME Enter does not change the native macOS result; its removal is a native-ownership simplification, not the trace-proven mechanism

Verification

  • physical macOS Korean headful Electron E2E: 1 passed
  • focused native-chat tests: 24 passed
  • changed-file Oxlint and formatting
  • node and web typechecks
  • max-lines ratchet and diff check

Remaining certification

This remains draft. Windows native Korean evidence, reporter confirmation, and issue-specific classification are still required by the goalpost. Terminal and CLI/TUI reports remain owned by the stacked terminal PR rather than this native-chat path.

@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from 3e3c255 to e08b770 Compare August 3, 2026 09:46
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from bf65a63 to 4aac968 Compare August 3, 2026 09:46
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from e08b770 to d459367 Compare August 3, 2026 09:57
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from 4aac968 to 012bbd7 Compare August 3, 2026 09:58
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from d459367 to eb858bc Compare August 3, 2026 10:01
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from 012bbd7 to 4725abe Compare August 3, 2026 10:01
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from eb858bc to 00eefc8 Compare August 3, 2026 10:04
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from 4725abe to 634ec67 Compare August 3, 2026 10:05
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from 00eefc8 to 695859c Compare August 3, 2026 10:10
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from 634ec67 to f1ba0f2 Compare August 3, 2026 10:11
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from 695859c to de47aec Compare August 3, 2026 10:44
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from f1ba0f2 to 1d0350d Compare August 3, 2026 10:46
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership-terminal branch from de47aec to 1ecf549 Compare August 3, 2026 10:54
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from 1d0350d to 2476294 Compare August 3, 2026 10:55
@nwparker
nwparker force-pushed the nwparker/ime-native-ownership branch from 2476294 to 66f4b70 Compare August 3, 2026 11:25
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.

1 participant