You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): keep the new-thread composer above the keyboard when no model is available - #32137
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 NewTaskDraftScreen had no keyboard handling. It is now wrapped in KeyboardStickyView from react-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 use pointerEvents="box-none", so the empty area that moves over the header does not block the header's Back button.
vp run check:changed: format, lint, knip, typecheck (2 packages) and react compiler pass.
No new automated test: this is a layout bug, proven with before/after device captures.
Devices: iPhone 17 Pro simulator, iOS 27.2, dark, portrait, default text size; Pixel 9 emulator, Android 16 (API 36), light, portrait, Gboard. Real native dev client, each revision with its own server and Metro, fresh synthetic data (one project, all provider instances disabled). Script: rest → tap Ask anything → type 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.
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.
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.
… 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>
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 4c061cc. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
pingdotgg/t3code#25763: Adds autofocus for a new-task draft opened by the iOS shortcut, which also affects keyboard presentation in the composer.
pingdotgg/t3code#32375: Changes the no-model fallback layout where this PR adds keyboard-sticky behavior.
Suggested reviewers:flamboh
Merge Risk: Minimal · previous review 495a4
No merge-blocking issue is established; short-screen behavior remains unverified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title clearly states the mobile keyboard-layout fix and the no-model fallback condition.
Description check
The description covers the problem, change, linked issue, and detailed verification. It includes before-and-after UI evidence and notes the untested cases.
Linked Issues check
[#32091] is closed and completed, so it supplies background only. No active directly linked issue imposes coding requirements on this PR.
Out of Scope Changes check
The whole-PR diff changes only NewTaskDraftScreen.tsx. It wraps the no-model fallback composer in KeyboardStickyView and sets pointerEvents="box-none" to support the PR's stated keyboard-visibil…
Full details: Out of Scope Changes check
Explanation
The whole-PR diff changes only NewTaskDraftScreen.tsx. It wraps the no-model fallback composer in KeyboardStickyView and sets pointerEvents="box-none" to support the PR's stated keyboard-visibility fix and preserve access to the header Back button. The diff shows no unrelated changes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Use 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.
Android — Pixel 9, portrait 1080×2424, light, Gboard. Keyboard covers the composer and typed lines. Before recording
Android — same device, viewport and theme. Composer, text and caret remain visible after opening and reopening the keyboard; Back works. After recording
iOS — iPhone 17 Pro, portrait 1206×2622, light, software keyboard. Composer and text are covered, including after reopening. Before recording
iOS — same device, viewport and theme. Text and caret stay above the keyboard; Back works with the keyboard open. After recording
AI-assisted; verified with the tests and tools listed above.
Not shown:
Independent keyboard dismissal without leaving the draft on iOS was not shown: the software keyboard exposes no dismiss key. Both iOS recordings instead exercise dismissal through header Back and reopening the saved draft.
Connect with every provider instance disabled. Tap New chat/New thread, choose Keyboard demo, read the inline saved-draft notice, and type three lines into Ask anything. Reopen the keyboard on Android; leave and reopen the saved draft on both platforms. Tap header Back while the keyboard is open.
Both commits used synthetic data, portrait phones, light appearance, and normal software keyboards. Android: Pixel 9, API 36, Gboard, 1080×2424. iOS: iPhone 17 Pro, iOS 27.2, 402×874 points.
Base hides the editor and typed text on both platforms. Head keeps all three lines and the caret visible, including after saved-draft reopening. Header Back works with the keyboard open. Stills were selected after two pixel-identical screenshots at least 500 ms apart. iOS head recordings are split because longer exports reset the connection.
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
bugfixFix PR opened by an issue lead; enters the PR looppr:gate-failedA land gate failedsize:XS0-9 changed lines (additions + deletions).takeover:readyTakeover done; auto-lands when gates passvouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
1 participant
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.
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.