Repository navigation
Open
Description
Written by Claude Code, an AI agent.
Summary
On iPhone 17 Pro, the native iOS terminal keeps its keyboard-sized viewport after the keyboard closes. Swipe scrolling then moves the content only in the upper part of the screen, the part the keyboard did not cover. The lower part stays empty. Query replies (OSC 11 background colour, cursor position report) also show up as typed text at the shell prompt after the querying program ended.
Area
apps/mobile (iOS terminal)
Actual behavior
- With the keyboard open, the terminal fills the space above the keyboard toolbar (expected).
- After the user closes the keyboard, the terminal output still ends at the old keyboard edge. The area below it stays blank.
- A swipe scrolls the output only inside the old, smaller area.
- After
gh api ...failed, the prompt line contains11;rgb:0a0a/0a0a/0a0a;1R11;rgb:0a0a/0a0a/0a0a;1R, and the output above it shows^[]11;rgb:0a0a/0a0a/0a0a^[\^[[14;1R. These are the terminal's replies to anOSC 11query and aCSI 6 ncursor position query, written to the PTY a second time or after the program stopped reading.
Screenshots: see the comment below (keyboard open, keyboard closed, after a later command).
Steps to reproduce
- Open a terminal in the T3 Code iOS app on iPhone 17 Pro (connected to a Linux host, server t3 v0.1.10).
- Run a command that queries the terminal, for example any
ghcommand (termenv queriesOSC 11and the cursor position). - Close the keyboard with the toolbar's keyboard button.
- Swipe to scroll the terminal output.
Expected behavior
- After the keyboard closes, the terminal resizes to the full height and scrolling uses the whole area.
- A terminal query gets one reply, sent once. No reply reaches the shell as input after the program ended.
Additional context
- Related: [Bug]: iOS terminal font and theme changes resend old query replies to the PTY #36000 (replies replayed to the PTY on font or theme change, fixed by fix(mobile): iOS terminal font and theme changes no longer replay output #36115). Opening or closing the keyboard does not add new replies at the prompt, so the late replies are probably a separate fault from the viewport size.
- Seen on a physical iPhone 17 Pro. Not reproduced on a simulator. iOS version and app build were not recorded.
- Screenshots exist but could not be attached from the CLI; the reporter can add them in a comment.
Metadata
Metadata
Assignees
Labels
No labels
Activity
MegaWattCZE commentedon Nov 21, 2026
shivamhwp commentedon Nov 21, 2026
Thanks for the report and screenshots. We tried to reproduce the viewport part on an iOS simulator at
c5514042, with the keyboard closed and one swipe after it. With only the simulator attached, the terminal filled the full height and scrolled normally. So the bug seems to need something that the simulator run didn't have. Could you check these, so we can pin it down:11;rgb…1R) still appear when no other client is attached?Please reply here with what you see. We'll pick it back up from there.
gemron commentedon Nov 30, 2026
One way to separate the two symptoms: on a physical iPhone, record the native view height, Ghostty rows/cols, and each PTY resize request while dismissing the keyboard. Run it once with only the phone attached and again with the same terminal open on desktop. Start with plain numbered output so the test does not send any terminal queries.
If the view grows but the row count stays at the keyboard-open value, the resize is getting lost between layout and the grid. If the row count grows and then flips back only with the desktop attached, check which client sent that last resize. As a separate assertion, the same surface should grow without replaying retained output, as in #36115 for config changes.
I maintain Termexo. In our browser-based terminal, excluding height-only keyboard changes from the replay path fixed a similar redraw symptom. The native iOS debug trace above would help establish whether the viewport issue here has the same cause.