Skip to content

Mobile chat: remove the Tools toggle and its open-everything mode - #31188

Merged
brennanb2025 merged 6 commits into
mainfrom
brennanb2025/mobile-drop-tools-toggle
Oct 21, 2026
Merged

brennanb2025 merged 6 commits into
mainfrom
brennanb2025/mobile-drop-tools-toggle

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​81 $\color{#cf222e}{\Huge{\mathbf{−}}}$​111 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​15 $\color{#cf222e}{\Huge{\mathbf{−}}}$​121 $\color{#cf222e}{\Huge{\mathbf{−}}}$​106

ELI5

The phone chat had a floating "Tools · N" button in the bottom-right corner that, when tapped, opened every tool run and every tool line in the whole chat at once (and turned into "Collapse"). It took space over the transcript and made long chats unreadable. This removes the button and everything behind it. Tool runs still open one at a time when you tap them, as before.

What Changed

Before: any mobile chat with tool calls showed a "Tools · N" pill floating over the transcript (bottom-right, next to the jump-to-latest arrow). Tapping it expanded every run, every tool line and every diff card, and also re-showed rows a settled turn had folded behind its "Worked for" line.

After: no pill. Runs, lines and diff cards start closed and open only when you tap them. A settled turn's folded rows stay folded until you open the turn. The jump-to-latest arrow is unchanged.

Mechanism removed:

  • The pill in MobileNativeChatFloatingControls, its styles, the tool-call counter that decided whether to show it, and the extra bottom padding the list reserved so the last row could scroll clear of it.
  • The toolsExpanded state in MobileNativeChatView and its threading through the row renderer and MobileNativeChatMessage (including the branch that un-folded settled turns' rows when it was on).
  • defaultExpanded / expandChildren on the tool run, and defaultExpanded on tool lines and diff cards: those existed only to carry the "open everything" default. They now always start closed.
  • The open/closed memory keys no longer include that default (they used to be split per default so a reader's choices came back when the toggle was turned off). What a reader opened is still remembered when a row scrolls away and comes back.

Why

Asked for directly: the toggle is unwanted on mobile and its supporting code should go too. Removing the default from the disclosure keys, rather than pinning it to false, leaves one key per run/line instead of a split that no longer means anything.

Plan and review path

Plan: remove the pill and everything that only existed for its open-everything mode; keep each run, line and diff card opening on its own tap. No saved data or wire changes.

Review path: full (11 production files, above the light-path limit of 5).

Linked Issue

None (maintainer request).

Visual Proof

Native phone QA — 98cab4b44946edd183b04df69485458440cfdc7c

Real Codex (gpt-6.1-sol) in a signed iPhone 17 Pro simulator client, paired normally with desktop 1.4.214. The same prompt and fixture produced three real list/create/read calls and a completed hello reply on both builds. Main is d98b8eddb41eb6c6cc5a25e10d9099bb0e023e35 (footer 5f42ac3ef07c); branch footer is 49e931ec6a5f.

Main: finished chat, Tools · 3 Branch: finished chat, no Tools pill
Main finished chat with Tools · 3 Branch finished chat without Tools pill

On main, tapping Tools changes it to Collapse and opens the finished activity and outputs. On the branch, runs, lines and the file-edit disclosure opened only on their own taps; Worked for opened and folded the turn; jump-to-latest returned to the newest reply; the original run stayed open after scrolling away through a real reply of 60 sentences and returning. The latest-message gap above the composer is smaller, with no space reserved for the removed pill.

Branch check Open / away Closed / returned
Individual line Individual tool line open with real listing output Individual tool run closed
Worked for Worked for reveals folded activity Worked for refolds activity
Scroll to latest Scroll to latest arrow visible Returned to newest hello reply
Expansion persists Far away at the end of the long reply Original run and listing output still open after return

Additional transitions: run open, line closed, file-edit detail open / closed.

The exact second prompt, “Now delete notes.txt”, showed its working line and running tool, then replied “Deleted notes.txt”; disk verification confirmed deletion. The fixture keeps calls separate and pauses deletion for three seconds so live activity can be captured. The long reply was a third, supplementary prompt.

Second prompt: working line and running tool Completed real reply
Live second turn with Working for and running deletion command Completed second turn confirms deletion

Coverage limits: main coverage stops at the finished-chat and global-toggle baseline; its remaining disclosure and scroll checks were not completed. All applicable branch flows passed. The file-edit body was exercised, but this Codex run showed no separate diff card with added/deleted line markers; that presentation and whether rows were actually unmounted were not directly verified. Both builds also display the model-chip placeholder “Reasoning effort” after sending, and label creation of the new file “Edited”. The floating gear belongs to the development client.

Testing

  • Tests that drove the toggle were removed or rewritten: tests that relied on runs starting open now tap the run header (and lines) open, as a reader would.

  • Mobile tests run in CI (Mobile Checks).

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Mobile only. No saved data or wire changes: the open/closed memory is in-memory per chat, so changing its keys needs no migration. Desktop is untouched.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@brennanb2025
brennanb2025 marked this pull request as ready for review October 20, 2026 18:44
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b653c272-401d-4274-8156-ea055c6b2168
📥 Commits

Reviewing files that changed from the base of the PR and between 6b930ef and fd8b886.

📒 Files selected for processing: 1
  • mobile/src/session/mobile-native-chat-scroll-ownership.test.tsx

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

📝 Walkthrough

Mobile chat tool runs, tool lines, and diff cards now start collapsed when no disclosure state is remembered. The Tools expansion toggle and its related state, props, tool-call counting, and styles were removed. The floating controls retain jump-to-latest behavior. Tests now open disclosures through presses and cover updated row, scroll, and tail-follow behavior.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to fd8b8

No concrete merge-blocking risk remains from the reviewed changes; native QA remains an optional follow-up.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 45.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 14 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: removing the mobile Tools toggle and its open-everything behavior.
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.
Description check Passed The description is complete and matches the required template. It explains the user-visible change, implementation, rationale, testing, visual proof, scope, and checklist status. The maintainer except…
Full details: Description check

Explanation

The description is complete and matches the required template. It explains the user-visible change, implementation, rationale, testing, visual proof, scope, and checklist status. The maintainer exception explains the missing linked issue. Some checklist items remain unchecked, and the Review section is empty, but these do not make the description incomplete.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Keep the final render working while checking… · mobile-native-chat-scroll-ownership.test.tsx:399-403

mobile/src/session/mobile-native-chat-scroll-ownership.test.tsx:399-403
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the final render working while checking frame reuse.

The final draw([user, a, b]) settles the turn. The turn fold then hides the tool rows, so ToolRun does not mount and roots.frame(\run:${owners[1]}`)returnsundefined`. The unsuffixed frame key is correct.

Suggested fix
-    draw([user, a, b])
+    draw([user, a, b], { working: true })

ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b2a19046-0fd9-4688-9202-bf6a6deff42a
📥 Commits

Reviewing files that changed from the base of the PR and between 3803416 and 6b930ef.

📒 Files selected for processing: 18
  • mobile/src/session/MobileNativeChatDiffCard.tsx
  • mobile/src/session/MobileNativeChatFloatingControls.tsx
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.tool-result-availability.test.tsx
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatToolLine.tsx
  • mobile/src/session/MobileNativeChatToolRun.identity.test.tsx
  • mobile/src/session/MobileNativeChatToolRun.test.tsx
  • mobile/src/session/MobileNativeChatToolRun.tsx
  • mobile/src/session/MobileNativeChatView.tail-follow.test.ts
  • mobile/src/session/MobileNativeChatView.tsx
  • mobile/src/session/mobile-native-chat-composer-layout.ts
  • mobile/src/session/mobile-native-chat-disclosure-store.ts
  • mobile/src/session/mobile-native-chat-reading-place.test.tsx
  • mobile/src/session/mobile-native-chat-scroll-ownership.test.tsx
  • mobile/src/session/mobile-native-chat-tool-run-props.ts
  • mobile/src/session/mobile-native-chat-view-styles.ts
  • mobile/src/session/use-mobile-native-chat-row-renderer.tsx
💤 Files with no reviewable changes: 4
  • mobile/src/session/mobile-native-chat-composer-layout.ts
  • mobile/src/session/mobile-native-chat-tool-run-props.ts
  • mobile/src/session/use-mobile-native-chat-row-renderer.tsx
  • 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 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Problem: the phone chat had a floating "Tools · N" button over the transcript. Tapping it opened every tool run, tool line and file change in the whole chat at once, and also un-hid the steps a finished turn tucks behind its "Worked for" row. It covered the transcript and made long chats hard to read.

What changes for the user: the button is gone. Each tool run, line and file change opens only when you tap it; a finished turn's steps stay tucked away until you tap its "Worked for" row; the jump-to-latest arrow is unchanged. The space the list reserved for the button is gone too.

Review (full path): round 1 correctness and architecture reviews, the readiness checklist and a final mechanism comparison found no issues at any severity, so no fixes were needed. Since then the branch only merged main twice (to pick up main's format fix and the zod version fix, #31260). Test-only changes made the mobile tests pass without the removed default.

Verified:

  • Full PR Checks and Mobile Checks pass on 98cab4b44946edd183b04df69485458440cfdc7c.
  • Native phone QA on that exact commit: a signed iPhone 17 Pro simulator paired with a desktop test copy, a real Codex agent running real tool calls on main and on the branch. Branch: no button; runs, lines and the file-edit detail open and close on their own taps; "Worked for" opens and folds the turn; jump-to-latest returns to the newest reply; an opened run stays open after scrolling far away through a long real reply and back; a second prompt showed its live working line and running tool, then replied. Screenshots are in the PR description's Visual Proof section.

Not verified:

  • On main, only the finished chat with the button and the after-tap state were captured. The rest of main's open/close and scroll checks weren't repeated there, because the machine booking ended.
  • This Codex run produced no separate diff card with added/deleted line markers, so that card's closed default was checked in code and tests, not on screen.

Seen on both main and the branch (not caused by this PR): after sending, the model chip shows the placeholder "Reasoning effort", and creating a new file is labelled "Edited".

For Brennan's review:

@brennanb2025
brennanb2025 merged commit 6de974c into main Oct 21, 2026
23 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/mobile-drop-tools-toggle branch October 21, 2026 05:58
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