[Bug]: Mobile iOS terminal has no long-press Paste, and ⌘V joins multi-line text into one line#25618

opened2d agobyWwhoisaldo

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. On iOS, open a thread's terminal page.
  2. Copy two lines of text, for example echo one and echo two on separate lines.
  3. Long-press the terminal for one to two seconds.
  4. With a hardware keyboard attached, press ⌘V.
  5. Press Return.

Expected behavior

Long-press shows an edit menu with Paste. Paste and ⌘V both send the text the way the toolbar paste button does: echo one runs and echo two waits at the prompt.

Actual behavior

  • Long-press shows no menu. The terminal has no edit menu at all, so there is no Paste on long-press on iPhone or iPad. #24694 reports that the toolbar paste button sits off-screen on phones. The toolbar was unavailable during this simulator reproduction.
  • ⌘V goes through the terminal's hidden single-line text field, so the clipboard arrives as typed text. The newline becomes a space: the prompt shows echo one echo two on one line, nothing runs, and Return runs a single echo that prints one echo two.
  • Because ⌘V arrives as typed input, it skips the paste path the toolbar button uses: control-byte stripping, newline encoding, and write chunking. In code, the iPad shortcut-bar Paste goes through the same text field.

A long-press on a thread row in the list does open its context menu, so the missing menu is specific to the terminal.

iPhone 17 Pro, after ⌘V (left) and after Return (right):

iPhone terminal: ⌘V shows "echo one echo two" on one line, and Return prints "one echo two"

Impact

Minor bug or occasional failure

Version or commit

main @ 374e57d90b

Environment

First noticed on an iPhone Duo; it is not specific to the Duo. Reproduced in the iOS Simulator (Xcode 27.1) with a dev client on main @ 374e57d90b. Long-press: iPhone 17 Pro and iPad mini (A17 Pro) on iOS 26.3. ⌘V: the same two plus iPhone Duo folded on iOS 27.1. Synthetic data and a $ shell prompt only.

Workaround

Show the software keyboard and scroll the terminal toolbar to its paste button.