Repository navigation
fix(mobile): keep the new-thread composer above the keyboard when no model is available - #32137
juliusmarminge wants to merge 3 commits into
Conversation
…a model Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… it too KeyboardAvoidingView's automatic offset left the composer under Gboard on Android. KeyboardStickyView translates the bottom-anchored column by the keyboard height, the same way the thread composer does, on both platforms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Keeps the mobile new-thread composer above the keyboard when no model is selected. The change is limited to layout and touch handling; draft storage and thread creation behavior remain unchanged. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
EvidenceUse fresh isolated environments with the same synthetic project and all 11 provider instances disabled. Tap New chat, select Keyboard demo, and confirm the saved-draft notice without a model. Record opening the composer and typing three lines. On Android, dismiss and reopen the keyboard, then tap header Back. On iOS, use header Back, reopen the saved draft and keyboard, then tap header Back again.
Drivers: Android interaction, iOS interaction, project seed, provider-disabling RPC seed. AI-assisted; verified with the tests and tools listed above. Not shown:
|
Problem
On mobile, a new thread whose connected environment offers no selectable model shows a fallback composer ("Your draft is saved on this device. Connect to an environment to choose its first model."). Tapping Ask anything opens the keyboard over that composer, leaving an empty screen; typed text is invisible. The regular draft composer (when a model is available) was not affected.
Reproduced on main 6577c6b with an iPhone 17 Pro simulator and a Pixel 9 emulator: pair with an environment whose provider instances are all disabled, tap New chat, pick a project, tap Ask anything.
Change
The fallback column in
NewTaskDraftScreenhad no keyboard handling. It is now wrapped inKeyboardStickyViewfromreact-native-keyboard-controller, the same component the thread composer uses, so the bottom-anchored column moves up with the keyboard on iOS and Android. Both the sticky view and the column usepointerEvents="box-none", so the empty area that moves over the header does not block the header's Back button.Scope and approval
Fixes #32091
Verification
vp run check:changed: format, lint, knip, typecheck (2 packages) and react compiler pass.Proof line 1…Proof line 4→ dismiss (iOS: Back and reopen the saved draft; Android: system Back) → refocus. The after recordings also tap the header Back arrow with the keyboard open.Recordings
Before = 6577c6b, after = 83ee587.
iPhone 17 Pro, dark. Before: rest 0–5 s, focus ~6 s, typing 11–16 s, Back ~20 s, reopen ~23 s, refocus ~29 s; the composer stays hidden under the keyboard. After: same steps, then header Back ~31 s; the chip, notice, editor and caret sit above the keyboard.
Pixel 9, light, Gboard. Before: rest 0–4 s, focus ~5 s, typing 11–15 s, system Back ~19 s, refocus ~31 s; the composer stays hidden under Gboard. After: rest 0–6 s, focus ~7 s, typing 13–18 s, system Back ~23 s, refocus ~27 s, header Back ~31 s; the editor and typed lines sit above Gboard.
Endpoint stills
Each sheet is full screen: Before 6577c6b | After 83ee587 | Diff0 (any RGB change, amplified) | DiffT (5% fuzz). Stills were accepted only when two screenshots 500 ms apart matched.
iPhone 17 Pro, dark: keyboard closed (empty), keyboard open (empty), four lines typed, saved draft reopened.
Pixel 9, light: keyboard closed (empty), keyboard open (empty), four lines typed, after system Back.
Control, regular composer with a model available (iPhone, dark; rest, focused, typed, reopened): unchanged.
What else changed: with the keyboard closed, the layout matches main. Remaining diff pixels are status-bar clocks and signal glyphs, caret blink phase and position, keyboard suggestion strip and Shift state, and translucent keyboard blur over different content. The fixed-height editor still scrolls internally, so three of the four typed lines are visible at once, as on main. The regular composer control shows no geometry change.
Not checked: iPad and split-column layouts, a cached draft whose environment is disconnected, landscape, and larger text sizes. Checked on a simulator and an emulator, not on a physical phone.
AI-assisted; verified with the tests and tools listed above.