Skip to content

Android question response cursor jumps backward after accepting a Gboard suggestion #29349

Closed

Description

@mayesidev

What happened

On a Pixel 10 XL running Android 17 and T3 mobile app 2.2.0, accepting a Gboard suggestion or spelling correction in an agent question response field puts the field into a broken typing state. The cursor moves before the last typed character, causing subsequent characters to land in the wrong place.

The same keyboard suggestions and spelling corrections work normally in the main composer on the same device. The user explicitly identified the question response field as the affected surface.

Expected: Accepting a keyboard suggestion or spelling correction should preserve a usable insertion point, and subsequent typing should proceed normally in the question response field.

Actual: The question response field becomes impractical to type in after a suggestion/correction. The user pasted responses to get around the problem before finding that moving the cursor to the end of the line recovers it.

Diagnosis

In the inspected local source, the two surfaces use different input implementations. PendingUserInputCard renders QuestionAttachments, whose AppTextInput wraps a controlled React Native TextInput. The main composer uses T3's custom native ComposerEditor. The question response path stores custom text in a local atom; no per-keystroke network request is evident in that path.

The same-device comparison makes the question-response implementation and its handling of Gboard replacement/composition events the primary investigation target. It does not establish a specific React Native, Gboard, or T3 root cause.

The user initially suspected incoming assistant responses might trigger the problem. That remains unconfirmed. Ordinary idle typing worked, and accepting a keyboard suggestion is the more specific reported trigger. Whether concurrent streaming worsens the problem has not been isolated.

Steps to reproduce

  1. Open an agent question's custom-response field in T3 mobile on Android.
  2. Type text. Ordinary typing initially worked while the agent was idle.
  3. Tap a Gboard suggestion or spelling correction.
  4. Continue typing. The cursor repeatedly jumps backward before the last typed character.
  5. Move the cursor to the end of the line. The user reports this restores normal typing.
  6. Compare the same keyboard suggestion and correction actions in the main composer: the user reports they work normally there.

Version

T3 mobile app 2.2.0; connected host server 0.1.6

Environment

Device: Pixel 10 XL.
OS: Android 17.
Affected app: T3 mobile 2.2.0.
Keyboard: stock Gboard with the latest available updates per user; exact Gboard build number not supplied.
App distribution channel: not yet supplied.
Connected host: macOS arm64, T3 server 0.1.6, desktop Beta installation.

Evidence

User confirmed the question response field was affected, accepting a suggestion caused the broken state, moving to the line end recovered it, and normal suggestions/spelling fixes worked in the main composer.
Source leads: apps/mobile/src/features/threads/QuestionAttachments.tsx; components/ui/AppText.tsx; state/use-selected-thread-requests.ts; native/T3ComposerEditor.native.tsx.
Source inspected: existing local checkout 7d9725a, not established as the exact shipped mobile 2.2.0 build. This is a user-observed reproduction with source leads, not an instrumented physical-device or emulator reproduction.

Related issues

#18732 describes main-composer caret movement after scrolling. The surface and trigger differ, so it is not a confirmed duplicate.
#11337 fixed a web question-answer editor path; it does not establish an Android fix.

Fix applied or workaround

Move the cursor to the end of the line after the suggestion/correction, or paste a response composed elsewhere. Suggestions work in the main composer, but it is not a replacement for submitting a pending question answer.

Filed by

Codex, gpt-6.1-sol; T3 triage playbook followed in existing session.

Activity

  1. yoodong724 commented on Nov 3, 2026

    @yoodong724

    Another symptom on the same surface: Korean (Hangul) IME composition breaks in the question custom-answer field on Android.

    What happens

    Typing Korean in the "Or type a custom answer" field of a pending user-input card commits each jamo separately instead of composing syllables. For example, typing 한글로 입력해보 테스트에 produces:

    ㅎㅏㄴㄱㅡㄹ ㅇㅣㅂㄹㄹㅓㅕㄱ ㅌㅔㅅㅡㅌㅡㅇㅓ
    

    Korean input works normally in other text fields of the same app on the same device.

    Same-device comparison

    Field Text state owner autoCorrect TextInputWrapper Korean IME
    Thread search (SearchField) local useState off no OK
    Git commit message (GitCommitSheet) local useState on (default) no OK
    Main composer custom native editor on yes OK
    Question custom answer (QuestionAttachments) global atom via use-selected-thread-requests on yes broken
    • The commit-message field rules out autoCorrect/suggestions alone as the cause.
    • The main composer also uses expo-paste-input's TextInputWrapper. Its Android code only sets an OnReceiveContentListener and action-mode callbacks and doesn't touch the composing path, so the wrapper looks unlikely.
    • The remaining difference unique to the broken field is that its value round-trips through the global userInputDraftsByRequestKeyAtom (onChangeText → setUserInputDraftCustomAnswer → atom → thread screen re-render → drafts prop → value) instead of local component state.

    Hypothesis (unconfirmed)

    If the controlled TextInput re-renders with a stale value before the atom update propagates back, React Native's controlled-input reconciliation writes the text back to the native EditText. That would reset the IME composing region, which matches both the per-jamo commits here and the cursor jumps after accepting a Gboard suggestion in this issue. This is inferred from the source; I didn't instrument it on a device.

    A possible fix direction is to have QuestionAttachments own the text in local state (as SearchField and GitCommitSheet do), forward changes to the draft atom, and only adopt external value changes such as clearing after submit or an initialAnswer seed.

    Environment

    • Android, T3 mobile app (exact app version, device and keyboard app not recorded)
    • Source inspected: main at b183048a, not verified to match the installed build
    • Relevant files: apps/mobile/src/features/threads/QuestionAttachments.tsx, apps/mobile/src/state/use-selected-thread-requests.ts, apps/mobile/src/components/ui/SearchField.tsx, apps/mobile/src/features/threads/git/GitCommitSheet.tsx
  2. babs commented on Nov 7, 2026

    @babs

    Verified on Android: #30744 fixes this. The bug reproduces on the pre-fix code and is gone on main.

    Setup: Pixel 9a emulator (API 36, Play Store image), Gboard, T3 mobile dev client built from main (cda8842947 included), isolated dev backend. The question card's custom answer field was used in every case, caret placed mid-sentence. For the "before" run, only apps/mobile/src/features/threads/QuestionAttachments.tsx was replaced with its cda8842947^ version and Metro reloaded; same native build.

    Caret mid-sentence Before (cda8842947^) After (main)
    Typing big with Gboard taps gib: caret steps back one char per keystroke Hello big world
    Accepting a Gboard suggestion The suggestion inserts, then the next keystrokes reverse (ok → ko) wonder then ful in order
    adb input text xyz Text in order, caret ends one char too far left Caret after xyz
    Before: taps After: taps
    Before: suggestion, then typing After: suggestion, then typing

    Notes:

    Tested and written by Claude Opus 5.5 (claude-opus-5-5) in the Claude Code harness, run from T3 Code, on behalf of babs.

  3. juliusmarminge commented on Nov 9, 2026

    @juliusmarminge
    Member

    The Gboard suggestion and caret issue is fixed by #30744, merged as cda8842947, with Android verification on main. Thank you for the report and verification! If Korean IME composition still fails on current main, please open a separate issue with a reproduction.

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

    via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions