Skip to content

feat(mobile): improve mobile terminal input - #37900

Merged
AmoabaKelvin merged 2 commits into
mainfrom
term-old-input
Nov 4, 2026
Merged

AmoabaKelvin merged 2 commits into
mainfrom
term-old-input

Conversation

@AmoabaKelvin

@AmoabaKelvin AmoabaKelvin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

ELI5

The phone's terminal used to have two ways to type: "Keys", where each letter goes straight to the terminal, and "Message", a chat box where you write a line and press Send. You had to switch between them. Now there is one input again, like before #36166: the row of keys on top and one field below it, and whatever you type goes straight to the terminal. It looks like today's app, not the old one.

Files Added Deleted Net
Test 37 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​148 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1220 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1072
Prod 91 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​4055 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7315 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3260

What Changed

Before: every terminal tab had a Keys/Message switch. Agent tabs opened in Message (a chat composer with Send/Stop), shells in Keys. The key row under the field had sticky ctrl/alt/shift, an arrow pad and a ⋯ sheet holding Paste, attachments, Desktop width and the rest of the keys.

After: every terminal tab, shell or agent, gets the dock from before #36166, restyled:

Mechanism:

  • MobileSessionCommandDock / MobileSessionAccessoryKeys go back to the old layout on today's terminalDockStyles tokens. TextField gains a label prop for the caption. The arrow pad, the row's ⋯ and mode key, and the Message composer are gone.
  • The per-terminal live-input mode (use-terminal-live-input-mode-preference, its opt-out storage and the default/prune/clear plumbing) is deleted, so every terminal is live. The live-input commit, flush and accessory hooks drop their per-handle membership checks; the active-handle and tab-type guards still apply.
  • The buffered line is deleted in its own commit: per-terminal drafts and their storage, handleSend, command-field dictation, draft restoration, and the Terminal settings "Autocomplete & autocorrect" switch, which only applied to that line. Dictation in a terminal always types into it live.
  • iPhone Duo rail. The rail is native shell code, so shipped shells keep drawing an input-mode key, sticky Ctrl/Alt/Shift and ⋯. The page keeps sticky modifiers and the More keys sheet only behind the rail. It ignores toggleInputMode and reports liveInputEnabled: true, canCompose: false, so shipped shells grey that key. The shell change in this PR hides the key when canCompose is false; that part only reaches users with the next app release. No bridge field changes shape. Held modifiers only change typed letters while the rail is on screen. When there is no rail (the unfolded Duo held horizontally), the row adds the arrow keys that the Duo layout leaves to the rail's D-pad (getVisibleTerminalAccessoryKeys(..., true) from feat(mobile): iPhone Duo key rail with D-pad, split terminal panes and half-fold layout #35177).
  • Stored mode opt-outs, drafts and the autocomplete flag from older builds are never read again. The shell's storage key lists are left alone.

Why

Kelvin's call: "terminal is terminal". Two inputs to switch between was the wrong model for a terminal, so this restores the single live input the old dock had (approved mock A) instead of keeping Message mode behind a toggle. With no way to reach the buffered line, its code and setting go too rather than staying dead on main. For the Duo, keeping the rail's modifiers and ⋯ sheet lets shipped shells keep working without a wire change. A rail-only page row was ruled out because it would cost the Duo a row of height and duplicate keys.

Linked Issue

No issue. This is a design change from Kelvin (mock A, "old terminal input, restyled"), reversing the dock part of #36166.

Visual Proof

Real app, iPhone simulator. Before is main (Keys/Message dock), after is this branch. Typing shots have the soft keyboard up and the letters already in the terminal.

Before (main) After
Idle, dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Idle, light (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Typing, keyboard up, dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Typing, keyboard up, light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Page captures (shell tab and agent tab). Agent tabs used to open in Message; now they get the same live input.

Before (main) After
Shell, dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Shell, light (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Agent tab, dark (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Agent tab, light (screenshot removed: contained real product data) (screenshot removed: contained real product data)

iPhone Duo (this branch). On the cover the keys are on the side rail and the page dock is just the live field. The rail's keyboard key focuses it, and the rail's ⋯ still opens More keys. Unfolded and held horizontally there is no rail, so the row shows, with the arrows at its end.

Cover, idle Cover, keyboard from rail Cover, rail ⋯ Unfolded Unfolded, horizontal Horizontal row, end
(screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data)

Testing

  • I manually tested these changes locally

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

  • Real app on the iOS 27 simulator (OTA dev client, Metro from this branch) paired to a headless serve built from this branch, then the same app against main's page bundle for the before shots. Typed with the soft keyboard: letters reach the zsh prompt live, dark and light.

  • iPhone Duo simulator (iOS 27.2): cover screen, unfolded, unfolded horizontal. Checked the rail keyboard key, the rail ⋯ sheet, the no-rail row with arrows, and that this shell hides the input-mode key.

  • Page bundle builds and passes verify-mobile-web-app-bundle within the asset sweep (12,515,308 B, smaller than main).

  • Focused tests: mobile/src/session, terminal, components, mobile-web-shell, storage and the RPC recordings (672 files), plus the held-press, session and live-input render suites in a real browser. Mobile typecheck, pnpm check:changed and the React doctor changed-lines gate pass. verify:mobile-localization and verify:mobile-localization-coverage pass after sync:mobile-localization.

  • RPC goldens re-recorded deterministically (rpc:record --prune). The only changes are the removed live-input and draft effects and the two deleted buffered-Send scenarios. The bridged-parity identical count is re-pinned 387 → 385 for those two.

  • Tests: tests that only pinned the two modes or the buffered line are deleted. The pre-feat(mobile): match every text input to the chat composer and rebuild the terminal dock #36166 held-key render tests are restored for the old row; they caught a double send on keyboard Enter (a web <button> clicks on keydown), now fixed by leaving repeatable keys without role=button, as the old row did. One assertion pins that canCompose: false drops the rail's input-mode key.

Not tested: Android, and a real iPhone Duo device.

Risk

Riskiest part: removing the per-terminal live-input membership from the live-input commit and flush hooks. If a guard there was load-bearing, typed text could reach the wrong terminal after a tab switch. The active-handle and tab-type guards cover it, and the split-pane, tab-switch and click-ordering tests pass. Older paired phones: shipped shells grey their input-mode key on the Duo rail (pressing it does nothing) until the next app release. The Terminal settings autocomplete row is a native route, so shipped shells still show it until a release, but it does nothing any more. Unsent buffered drafts from older builds are not shown. Back out with a plain revert of the two commits; the stored values left behind are just read again.

Level: Medium

AI Disclosure

Review

Review findings rejected, with reasons:

  • Show unsent buffered drafts from older builds once: rejected. Kelvin's call was that old drafts and mode values are just never read again.
  • Clear held rail modifiers when the rail hides, instead of guarding typing: kept the guard. A held modifier stays visible on the rail when it comes back, and clearing it would need a new dock-keys API.
  • Tapping the "Live input" caption doesn't focus the field, and a VoiceOver tap after a long-press can reuse a used press: P3, left as is. The second one is old-row behaviour carried over unchanged.

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

  • Shipped phone shells: the page dock, keys and dictation are OTA (served by the host). Two parts are native and ship only with an app release: hiding the Duo rail's input-mode key (mobile-web-shell/terminal-key-rail.tsx) and removing the Terminal settings autocomplete row (mobile/app/terminal-settings.tsx).
  • Mixed host versions: no RPC or bridge shape changes. New shell with an old page still shows the mode key, because old pages report canCompose: true.
  • Cross-platform, SSH and folder workspaces: page-only change. The live input path is the same for local and remote terminals.
  • Needs Kelvin's blessing before merge.

Checklist

  • This PR is small and focused (focused, but large: mostly deletions of the two-mode dock and the buffered line, plus re-recorded RPC goldens)
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • 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)

@AmoabaKelvin AmoabaKelvin changed the title feat(mobile): bring back one live terminal input with the old key row feat(mobile): improve mobile terminal input Nov 3, 2026
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Walkthrough

The mobile terminal input model now centers on live input and removes buffered terminal drafts, per-terminal live-input preferences, and autocomplete settings. The accessory row uses built-in and custom keys, repeat behavior, display-mode switching, clipboard paste, and keyboard dismissal. Dictation sends terminal transcripts to the active or captured terminal handle. Tests and RPC recordings are updated for these flows, and terminal interface translations are revised.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… 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 "feat(mobile): improve mobile terminal input" is related to the main change. The PR replaces the Keys/Message dock with one live-input field for terminal tabs, and removes the buffered compo…
Description check Passed The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, an…
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.
Full details: Title check

Explanation

The title "feat(mobile): improve mobile terminal input" is related to the main change. The PR replaces the Keys/Message dock with one live-input field for terminal tabs, and removes the buffered composer. The title is broad. It does not name the main change, which is the removal of the Keys/Message mode toggle and the buffered composer in favor of a single live input. It also uses the generic word "improve", but it still points to the terminal input area the changes affect.

Full details: Description check

Explanation

The description follows the repository template closely. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. It explains the before and after behavior, the mechanism, the rationale, and the rollback path. It also includes before/after visuals and test details. The Linked Issue section says there is no issue and gives a design-change reason. That conflicts with the template rule for outside contributors, but the author is a maintainer, so it is acceptable. Some checklist items remain unchecked, and the AI Disclosure section is empty. The template marks that section as optional for internal team members.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 18 functions across 40 files. (34 skipped: 34 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

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

Warning

Review coverage is incomplete: 1 file could not be fully reviewed. Findings from completed review steps are included; see review info for details.

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
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5e53a675-d951-4aee-8871-4da1db9c09d3
Commits

Reviewing files that changed from the base of the PR and between e98c6a4 and 9cbd4e3.

Files selected for processing: 128
  • config/scripts/mobile-web-app/mobile-web-app-held-press-render.test.mjs
  • config/scripts/mobile-web-app/mobile-web-app-session-render.test.mjs
  • config/scripts/mobile-web-app/mobile-web-app-terminal-live-input-render.test.mjs
  • config/scripts/mobile-web-app/preview/mobile-web-app-held-press-probe-routes.mjs
  • config/scripts/mobile-web-app/preview/mobile-web-app-live-input-probe-route.mjs
  • mobile/app/terminal-settings.tsx
  • mobile/mobile-terminal-direct-input-default.md
  • mobile/rpc-foundation/goldens/matrix-session.create-terminal-session.tabs.createterminal-1.json
  • mobile/rpc-foundation/goldens/matrix-session.create-terminal-terminal.send-1.json
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-1.json
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-2.json
  • mobile/rpc-foundation/goldens/matrix-session.tab-close-session-session.tabs.close-1.json
  • mobile/rpc-foundation/goldens/matrix-session.tab-close-terminal.close-1.json
  • mobile/rpc-foundation/goldens/matrix-session.terminal-input-send-terminal.send-1.json
  • mobile/rpc-foundation/goldens/matrix-session.terminal-inventory-terminal.list-1.json
  • mobile/rpc-foundation/goldens/session-create-terminal-ignores-a-second-create-in-flight.json
  • mobile/rpc-foundation/goldens/session-create-terminal-launches-an-agent-quick-command.json
  • mobile/rpc-foundation/goldens/session-create-terminal-replaces-active.json
  • mobile/rpc-foundation/goldens/session-create-terminal-runs-a-quick-command.json
  • mobile/rpc-foundation/goldens/session-create-terminal-with-prompt.json
  • mobile/rpc-foundation/goldens/session-create-terminal-without-active-tab.json
  • mobile/rpc-foundation/goldens/session-startup-both-activation-sites.json
  • mobile/rpc-foundation/goldens/session-startup-floating-route-skips-activation.json
  • mobile/rpc-foundation/goldens/session-startup-keeps-terminals-visible-on-reconnect.json
  • mobile/rpc-foundation/goldens/session-startup-refused-tab-load-still-loads-terminals.json
  • mobile/rpc-foundation/goldens/session-tab-close-session-tab.json
  • mobile/rpc-foundation/goldens/session-tab-close-terminal.json
  • mobile/rpc-foundation/goldens/session-tab-closed.json
  • mobile/rpc-foundation/goldens/session-terminal-list-dedupes-handles.json
  • mobile/rpc-foundation/goldens/session-terminal-list-merged.json
  • mobile/rpc-foundation/goldens/terminal-input-send-accepted.json
  • mobile/rpc-foundation/goldens/terminal-input-send-refused.json
  • mobile/rpc-foundation/goldens/terminal-live-input-accepted.json
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/components/composer-input/MessageBox.tsx
  • mobile/src/components/composer-input/TextField.tsx
  • mobile/src/components/composer-input/composer-input-styles.ts
  • mobile/src/i18n/locales/de.json
  • mobile/src/i18n/locales/en.json
  • mobile/src/i18n/locales/es.json
  • mobile/src/i18n/locales/fr.json
  • mobile/src/i18n/locales/ja.json
  • mobile/src/i18n/locales/ko.json
  • mobile/src/i18n/locales/pt.json
  • mobile/src/i18n/locales/ru.json
  • mobile/src/i18n/locales/tr.json
  • mobile/src/i18n/locales/zh-Hant.json
  • mobile/src/i18n/locales/zh.json
  • mobile/src/mobile-web-shell/terminal-key-rail.test.tsx
  • mobile/src/mobile-web-shell/terminal-key-rail.tsx
  • mobile/src/session/MobileDictationMeter.tsx
  • mobile/src/session/MobileSessionAccessoryKeys.tsx
  • mobile/src/session/MobileSessionCommandDock.tsx
  • mobile/src/session/MobileTerminalCommandDictationPreview.tsx
  • mobile/src/session/MobileTerminalInputActions.tsx
  • mobile/src/session/TerminalArrowPad.tsx
  • mobile/src/session/mobile-closed-tab-queued-edit-lifetime.test.tsx
  • mobile/src/session/mobile-closed-tab-send-cleanup-lifetime.test.tsx
  • mobile/src/session/mobile-dictation-agent-chat-start.test.tsx
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/session/mobile-dictation-session-outcomes.test.tsx
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/mobile-session-accessory-repeat-lifecycle.test.tsx
  • mobile/src/session/mobile-session-diff-notes-new-agent-send.test.ts
  • mobile/src/session/mobile-session-preference-startup.test.ts
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/session/mobile-terminal-prune-decision.test.ts
  • mobile/src/session/mobile-terminal-prune-decision.ts
  • mobile/src/session/mobile-terminal-split-gestures.test.tsx
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/session/terminal-dock-styles.ts
  • mobile/src/session/terminal-field-submit-binding-send.test.tsx
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/session/use-mobile-dictation-destination.ts
  • mobile/src/session/use-mobile-session-close-actions.test.tsx
  • mobile/src/session/use-mobile-session-close-actions.ts
  • mobile/src/session/use-mobile-session-native-chat-dictation.ts
  • mobile/src/session/use-mobile-session-preference-focus.ts
  • mobile/src/session/use-mobile-session-screen-state.ts
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/session/use-mobile-session-tab-application-launch.test.ts
  • mobile/src/session/use-mobile-session-tab-application.ts
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.ts
  • mobile/src/session/use-mobile-session-terminal-create-agent-launch.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.ts
  • mobile/src/session/use-mobile-session-terminal-list.ts
  • mobile/src/session/use-mobile-session-terminal-runtime.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
  • mobile/src/session/use-session-terminal-key-rail.ts
  • mobile/src/session/use-terminal-dock-keys.ts
  • mobile/src/session/use-terminal-live-input-mode-preference.ts
  • mobile/src/storage/preferences.test.ts
  • mobile/src/storage/preferences.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.test.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.ts
  • mobile/src/terminal/terminal-input-connection-gate.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.test.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.ts
  • mobile/src/terminal/terminal-keyboard-type.ts
  • mobile/src/terminal/terminal-live-dictation-routing.ts
  • mobile/src/terminal/terminal-live-input.test.ts
  • mobile/src/terminal/terminal-live-input.ts
  • mobile/src/terminal/use-buffered-terminal-drafts-storage.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.ts
  • mobile/src/terminal/use-stored-buffered-terminal-drafts.ts
  • mobile/src/terminal/use-terminal-live-accessory-input-commit.test.ts
  • mobile/src/terminal/use-terminal-live-accessory-input-commit.ts
  • mobile/src/terminal/use-terminal-live-input-click.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.test.ts
  • mobile/src/terminal/use-terminal-live-input-commit.ts
  • mobile/src/terminal/use-terminal-live-input-focus.test.ts
  • mobile/src/terminal/use-terminal-live-input-focus.ts
  • mobile/src/terminal/use-terminal-live-pending-input-flush.ts
  • mobile/src/terminal/use-terminal-text-field-submit-binding.test.tsx
  • mobile/src/test-support/bridged-parity/divergence-classes.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-read-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-startup-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-create-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
Files with no reviewable changes: 53
  • mobile/src/session/mobile-markdown-document-lifetime.test.ts
  • mobile/src/session/mobile-session-diff-notes-new-agent-send.test.ts
  • mobile/rpc-foundation/goldens/terminal-input-send-refused.json
  • mobile/src/session/use-mobile-agent-message-navigation.test.ts
  • mobile/src/test-support/rpc-recording/adapters/session-startup-mount-adapters.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.test.ts
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-create-mount-adapters.ts
  • mobile/src/session/mobile-terminal-layout-choice.test.tsx
  • mobile/src/terminal/use-terminal-live-input-focus.test.ts
  • mobile/src/session/mobile-terminal-tab-agent.ts
  • mobile/src/session/MobileDictationMeter.tsx
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-gesture-mount-adapters.ts
  • mobile/src/session/mobile-image-live-input-order.test.tsx
  • mobile/src/terminal/buffered-terminal-draft-restoration.test.ts
  • mobile/src/session/mobile-file-preview-lifecycle.test.ts
  • mobile/rpc-foundation/goldens/terminal-input-send-accepted.json
  • mobile/src/session/mobile-closed-tab-send-cleanup-lifetime.test.tsx
  • mobile/src/terminal/use-terminal-live-input-commit.test.ts
  • mobile/src/session/use-mobile-session-terminal-create-actions.ts
  • mobile/src/session/use-mobile-session-terminal-create-agent-launch.test.ts
  • mobile/src/test-support/rpc-recording/adapters/session-screen-tab-mount-adapters.ts
  • mobile/src/session/mobile-terminal-prune-decision.ts
  • mobile/src/session/use-mobile-session-tab-switching.ts
  • mobile/src/session/use-mobile-session-tab-application-launch.test.ts
  • mobile/src/session/use-mobile-session-terminal-input.test.ts
  • mobile/src/storage/preferences.test.ts
  • mobile/src/terminal/terminal-keyboard-type.ts
  • mobile/mobile-terminal-direct-input-default.md
  • mobile/src/terminal/terminal-live-input.test.ts
  • mobile/src/session/use-mobile-session-close-actions.ts
  • mobile/src/terminal/use-terminal-live-input-click.test.ts
  • mobile/src/session/mobile-session-accessory-repeat-lifecycle.test.tsx
  • mobile/src/session/mobile-terminal-split-input.test.tsx
  • mobile/src/terminal/use-buffered-terminal-drafts.test.tsx
  • mobile/src/session/use-terminal-live-input-mode-preference.ts
  • mobile/src/terminal/use-buffered-terminal-drafts-storage.test.tsx
  • mobile/src/session/use-mobile-session-startup.ts
  • mobile/src/session/mobile-dictation-mode-refresh.test.tsx
  • mobile/src/test-support/rpc-recording/adapters/session-terminal-input-mount-adapters.ts
  • mobile/src/terminal/use-buffered-terminal-drafts.ts
  • mobile/src/terminal/buffered-terminal-draft-restoration.ts
  • mobile/src/session/mobile-closed-tab-queued-edit-lifetime.test.tsx
  • mobile/src/session/MobileTerminalCommandDictationPreview.tsx
  • mobile/src/session/mobile-session-preference-startup.test.ts
  • mobile/src/session/use-mobile-session-close-actions.test.tsx
  • mobile/src/session/TerminalArrowPad.tsx
  • mobile/rpc-foundation/pilot-scenarios.json
  • mobile/src/terminal/terminal-live-input.ts
  • mobile/src/terminal/terminal-keyboard-dismiss.ts
  • mobile/src/storage/preferences.ts
  • mobile/src/terminal/use-stored-buffered-terminal-drafts.ts
  • mobile/src/terminal/terminal-live-dictation-routing.ts
  • mobile/src/session/use-mobile-session-terminal-send-actions.ts
Files not fully reviewed because their changes were unavailable: 1
  • mobile/rpc-foundation/goldens/matrix-session.startup-worktree.activate-1.json

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

Comment on lines +186 to +187
// A web <button> clicks on Enter keydown as well, which would send a held key twice.
accessibilityRole={key.repeatable ? undefined : 'button'}

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.

Minor · Functional Correctness · Quick win

Limit the accessibilityRole omission to web.

The code sets accessibilityRole to undefined for every repeatable key on all platforms. The comment says the cause is a web <button> that clicks on Enter keydown. That behavior exists only on React Native Web.

On iOS and Android, VoiceOver and TalkBack no longer announce Backspace, Delete, and the arrow keys as buttons. These keys are used often. Keep 'button' on native platforms and omit it only on web.

♿ Proposed fix
-import { View, Text, ScrollView, Pressable } from 'react-native'
+import { View, Text, ScrollView, Pressable, Platform } from 'react-native'
...
-            accessibilityRole={key.repeatable ? undefined : 'button'}
+            accessibilityRole={key.repeatable && Platform.OS === 'web' ? undefined : 'button'}

Every terminal tab, shell or agent, gets the dock from before #36166:
the scrolling key row (desktop width, Paste, the built-in keys, custom
keys, add) above one live field that types straight into the terminal,
with the attach and mic buttons beside it. The field keeps today's 3:1
outline and focus ring, and the keys use today's chips and press styles.

The Keys/Message toggle, the Message composer, the arrow pad, the ⋯
sheet on the row and the per-terminal mode preference go. A stored mode
from an older build is never read. Sticky ctrl/alt/shift and the More
keys sheet stay only behind the iPhone Duo rail, which shipped shells
still draw; the page reports no composer, so shipped shells grey their
input-mode key and newer shells hide it.
With one live input there is no way to write a terminal line first and
send it, so the per-terminal drafts and their storage, the Send path,
command-field dictation, draft restoration and the terminal setting for
autocomplete and autocorrect (which only applied to that line) go.
Dictation in a terminal always types into it live. Drafts and the setting
saved by older builds are never read.
@AmoabaKelvin
AmoabaKelvin merged commit 8a4dd3a into main Nov 4, 2026
45 checks passed
AmoabaKelvin added a commit that referenced this pull request Nov 4, 2026
Chat drafts and their skill picks lived only in the page document's
memory, so killing the app or an OTA reload lost them. Each
workspace's tab drafts are now saved in the page storage slot shells
since 0.0.59 already allow (left unused by #37900). A clear saves at
once so a sent draft never returns, and tabs the host stops listing
or the phone closes are dropped from storage. A restored draft that
leads with a skill loads the skill catalog so its chip shows again.
AmoabaKelvin added a commit that referenced this pull request Nov 4, 2026
Chat drafts and their skill picks lived only in the page document's
memory, so killing the app or an OTA reload lost them. Each
workspace's tab drafts are now saved in the page storage slot shells
since 0.0.59 already allow (left unused by #37900). A clear saves at
once so a sent draft never returns, and tabs the host stops listing
or the phone closes are dropped from storage. A restored draft that
leads with a skill loads the skill catalog so its chip shows again.
AmoabaKelvin added a commit that referenced this pull request Nov 5, 2026
…estart (#38268)

* feat(mobile): keep unsent chat drafts across an app reload

Chat drafts and their skill picks lived only in the page document's
memory, so killing the app or an OTA reload lost them. Each
workspace's tab drafts are now saved in the page storage slot shells
since 0.0.59 already allow (left unused by #37900). A clear saves at
once so a sent draft never returns, and tabs the host stops listing
or the phone closes are dropped from storage. A restored draft that
leads with a skill loads the skill catalog so its chip shows again.

* fix(mobile): let a pre-load send win and keep skill scan retries

A send or clear made before a workspace's saved drafts finished
loading no longer gets overwritten by the saved text. A page whose
shell refuses the key stops re-reading it, a dropped write is retried
on the next save, and a failed skill scan is still retried the next
time the menu opens.

* fix(mobile): save pending chat typing when the app goes to the background

A write that fails partway no longer leaves a remembered value that
makes the next clear look already saved, and typing still inside the
250 ms window saves when the page is hidden.

* refactor(mobile): simplify chat draft persistence

Read the saved value back once per write through persistMirroredReadBack,
build the key with the allowlist's own workspaceScopedKey, keep tab-scope
parsing in one place, track the load as one state, stop holding
retirements once the load lands, and skip the per-draft size loop when
the whole value fits. Drops the test-only settle export.
@gsxdsm

gsxdsm commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

I really hate this change

gsxdsm added a commit to gsxdsm/orca-stably that referenced this pull request Nov 8, 2026
Every terminal tab gets the Keys/Message key at the start of the key row
again, and the iPhone Duo rail shows its input-mode key enabled. Keys is
the default and keeps the live field from stablyai#37900. Message mode shows a
multi-line composer whose Send writes the text plus Enter to the
terminal; dictation fills it, and attach and mic stay in both modes.
Each terminal's mode is remembered per workspace under the allowlisted
orca:terminalLiveInputDisabled: key. Drafts are kept per terminal in
memory.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants