Skip to content

fix(mobile): remove the dead space around the chat composer - #29224

Merged
brennanb2025 merged 7 commits into
mainfrom
brennanb2025/mobile-composer-dead-space
Oct 17, 2026
Merged

brennanb2025 merged 7 commits into
mainfrom
brennanb2025/mobile-composer-dead-space

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​183 $\color{#cf222e}{\Huge{\mathbf{−}}}$​37 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​146
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​432 $\color{#cf222e}{\Huge{\mathbf{−}}}$​238 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​194

ELI5

The phone chat gave a full row to a small Tools button and kept a second message-box row open even when empty. This change returns that space to the conversation: the empty message box uses one row, its controls expand while editing, and Tools floats over the conversation when tool calls exist.

What Changed

  • The same message field stays mounted as the composer expands on focus, a draft, attachments, or an open picker. A draft survives leaving the field.
  • Model and permission pickers keep the composer expanded until their drawer finishes closing. Nested navigation preserves the original keyboard restoration intent. Pickers opened by accepted commands keep the keyboard dismissed.
  • Stop shares Send’s slot. A sendable follow-up shows Send; an empty composer, a prompt card that owns Send, or a pending send shows Stop when stopping is available. Upload and dictation editing retain their existing Send behavior, and a pending Stop keeps its spinner and disabled state.
  • The existing Tools expand-all action becomes a floating pill with a loaded tool-call count. Terminal-backed chats keep their working indicator visible while reading older messages. The list has enough bottom space for its last message to clear these controls.

The queued-message tray, prompt cards, errors, autocomplete, microphone behavior, and keyboard lift keep their existing behavior.

Why

The common pattern uses a stable message field, one owner for a picker presentation, and floating activity controls with matching space in the conversation. Sharing the primary action lets phone users stop work or send a follow-up without a permanent extra row. Shrinking the old Tools row would retain the empty space; removing its action would remove existing functionality.

Intended differences: drafts and attachments keep the full composer expanded as approved; the global Tools toggle remains available; upload and dictation editing retain existing action precedence. These are local presentation changes with no saved-data or wire changes.

Linked Issue

Reported in the Orca community Discord as part of the phone-polish work. The landscape-tabs change is tracked separately in #29070.

Visual Proof

Re-shot on head 555fe0598ad on an iPhone 17 Pro, against origin/main, with a local fixture and no paired desktop. PASS.

Before (origin/main) After (555fe0598ad)
Idle before, Tools row and pickers while idle after, one row
Focused before, focused, Tools row still present after, focused, picker row only
Agent working before, Stop above the composer, Send remains after, Stop in the send slot
Tools before, Tools row after, floating Tools pill

Measured: idle after is one composer row, the message field plus Send, with no Tools row and no picker row. Focused after adds the Ask and model row. Working after puts Stop in Send's slot (the control's name is "Stop the agent") and floats "Agent is working"; before leaves the send arrow in place and puts a separate Stop label above the composer. Tools after is a floating "Tools · 1" pill; before is a Tools row inside the composer.

Testing

  • Manual iOS simulator checks on the final commit
  • Automated tests added or updated

Rendered tests cover stable field identity, compact and expanded layouts, retained drafts, picker navigation and close completion, command-opened picker consumption, pending-send drafts with Stop still available, and a single floating working indicator with list clearance. On Windows, all four targeted mobile test files passed: 86 tests total. The normal precommit hook passed with only formatting changes. A follow-up corrects the test query typing; its 12 targeted tests and normal precommit hook passed. The full PR workflow (run 38824173552) and Mobile Checks (run 38824173408) are queued on 0f00efa72e2360fef87d4b00f57520434521aeeb; their success is not yet verified. Simulator checks remain blocked as described above.

AI Disclosure

Review

Two independent source-review rounds and a bounded architecture decision completed. Review corrections preserve nested picker keyboard restoration, give command-opened pickers the same expansion lifetime without reopening the keyboard, keep working feedback visible while reading history, preserve Stop during a pending send with a retained new draft, and make passive activity pass touches to the transcript. Broader upload action policy, result-only Tools history, and native focus timing remain deferred or subject to device QA. This PR remains draft until real simulator QA and required CI complete.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source is copied or translated.

Notes

Phone-only presentation change for iOS and Android; no desktop, transport, remote-host execution, or persisted-data changes. Real iOS keyboard timing and touch transitions require simulator evidence; Android runtime validation is separate.

Checklist

  • Focused phone composer and transcript-controls change
  • User-facing behavior, mechanism, and alternatives explained
  • Before/after screenshots attached
  • Independent review and real QA complete
  • Cross-platform and remote-session impact considered
  • Required CI passed on the current commit

The Tools toggle floats over the transcript and shows only when the chat
has tool calls; the composer is one row (attach, message, mic, send) until
focused or drafted; Stop takes Send's slot while there is nothing to send;
the bridge lane's working dots move to the transcript's tail.
@brennanb2025

brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

The phone chat left a full row around Tools and a second message-box row while empty, reducing space for the conversation. This change makes the empty composer one row, expands controls while editing, puts Stop in Send's place while the agent works, and keeps Tools as a pill floating over chats with tool calls.

Status: review loop done on 555fe0598ad14c75f7871e4520d8735ace4718f5.

  • Review: two independent source-review rounds passed. Fixes from review keep keyboard restoration through nested picker navigation, give command-opened drawers the same expansion lifetime without reopening the keyboard, keep Stop while an earlier send is pending, keep working feedback visible while reading history, and pass transcript touches through the passive working indicator.
  • Main merge: e64aed33b19 merges main. Main had split the chat view test file, so this PR's composer test stub moved into the shared fixture. 555fe0598ad updates one test main added after this branch started: it looked for the old "Tools" row, and now finds the floating pill (in chats with tool runs) to check that the expanded state survives a chat switch.
  • QA (iOS Simulator, iPhone 17 Pro, local mock fixture, no paired desktop): round 2 passed on 0f00efa72e2 (idle, focused, nested picker Back, Stop in Send's slot, floating indicator, Tools pill, draft kept, keyboard open). Round 3 re-shot idle, focused, working and Tools on 555fe0598ad: PASS. Screenshots are in the PR description.
  • CI: the full PR workflow and Mobile Checks passed on this exact head.
  • Deferred: broader upload action policy, and the Tools pill for chats whose history has tool results only.

Intended: Tools stays as a floating pill rather than being removed (removing it would drop a feature).

…omposer-dead-space

# Conflicts:
#	mobile/src/session/MobileNativeChatView.test.ts
@brennanb2025
brennanb2025 marked this pull request as ready for review October 17, 2026 00:46
@brennanb2025
brennanb2025 marked this pull request as draft October 17, 2026 00:49
@brennanb2025
brennanb2025 marked this pull request as ready for review October 17, 2026 00:50
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 60332894-5708-405d-9578-99b70464de14
📥 Commits

Reviewing files that changed from the base of the PR and between 555fe05 and 7923104.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

The composer now supports compact and expanded layouts, controlled session-option picker presentation, and a Stop control that can occupy the Send slot. The chat view uses floating controls for working status, tool-run toggling, and jump-to-latest actions. The changes also update composer and chat-view tests for layout, picker behavior, Stop handling, and transcript controls.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 555fe

The mock controls should match the composer, but no blocking behavior issue has been established. Merge readiness remains subject to the pending required checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 13 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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 and concisely describes the primary change: removing unused space around the mobile chat composer.
Description check Passed The description is detailed and covers the user-facing change, implementation approach, rationale, testing, visual proof, scope, and known limitations. It does not provide the required actual linked i…
Full details: Description check

Explanation

The description is detailed and covers the user-facing change, implementation approach, rationale, testing, visual proof, scope, and known limitations. It does not provide the required actual linked issue under “Fixes #,” and the checklist contains some unchecked items, but the description is otherwise mostly complete.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments: 1
mobile/src/session/MobileNativeChatView.render-stubs.test-fixture.ts: 1

48-52: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Align both composer mocks with the real Send/Stop slot.

When stop is present, the real composer renders Stop instead of Send. Both mocks currently expose both controls. The cited Stop tests only assert that Stop exists, so this mismatch can hide an incorrect slot implementation.

Suggested mock updates
-        { ...props, accessibilityLabel: 'Send message', onPress: () => props.onSend('hi') },
+        props.stop
+          ? { ...props }
+          : { ...props, accessibilityLabel: 'Send message', onPress: () => props.onSend('hi') },

Apply the same conditional props object to mobile/src/session/MobileNativeChatView.turn-status.test.ts.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a3923c02-9503-423f-a9f2-d036488fe979
📥 Commits

Reviewing files that changed from the base of the PR and between a293324 and 555fe05.

📒 Files selected for processing: 13
  • mobile/src/session/MobileNativeChatComposer.test.ts
  • mobile/src/session/MobileNativeChatComposer.tsx
  • mobile/src/session/MobileNativeChatFloatingControls.tsx
  • mobile/src/session/MobileNativeChatSessionOptionPickers.test.ts
  • mobile/src/session/MobileNativeChatSessionOptionPickers.tsx
  • mobile/src/session/MobileNativeChatStopButton.tsx
  • mobile/src/session/MobileNativeChatView.render-stubs.test-fixture.ts
  • mobile/src/session/MobileNativeChatView.tail-follow.test.ts
  • mobile/src/session/MobileNativeChatView.tsx
  • mobile/src/session/MobileNativeChatView.turn-status.test.ts
  • mobile/src/session/mobile-native-chat-composer-layout.ts
  • mobile/src/session/mobile-native-chat-composer-styles.ts
  • mobile/src/session/mobile-native-chat-view-styles.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@brennanb2025
brennanb2025 merged commit 5e8d40d into main Oct 17, 2026
22 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/mobile-composer-dead-space branch October 17, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant