Skip to content

fix(mobile): stop the iOS model chip from sitting on the editor - #11944

Open
derektrimm wants to merge 1 commit into
pingdotgg:mainfrom
derektrimm:fix/mobile-model-chip-hits
Open

derektrimm wants to merge 1 commit into
pingdotgg:mainfrom
derektrimm:fix/mobile-model-chip-hits

Conversation

@derektrimm

@derektrimm derektrimm commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

What Changed

Tapping GPT-6-Astra on iPhone selected the composer (Paste/AutoFill) instead of opening Thread Settings. The settings row was position: absolute over the native UITextView, and Reanimated layout morphs on that editor host can leave the editor's hit box covering the chip.

Mount the settings row in normal flow only, never as an overlay, and drop the layout animation on the editor wrapper.

Device: iPhone 14 Pro Max, iOS 26.7, T3 Code alpha.

Screen recording: tapping GPT-6-Astra shows Paste/AutoFill. Thread Settings never opens.

https://github.com/derektrimm/t3code/releases/download/ios-model-chip-repro/t3-iphone-astra-tap.mp4

This replaces the closed swipe-latch attempt: #11758

Closes #11987

Why

iOS native views win hit testing against overlapping RN siblings. A chip laid out over the composer is a text selection, not a button.

UI Changes

The collapsed composer no longer parks an invisible 44px toolbar on top of the editor. The model row appears under the prompt when the draft is expanded, the same two-row layout as an already-focused composer.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Tapping GPT-6-Astra on iPhone selected the composer (Paste/AutoFill)
instead of opening Thread Settings. The settings row was position:absolute
over the native UITextView, and Reanimated layout morphs on that host can
leave the editor's hit box covering the chip. Mount the row in flow only,
never as an overlay, and drop the layout animation on the editor wrapper.
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 15, 2026
) : null}
{isExpanded ? <View className="h-1" /> : null}
</ComposerDictationDraftContent>
{settingsToolbar.mount ? (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium threads/ThreadComposer.tsx:907

When dictation is active while the composer is collapsed, the hidden editor still occupies its 36px layout height, so mounting the toolbar in normal flow produces an approximately 80px surface with a blank, non-interactive gap instead of the compact dictation strip. Keep the toolbar absolutely overlaid for this state, as the previous !isExpanded layout did.

🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/mobile/src/features/threads/ThreadComposer.tsx around line 907:

When dictation is active while the composer is collapsed, the hidden editor still occupies its 36px layout height, so mounting the toolbar in normal flow produces an approximately 80px surface with a blank, non-interactive gap instead of the compact dictation strip. Keep the toolbar absolutely overlaid for this state, as the previous `!isExpanded` layout did.

@macroscopeapp

macroscopeapp Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Would Approve

Macroscope's review found this PR approvable — This is a narrowly scoped iOS composer bug fix that removes the settings-toolbar overlay and adds focused state coverage, with no schema, infrastructure, security, billing, or static-analysis impact. An unresolved Medium finding identifies a concrete layout regression during collapsed dictation, so that correctness issue remains a separate blocking concern despite the otherwise limited change scope.

Not approved because:

  • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5a2f9bc3-0b8e-46f6-b76d-df168244c903

📥 Commits

Reviewing files that changed from the base of the PR and between 3efdcc5 and 41940e7.

📒 Files selected for processing (3)
  • apps/mobile/src/features/threads/ThreadComposer.tsx
  • apps/mobile/src/features/threads/composer-draft-expansion.test.ts
  • apps/mobile/src/features/threads/composer-draft-expansion.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The composer now uses a helper to determine when the settings toolbar mounts and whether it overlays the editor. The toolbar does not overlay the editor, and layout transitions were removed from the editor wrapper and toolbar.

Changes

Composer toolbar layout

Layer / File(s) Summary
Toolbar layout helper and tests
apps/mobile/src/features/threads/composer-draft-expansion.ts, apps/mobile/src/features/threads/composer-draft-expansion.test.ts
The helper mounts the toolbar when the composer is expanded or voice input is presented. It always disables editor overlay. Tests cover all input combinations.
Composer toolbar integration
apps/mobile/src/features/threads/ThreadComposer.tsx
ThreadComposer uses the helper to conditionally mount the toolbar and control its positioning. Layout transitions were removed from the editor wrapper and toolbar.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 41940

The toolbar layout change preserves the intended composer behavior without a verified remaining merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the mobile iOS bug fix and matches the main change: preventing the model chip from overlaying the editor.
Description check ✅ Passed The description explains what changed, why it changed, the UI impact, reproduction details, and the related issue. It includes the required video, but it does not include before/after screenshots for …
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: iOS composer never grows with the prompt, and its controls ignore taps while the editor is focused

1 participant