Skip to content

fix(mobile): keep the new-thread composer above the keyboard when no model is available - #32137

Open
juliusmarminge wants to merge 3 commits into
mainfrom
fix/issue-32091
Open

juliusmarminge wants to merge 3 commits into
mainfrom
fix/issue-32091

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

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 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.

Scope and approval

Fixes #32091

Verification

  • 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.

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.

Before 6577c6b After 83ee587
Before: iPhone no-model draft, composer hidden by the keyboard After: iPhone no-model draft, composer 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.

Before 6577c6b After 83ee587
Before: Pixel no-model draft, composer hidden by Gboard After: Pixel no-model draft, composer 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.

iPhone keyboard closed, empty draft
iPhone keyboard open, empty draft
iPhone keyboard open, four lines typed
iPhone saved draft reopened, keyboard closed

Pixel 9, light: keyboard closed (empty), keyboard open (empty), four lines typed, after system Back.

Pixel keyboard closed, empty draft
Pixel keyboard open, empty draft
Pixel keyboard open, four lines typed
Pixel after system Back, keyboard closed

Control, regular composer with a model available (iPhone, dark; rest, focused, typed, reopened): unchanged.

Before 6577c6b After 83ee587
Before: regular composer After: regular composer

Regular composer control sheet

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.

juliusmarminge and others added 2 commits November 6, 2026 17:10
…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>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 6, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 83ee587

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 495a419. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The no-model fallback on NewTaskDraftScreen now wraps its existing controls in KeyboardStickyView. Its inner view uses pointerEvents="box-none".

Changes: New-thread composer

Layer / File(s) Summary
Keyboard-sticky fallback
apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
The no-model fallback now uses KeyboardStickyView around its existing controls. The inner view uses pointerEvents="box-none".

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related PRs

  • 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 · up to 495a4

No merge-blocking issue is established; short-screen behavior remains unverified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly states the mobile keyboard-layout fix and the no-model fallback condition.
Description check Passed 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 Passed [#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 Passed 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 docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Usage-based review receipt

Note

This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 83ee587 and 495a419.

Files selected for processing: 1

  • apps/mobile/src/features/threads/NewTaskDraftScreen.tsx

Limit details: You’ve used all 10 included reviews currently available.

@juliusmarminge juliusmarminge added bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed labels Nov 6, 2026

Copy link
Copy Markdown
Member Author

Evidence

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.

Before After
d756fed7aa 495a419b00
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

Drivers: Android interaction, iOS interaction, project seed, provider-disabling RPC seed.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fix PR opened by an issue lead; enters the PR loop pr:gate-failed A land gate failed size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: iOS new-thread composer disappears behind keyboard

1 participant