Repository navigation
fix(ios): make the IME composer reachable from the compact key bar - #217
Merged
tanlethanh merged 5 commits intoAug 26, 2026
Merged
Conversation
The composer is the only place an IME can compose on iOS, but it could only be reached by a left swipe on the extended two-row keypad: handlePan returned early unless `extended` was set, and no row carried a visible control. `extended` defaults to false, so on the default compact bar the composer was both unreachable and undiscoverable. Add a labelled key that opens it directly, and drop the `extended` guard so the swipe works in both layouts. Refs deltaqdev#214 Co-Authored-By: GenericAgent <bot@gaagent.ai>
Member
|
Hey thanks @hello532. This is useful. But I also think that the terminal input itself should support typing in chinese directly without going though a composer input. I guess it should be related to IME and Marked Text, and can you also help me check at it? |
Contributor
Author
|
你让ai来修复。
Tan Le ***@***.***>于2026年8月25日 周二11:46写道:
… *tanlethanh* left a comment (deltaqdev/zedra#217)
<#217 (comment)>
Hey thanks @hello532 <https://github.com/hello532>. This is useful. But I
also think that the terminal input itself should support typing in chinese
directly without going though a composer input. I guess it should be
related to IME and Marked Text, and can you also help me check at it?
—
Reply to this email directly, view it on GitHub
<#217?email_source=notifications&email_token=AOF4R64VYKNV7PDZRYNEUB35LUD2XA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBQGQ4DCMZQG4Z2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5404813073>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOF4R65DQE56HLDFUXWZHWD5LUD2XAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMRZGUYTQNBWGY5US43TOVSTWNJSGM2TONRRGEZDBILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AOF4R64G4QSFURUGEW5L5RD5LUD2XA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBQGQ4DCMZQG4Z2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AOF4R67JYMCN3HBWGA3KQSL5LUD2XA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBQGQ4DCMZQG4Z2M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Member
|
I can fix it, but I doesnt know Chinese so it takes time for me to test it |
Contributor
Author
|
你写完,发tf我测试。可以这么做。
留意帮你测
Tan Le ***@***.***>于2026年8月25日 周二11:51写道:
… *tanlethanh* left a comment (deltaqdev/zedra#217)
<#217 (comment)>
I can fix it, but I doesnt know Chinese so it takes time for me to test it
—
Reply to this email directly, view it on GitHub
<#217?email_source=notifications&email_token=AOF4R65JI642CMK52ZGUHAT5LUEMPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBQGQ4DIMRXGM3KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-5404842736>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOF4R66VRLKKMIKCTDEI2CT5LUEMPAVCNFSNUABGKJSXA33TNF2G64TZHMYTCMRZGUYTQNBWGY5US43TOVSTWNJSGM2TONRRGEZDBILWAI>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AOF4R64DEH7DLARML6KRFD35LUEMPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBQGQ4DIMRXGM3KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJKTGN5XXIZLSL5UW64Y>
and Android
<https://github.com/notifications/mobile/android/AOF4R632KAQUJJ2NRGIBY5T5LUEMPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKNBQGQ4DIMRXGM3KM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLTGN5XXIZLSL5QW4ZDSN5UWI>.
Download it today!
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lhjd5ReMu7582tPZn1qnnY
Chinese Simplified Stroke commits a composition with unmarkText and never sends insertText, so the terminal discarded the preedit instead of writing it to the PTY. Commit uncommitted marked text on that path; dictation and streamed previews keep the old cancel behavior. The composition itself was also invisible: marked text lived only in the synthetic text store, so a stroke phrase stayed hidden until punctuation committed it. TerminalContent now carries the composition and the element draws it at the cursor - tinted background, underline, and a caret at the IME insertion point - wrapping at the right edge and never reaching the PTY. Terminal is a model entity whose notify never reaches the view, so repaints ride a new PreeditChanged event that fires only when the drawn composition changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AQ2N7yhpDqPWR9wb9u2R8d
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AQ2N7yhpDqPWR9wb9u2R8d
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AQ2N7yhpDqPWR9wb9u2R8d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refs #214.
Correction to the issue
I filed #214 guessing the input surface never implemented the iOS
UITextInputmarked-text protocol. Reading the code, that guess was wrong in an important way:
IME input already works on iOS.
KeyboardSupporter.buildComposeRowcreates a realUITextField, so UIKit drives composition inside it natively — Stroke, Pinyin,Handwriting included.
The real problem is that the composer cannot be found and, in the default layout, cannot
be reached at all:
handlePanopened withguard extended else { return }, so the swipe was inert unlessthe two-row keypad was already showing
extendeddefaults tofalseOn a fresh install the bar is compact, so the gesture does nothing and the composer is
unreachable. That presents exactly as "Chinese cannot be typed", which is how I
originally reported it.
Change
⌨key tocompactRowthat callssetComposing(true, animated: true).It is dispatched locally in
buttonTouchUpInsideand returns beforesendKey, sozedra:composeris never forwarded to Rust as a keystroke.guard extendedline inhandlePanso the swipe works in both layouts.rebuildRowsalways builds the compose page, so nothing else gated this.accessibilityLabelonKeySpecand apply it inbuildRow, so thenew key announces as "Open composer" rather than as a glyph. This mirrors the existing
close.accessibilityLabel = "Close composer".The extended rows are untouched: both are full at seven keys, and the swipe covers them.
Testing
swiftc -parse ios/Zedra/KeyboardSupporter.swiftpasses.Not verified on a device or simulator. I have no iOS SDK on this machine
(
xcrun --sdk iphoneos --show-sdk-pathfails), so I could not build the app or confirmthe behaviour by hand, and CI only covers the Rust crates — nothing here is exercised by
it. The change is small and confined to one file, but it needs a real run before merge.
Two things worth checking:
⌨on the compact bar opens the composer with the keyboard focused, andChinese can be typed and sent.
compact row on smaller devices such as an iPhone SE.
Scope
This makes the existing composer usable. It does not add IME support to the terminal
surface itself — text typed straight into the terminal still bypasses composition,
because
include/gpui_ios.hexposes onlygpui_ios_handle_text_input(void*, void*),which carries committed text and has no marked-text state in the ABI. Inline composition
in the terminal would mean extending that boundary plus the GPUI iOS platform layer in
the
vendor/zedsubmodule (tanlethanh/zed@feat/gpui-mobile), which belongs in aseparate change. Happy to open an issue there if that is the direction you want.
Reported from iPhone, iOS 18.3.1, App Store build.