Skip to content

Chinese IME cannot compose in the input box on iOS (renders fine, cannot be typed) #214

Description

@hello532

Problem

On iOS, Chinese renders correctly everywhere (agent output, file contents, existing
messages), but Chinese cannot be typed into the prompt / message input box.

Reported with the stroke-based keyboard (笔画, Apple's built-in "Chinese, Simplified —
Stroke"): composition never lands in the field. Latin/English input into the very same
field works normally.

Expected: standard iOS IME behaviour — inline marked (pre-edit) text while composing, a
working candidate bar, and the selected candidate committed into the input.

Impact: a Chinese-speaking user can read everything the agent says but cannot write a
prompt in Chinese, which makes the app effectively read-only for them.

Reproduce

  1. iPhone on iOS 18.3.1, Zedra iOS app, connected to a host session.
  2. iOS Settings → General → Keyboard → Keyboards → add Chinese, Simplified → Stroke (笔画).
  3. Tap the agent prompt / message input box in Zedra, switch to that keyboard via the globe key.
  4. Type strokes.

Observed: no inline composition (marked text) appears and nothing is committed to the
input, so no Chinese text can be entered.

Expected: the same composition flow as any native iOS text field.

Environment

  • Platform: iOS
  • App / CLI version: host CLI zedra 0.4.2 (macOS, arm64); iOS app installed from the App Store
  • Device / OS: iPhone, iOS 18.3.1
  • Transport: none — not transport-dependent, reproduces regardless of connection state

Evidence

Offered as a starting point rather than a verified finding: because glyph rendering is
fine and only composition fails, this looks like the text input not honouring the
UITextInput marked-text contract (setMarkedText:selectedRange:, unmarkText,
markedTextRange) that iOS IMEs depend on. If that is the cause, every IME that composes
before committing would fail the same way (Pinyin, Handwriting, and also Japanese/Korean)
— only Stroke was confirmed here.

A screen recording would show this best, but attachments cannot be sent from the phone,
which is the subject of a separate report filed alongside this one. Happy to provide a
recording through any channel that works.

Activity

  1. tanlethanh commented on Aug 24, 2026

    @tanlethanh
    Member

    Hey @hello532, would you like to submit a PR for this issue

  2. hello532 commented on Aug 24, 2026

    @hello532
    ContributorAuthor
  3. hello532 commented on Aug 24, 2026

    @hello532
    ContributorAuthor

    Correcting my own report after reading the code: the guess above (that the input surface
    never implemented UITextInput marked text) is wrong. IME input already works on iOS.

    KeyboardSupporter.buildComposeRow creates a real UITextField, so UIKit drives
    composition inside it natively — Stroke, Pinyin and Handwriting included.

    The actual defect is reachability. In ios/Zedra/KeyboardSupporter.swift:

    • the only entry point to the composer was a left swipe on the accessory bar, with no
      button, icon or hint anywhere
    • handlePan opened with guard extended else { return }, so that swipe was inert unless
      the two-row keypad was already showing
    • extended defaults to false

    So on a fresh install the bar is compact, the swipe does nothing, and the composer cannot
    be reached at all. It presents exactly as "Chinese cannot be typed", which is how I
    originally reported it.

    Workaround on the current build: switch to the extended two-row keypad first, then swipe
    left on the bar — the composer appears and Chinese types normally.

    PR #217 adds a ⌨ key to the compact row and removes the extended guard.

    One part of #214 is still open: typing straight into the terminal continues to bypass
    composition. include/gpui_ios.h exposes only
    gpui_ios_handle_text_input(void*, void*), which carries committed text with no
    marked-text state in the ABI, so inline composition there needs that boundary and the
    GPUI iOS platform layer in the vendor/zed submodule extended as well. Happy to file
    that separately if useful.

  4. tanlethanh commented on Aug 26, 2026

    @tanlethanh
    Member

    Hey @hello532. New ios testflight version is out and includes the fix. Please help me test it, check the link in readme.md

  5. moved this from Backlog to Done in zedraon Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions