Repository navigation
Conversation
The iOS terminal had no edit menu, so on a phone the only paste was a toolbar button that scrolls off screen. Hardware ⌘V and the iPad shortcut bar pasted through the hidden text field as typed input, so a newline arrived as a space, control bytes were not stripped, and large pastes were not chunked. A long press on the terminal now shows the system edit menu with Paste when the clipboard has text. That action, ⌘V, and the shortcut bar read the clipboard natively and send it to JS, which writes it through the same paste session as the toolbar button.
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 33 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Native paste capture apps/mobile/modules/t3-terminal/ios/T3TerminalModule.swift, apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift |
The native terminal emits clipboard text for input-field paste and edit-menu Paste. A long press presents the menu when Paste is available. |
Paste event bridge apps/mobile/src/features/terminal/nativeTerminalModule.ts, apps/mobile/src/features/terminal/NativeTerminalSurface.tsx |
The native event carries a text payload. The terminal surface forwards it only when the terminal is running and writable. |
Existing paste flow integration apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx |
The route passes native paste text to the existing paste flow and clears any pending modifier. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- pingdotgg/t3code#25388: Updates the mobile terminal toolbar Paste action and the paste flow that this change uses.
Suggested reviewers: juliusmarminge, maria-rcks
Merge Risk: 
Minimal · previous review 0bfa7
-
No confirmed paste-path issue remains that would block merging. Long-press behavior with the input field unfocused remains worth checking on a device.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The description covers the problem, implementation, scope, linked issue, verification results, UI evidence, known limitation, and agent attribution. The "Fix" heading serves the template's "Change" section.
Full details: Linked Issues check
-
Explanation
Issue
#25618is directly linked and remains open. The iOS native view adds a long-press edit menu with only the Paste command when the terminal is writable andUIPasteboard.general.hasStringsis true.⌘V, the shortcut bar, and menu Paste route throughonPaste.ThreadTerminalRouteScreen.tsxsupplies the clipboard text to the existingpasteSession.pasteflow, which appliesencodeTerminalPasteandchunkTerminalWrite. This preserves multiline input and the toolbar paste behavior. Read-only terminals do not emit paste events. Android is not changed. The existing terminal test command is reported as passing, and the issue does not require new tests.
Full details: Out of Scope Changes check
-
Explanation
The changed Swift and TypeScript code supports the requested iOS terminal paste behavior. The
hardwareKeyRevisionincrement supports delivery of the native keyboard change. The event type and callback plumbing are required to send native paste text through the existing terminal paste session. No unrelated feature or Android implementation change is shown in the pull-request diff.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Note Written by thanks @whoisaldo. your implementation correctly keeps system paste separate from typed input and reuses the existing paste session. i updated this original branch, preserving your commit and implementation.
verification at unverified: fresh ios runtime behavior and before/after media. the native device tool returned "Agent device access is turned off for this environment." this linux vm has no uikit/xcode, and chrome cannot exercise the native terminal. the default dev server was started and stopped; its web client cannot prove this ios change. the original simulator evidence remains in the description as historical contributor evidence, not a reproduction of this head. before merge, an ios pass still needs long-press paste with the keyboard shown and dismissed, hardware command-v, the shortcut bar, and nearby scrolling/typing. the javascript tests simulate the native event and cannot prove uikit delivery. no task processes remain running. |
|
Thanks @maria-rcks for updating the branch and preserving my original commit!! :) Fresh native verification at
I also verified this on a physical device aswell! Tried to save u the trouble |
|
Note Written by Verified in a real dev environmentNo changed runtime behavior could be verified in this Linux Boat VM. This is an unverifiable verification pass, not a successful app verification. I read the description, discussion, commit authors, and complete six-file diff at Environment checks this pass: CI status is reported only as context. It does not prove UIKit behavior. No screenshots or recordings were captured because the affected client cannot run here. No code, branches, labels, or PR metadata were changed; no dev servers or provider turns were started. Not verifiedThe original bug on github/main and the fix on this exact head remain unverified by this pass. Chrome, including mobile viewport emulation, cannot instantiate the native iOS terminal. Starting main and PR web servers or sending Codex turns would not exercise the changed UIKit-to-mobile-client path, so I did not substitute those for the requested reproduction. A rebuilt iOS client (hardwareKeyRevision 4) connected to a real dev server is still required to independently check long-press Paste with the keyboard shown and dismissed, Command-V, iPad shortcut-bar Paste, multiline/control-byte encoding, large paste chunking and exactly-once delivery. Nearby typing, tap-to-focus, scrolling and scroll-position preservation, plus read-only/stopped terminal guards, also remain unverified here. Android native behavior, VoiceOver, and clipboard consent behavior were not exercised. The contributor reports native verification in the earlier discussion; that evidence was not reproduced in this pass. |
|
Note Written by Verified on Android emulator (API 35) against a real dev serverNo runtime verification performed. This heading records the requested verification target, not a passing result. At head The verification brief explicitly requires stopping for an iOS-only change. I therefore did not check out the branch, boot the emulator, install a client, start a dev server or Metro, send provider turns, or change code. No screenshots or recordings were captured. T3 device discovery reports Android available, but iOS unavailable: "iOS Simulators need macOS with Xcode." Reported CI status: 30 successful checks, 0 failing, 0 pending. This is context, not proof of native behavior. Not verifiediOS cannot run in this Linux VM. Long-press Paste with keyboard shown/dismissed, Command-V, iPad shortcut-bar Paste, multiline and large-paste delivery, read-only/stopped guards, and nearby typing/scrolling were not exercised by this pass. Android behavior and a main-versus-head runtime comparison were also not exercised under the explicit stop rule. The contributor's iOS evidence in the discussion was not independently reproduced. |
|
Closing in favour of #25828, which makes the same change. Thanks for the work here! |
Fixes #25618
Problem
The iOS terminal has no edit menu, so long-press offers no Paste. Hardware ⌘V and the iPad shortcut bar paste through the hidden text field as typed input. Newlines become spaces, and the text skips the paste encoding and write chunking that the toolbar
pastebutton uses.Fix
The toolbar layout is untouched. #25388 moves the toolbar
pastebutton for #24694; the two branches merge without conflicts. The native module'shardwareKeyRevisiongoes from 3 to 4, so the change needs a rebuilt iOS client.Android is unchanged. Long-press there selects a word and offers Copy and Select All.
Known limit: Paste appears whenever iOS reports text on the clipboard. An empty copied string still shows Paste, and choosing it does nothing. Checking for an empty string would require reading the clipboard on long-press, which may trigger the iOS paste-permission prompt.
Before and after
Long-press, iPhone 17 Pro. Left: main, no menu after a 2 s press. Middle: this branch, Paste. Right: after choosing Paste,
echo oneran andecho twowaits at the prompt.Long-press, iPad mini. Left: main. Right: this branch.
Hardware ⌘V, iPhone 17 Pro. Top row: main, after ⌘V and after Return. Bottom row: this branch, after ⌘V and after Return.
Recording of long-press, Paste and the result on iPhone (9 s): iphone-longpress-paste-flow.mp4
Verification
iOS Simulator with synthetic data. Clipboard set to
echo one, newline,echo two.echo one, leavesecho twoat the prompt, writes once, and shows no "Allow Paste" alert. iPhone 17 Pro and iPad mini, iOS 26.3.shasumof the input matched the host's. iPhone.terminal:readbut notterminal:operate, long-press shows no menu, and ⌘V and typing write nothing. iPhone.vp test run apps/mobile/src/features/terminalpasses (26 tests). No unit tests were added; the native paste behavior was checked in the simulator.Model: Claude Opus 5.5 via Claude Code, in T3 Code; reviewed by GPT-6.1-Sol (Codex).