Repository navigation
Description
Summary
Orca Mobile terminal input cannot enter Japanese text. Both Japanese flick/kana input and romaji-to-kana/kanji conversion fail, so Japanese users cannot reliably type commands, prompts, or free text into the mobile terminal.
Reproduction
- Open Orca Mobile and connect to a paired desktop host.
- Open a session terminal.
- Focus the terminal input surface / direct terminal input.
- Switch the phone keyboard to Japanese.
- Try either:
- kana flick input, e.g.
こんにちは - romaji input with conversion, e.g. type
nihongoand convert/commit日本語
- kana flick input, e.g.
Expected
The IME composition should be allowed to complete, and the committed Japanese text should be sent to the PTY exactly once after commit.
Actual
Japanese composition is interrupted or cleared before a valid committed string reaches the terminal. This affects both flick/kana input and romaji conversion.
Impact
This blocks a basic day-to-day workflow for Japanese users on Orca Mobile. It also affects SSH/remote terminal use, because the mobile client forwards input through the same terminal send path.
Likely cause / code pointers
The mobile terminal live input path appears to treat every TextInput.onChangeText value as committed terminal bytes, sends it immediately, then clears the native text field:
mobile/app/h/[hostId]/session/[worktreeId].tsx:handleLiveInputChangenormalizestext, callssendLiveTerminalInput(activeHandle, normalizedText), then resetsliveInputCaptureand callsliveInputRef.current?.setNativeProps({ text: '' }).- the live capture
TextInputwiresonChangeText={handleLiveInputChange},onKeyPress={handleLiveInputKeyPress}, andonSubmitEditing={handleLiveInputSubmit}.
mobile/src/terminal/terminal-keyboard-type.tsalready returnskeyboardType="default", so non-Latin IMEs should remain selectable. The likely breakage is composition lifecycle handling, not keyboard availability.mobile/mobile-terminal-direct-input-default.mddocuments that direct terminal input is the default for first-seen terminal tabs, so this path is now the default path for mobile terminal users.
IME pre-edit text is not equivalent to committed terminal text. Clearing the native TextInput during composition likely cancels or corrupts the IME state, which explains why both flick input and romaji conversion fail.
Related issues to keep in mind:
- [Bug]: Orca mobile Android, Korean Hangul input is decomposed into separate jamo characters. #6995: Android mobile Korean Hangul input is decomposed into separate jamo characters.
- [Bug]: Mobile terminal Korean IME input sends decomposed jamo on Android #7000 / [Bug]: Mobile terminal Korean IME input is completely invisible after the #7011 deferral model #7182 / [Bug]: Mobile terminal Korean IME input is completely invisible after the #7011 deferral model #7183: prior mobile Korean IME follow-ups.
- [Bug]: Vietnamese IME Input Broken in Terminal #6905 / [Bug]: Sogou Pinyin (fcitx) — only first CJK character commits in terminal, subsequent input is broken (Linux) #6765 / [Bug]: Vietnamese Telex input in integrated terminal loses characters (e.g. "chính" → "ch") #6698: desktop terminal IME/composition bugs in other languages.
Candidate fix direction
A robust fix likely needs an IME-aware terminal input path rather than treating every onChangeText as terminal-ready bytes.
Possible approaches:
- Add a native composition-aware input bridge for mobile live input:
- iOS: do not forward marked text while
UITextInput.markedTextRangeis present; forward only committed text. - Android: forward committed text from
InputConnection.commitText/ final composition events instead of forwarding pre-edit updates. - clear the capture field only after committed text has been forwarded and composition has ended.
- iOS: do not forward marked text while
- As a smaller fallback, provide an explicit IME-safe mobile terminal input mode that preserves the
TextInputvalue through composition and flushes only on Send/Enter, while keeping byte-by-byte direct input for ASCII/special-key workflows. - Add regression coverage with Japanese IME-like sequences, including flick-style committed kana and romaji composition/commit, and ensure no intermediate pre-edit text is sent to
terminal.send.
Until fixed, a partial workaround may be to switch the terminal back to the buffered command input mode, because that path keeps the React Native TextInput value until submit. That is not a full replacement for terminal-native workflows and may still need an IME Enter-confirmation guard.
Activity
Chachamaru127 commentedon Jul 5, 2026
Additional user-observed symptom:
When using Japanese input on Orca Mobile, pressing the IME confirm/commit key (確定) appears to immediately send the current text to the terminal rather than just committing the composition. The user also reports punctuation/period input being transformed into kaomoji such as
^_^and then sent.This strengthens the suspicion that the mobile live terminal input path is conflating IME composition/commit actions with terminal-ready input and/or submit/Enter handling. The fix should explicitly distinguish:
Acceptance criteria should include a Japanese mobile keyboard case where pressing 確定 only commits text locally and does not send Enter or flush unintended candidates like
^_^.Chachamaru127 commentedon Jul 5, 2026
Additional Japanese kana-keyboard detail:
The failure is not limited to pressing the final IME confirm key. On a Japanese kana/flick keyboard, some characters are composed by entering a base kana and then pressing the lower-left modifier key for dakuten/handakuten/small-kana variants.
Observed example:
つ.っ, the user flicks/presses the small-character modifier button afterward.つto the terminal at the moment the base kana appears.つ; instead, it appears to commit/send the first kaomoji candidate such as^_^.This likely affects:
つ->っ,や->ゃ, etc.か->が,た->だ, etc.は->ぱThis points more specifically to the live input path forwarding transient
TextInput.onChangeTextvalues before the Japanese keyboard has finished its local composition/modifier sequence. The fix should treat kana modifier operations as part of IME composition and must not forward the base kana until the IME has produced committed text.Regression cases to add:
っfromつ+ small-kana modifier; terminal receives onlyっ, notつor^_^.がfromか+ dakuten; terminal receives onlyが.ぱfromは+ handakuten; terminal receives onlyぱ.Chachamaru127 commentedon Jul 5, 2026
Additional romaji-input detail:
This also reproduces with Japanese romaji input, not only kana/flick input.
Observed example:
さusing romaji input (s+a).sあinstead of producing committedさ.This is another concrete signal that the terminal live input path is forwarding intermediate IME state. The
sis emitted before the IME can combine it with the following vowel into the kana syllable, and the subsequent input is then committed separately.Regression case to add:
sthena; terminal receives onlyさ, notsあ.Chachamaru127 commentedon Jul 5, 2026
Feasibility note after checking platform APIs and the current mobile stack:
This is fixable on the mobile app side. It is not something the desktop/PTY side can reconstruct after the fact, because by then intermediate text such as
sor base kana such asつhas already been sent as terminal bytes.Findings:
TextInputexposesonChangeText,onKeyPress, andonSubmitEditing, but it does not provide a documented cross-platform composition lifecycle equivalent to webcompositionstart/compositionend.mobile/app/h/[hostId]/session/[worktreeId].tsxsends everyonChangeTextvalue throughterminal.send, then clears the native field withsetNativeProps({ text: '' }). That is hostile to Japanese IME pre-edit state.setComposingText(...)fromcommitText(...); a mobile terminal input view can intercept/track composition and only forward committed text.UITextInputsupport and marked text tracking (markedTextRange/ marked text). A native UIKit input view can avoid forwarding marked text until it is committed.mobile/packages/expo-two-way-audio), so adding a small native input view/module is within the current app architecture.Recommended fix shape:
TextInputcapture surface with a dedicated native IME-aware terminal input view.terminal.sends+a-> terminal receives onlyさ, notsあつ+ small-kana modifier -> terminal receives onlyっ, notつor^_^か+ dakuten -> terminal receives onlyがSo the answer is: yes, fixable, but robustly fixing the default direct-input terminal mode probably requires native iOS/Android work rather than only changing JS
onChangeTexttiming.nwparker commentedon Jul 27, 2026
Repro attempt blocked (environment)
Japanese flick/romaji IME on Orca Mobile terminal requires the mobile app. Not available here. Not labeling
cannot_repro(env blocked).brennanb2025 commentedon Jul 30, 2026
Partial fix is up in #11450 (CI green, awaiting merge) — flagging the limit up front rather than implying this closes the issue.
What it fixes: kana flick input. Composition is now held off the PTY until it commits, so flick-entered kana no longer leaks partial characters into the terminal.
What it does not fix: romaji input. That path isn't correctable in JS — the composition events the OS delivers don't carry enough information to reconstruct intent, so it needs a native-side change. This issue should stay open for the romaji half after #11450 lands.
nwparker commentedon Aug 4, 2026
Hey! Working on this. Sorry for delay
fix(mobile): decide terminal preedit from the marked-text range, not …
fix(mobile): decide terminal preedit from the marked-text range, not …
fix(mobile): decide terminal preedit from the marked-text range, not …