You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Holding the on-screen delete key in the iOS terminal deleted only what had been typed since the last space and then stopped, so the rest of a line had to be deleted one tap at a time. The hidden input field now always starts with an invisible character, so the keyboard keeps repeating the delete.
resetInputField fills the field with a zero-width space (U+200B) instead of leaving it empty. While delete is held, the keyboard keeps repeating only while there is text before the caret, and now there always is.
Deleting that character sends one DEL to the terminal through the existing text diff in handleInputEditingChanged, and the field then puts it back.
textFieldDidChangeSelection keeps the caret from moving in front of the zero-width space, for example with the space-bar trackpad. Otherwise the next keystroke would erase a real character and send U+200B to the shell.
TerminalInputField.deleteBackward does nothing when the caret is just after the zero-width space and typed text follows it. This is the same as the empty-prefix case before this change; deleting the zero-width space there would erase the character in front of that text.
Commit 19da14d (origin/main). Started an isolated backend (T3CODE_DEV_SEED=0 vp run dev:server -- --host 0.0.0.0, fresh database), ran Metro (apps/mobile vp run dev:client), leased an iPhone 18 Pro simulator (iOS 27.2) from the device pool, installed the dev client with vp run mobile:install ios and paired it with the backend. Opened the thread, tapped Terminal, chose 'Open new terminal', and the on-screen keyboard appeared. Typed echo alpha bravo charlie, then long-pressed the keyboard's delete key for 4000 ms. Only charlie was deleted and deletion stopped at the space, leaving echo alpha bravo . Long-pressed delete again for 4000 ms: exactly one character (the space) was deleted, leaving echo alpha bravo. So holding delete repeats only through the characters typed since the last space, and after that each hold deletes a single character.
Evidence
On both commits: iPhone 18 Pro simulator, iOS 27.2, native T3 Code Dev client, Metro, light theme, 402 × 874 logical viewport. Each backend used a fresh database with a synthetic Demo project and Replay thread. The matching native client was installed for each commit.
Open the thread's new terminal, set a neutral $ prompt and clear the screen, type echo alpha bravo charlie without submitting it, then hold the on-screen delete key for 4,000 ms twice, with a one-second pause between holds. The same uploaded driver performed both runs.
First hold stops at the space after bravo; second hold deletes only that space.
First hold continues across spaces and clears the entire command; second hold leaves it empty.
Interaction driver. Both recordings were inspected using sampled frame sheets; final stills were checked against a second identical screenshot.
Not shown:
IME composition and spacebar-trackpad selection safeguards were not exercised; this comparison follows the reported held-delete reproduction.
Tests
PR CI on f7cb9ba: all checks pass, including Mobile Native Static Analysis (swiftlint lint --config .swiftlint.yml --strict) and Check; Macroscope Approvability and Correctness pass
vp run check:changed (on 7e6c29d, whose code differs only in where one brace sits): pass (format, and typecheck for 2 packages)
vp run mobile:install ios --prepare (on 7e6c29d): the iOS dev client built, so the Swift compiles
iPhone 18 Pro (iOS 27.2) from the device pool, with an isolated backend (T3CODE_DEV_SEED=0) and Metro: one 4s hold of delete removed all of echo alpha bravo charlie, then echo ok | od -c printed o k \n (no U+200B)
Before the change, on main's client, on the same device model: a 4s hold deleted only charlie, and a second hold only the space
No unit test: the behaviour is UIKit's keyboard repeat and caret handling, which unit tests cannot reach
Not in this change
Not checked on device: IME composition (Korean/Japanese) and hardware-keyboard backspace; both use the same diff path.
Not shown on device: a real space-bar trackpad drag, and Backspace with the caret moved before retained text; the simulator gesture tool cannot script the trackpad, so both rest on reading the code.
Who did the work
Written by Claude Opus 5.5, in Claude Code
Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5
…rases a character
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actionsBot
added
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
📱 Native Change
Changes the native fingerprint; merging blocks production OTAs until a new store build ships.
size:M
30-99 changed lines (additions + deletions).
labels
Dec 1, 2026
Macroscope's review found this PR approvable — The change keeps held Delete working in the iOS terminal using an invisible input sentinel, with guards around cursor movement and composition. Its scope is limited to existing keyboard-input handling, with no material risk requiring human judgment.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
The iOS terminal input field now uses an invisible sentinel at the start of its text. Selection handling and Backspace behavior account for the sentinel. Input resets and truncation preserve it.
Changes: Terminal input
Layer / File(s)
Summary
Sentinel-based input and deletion apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift
The input field initializes and maintains a sentinel through resets and truncation. Selection changes move a selection that starts before the sentinel to its far side. Backspace returns without deleting when the caret is immediately after the sentinel and committed text remains after it.
This change makes holding backspace in the iOS terminal keep deleting. No concrete defect was found in review. IME composition, hardware-keyboard backspace and trackpad caret movement were not checked on device, so a quick manual check of those is worthwhile before release.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the fix and the affected area: holding delete in the iOS terminal keeps deleting. It matches the main change, which makes the hidden input field's sentinel let the keyboard repeat dele…
Linked Issues check
[#46869] The issue requires that holding the on-screen backspace key in the iOS terminal repeats deletion. The whole-PR diff (merge base 19da14d to head f7cb9ba) changes only apps/mobile/modules/…
Out of Scope Changes check
The whole-PR diff touches only apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift, inside the apps/mobile area named by #46869. Each hunk supports the held-backspace objective: - `deleteBack…
Description check
The description follows the template closely. It has a clear Problem (held delete in the iOS terminal stops at the last space), a Change section that explains the zero-width space sentinel, caret hand…
Full details: Title check
Explanation
The title names the fix and the affected area: holding delete in the iOS terminal keeps deleting. It matches the main change, which makes the hidden input field's sentinel let the keyboard repeat delete. The title follows the conventional commit format and is 62 characters long.
Full details: Linked Issues check
Explanation
[#46869] The issue requires that holding the on-screen backspace key in the iOS terminal repeats deletion. The whole-PR diff (merge base 19da14d to head f7cb9ba) changes only apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift, and it implements the mechanism the issue needs:
inputSentinel (U+200B) is the field's initial and reset content (resetInputField sets inputField.text and sentInput to the sentinel). The keyboard keeps repeating a held delete while text precedes the caret, so the sentinel keeps repeat active.
Deleting the sentinel produces a text diff that handleInputEditingChanged turns into one DEL. The empty-text branch now calls resetInputField, so the sentinel returns.
textFieldDidChangeSelection moves a caret placed before the sentinel to after it, so a keystroke cannot delete the sentinel and send U+200B to the PTY.
TerminalInputField.deleteBackward returns early when the caret is just after the sentinel and typed text follows, so the character before that text is not erased.
The 64-character cap path prefixes the retained character with the sentinel.
I did not run the app. The on-device result (4s hold removed echo alpha bravo charlie) is author-reported, and the Evidence section is still marked as being captured. The author reports no automated test. The issue does not require one. IME composition, hardware-keyboard backspace, a real trackpad drag, and backspace with the caret before retained text are not shown on device. These are unverified edge cases, not failures of the issue's stated requirement.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff touches only apps/mobile/modules/t3-terminal/ios/T3TerminalView.swift, inside the apps/mobile area named by #46869. Each hunk supports the held-backspace objective:
deleteBackward guard: prevents sentinel deletion when retained text follows the caret.
inputSentinel declaration and comment: supplies the invisible character that keeps repeat active.
textFieldDidChangeSelection: keeps the caret after the sentinel.
resetInputField and the editing-change branch (text.isEmpty || ...): restore the sentinel after deletion.
The 64-character branch: keeps the sentinel when input is truncated.
No unrelated changes were found in the diff.
Full details: Description check
Explanation
The description follows the template closely. It has a clear Problem (held delete in the iOS terminal stops at the last space), a Change section that explains the zero-width space sentinel, caret handling, and the deleteBackward guard, and a Scope note that links issue #46869 as the bug report. Verification is thorough: before/after reproduction on main, screenshots and recordings, CI results, and an on-device check. It also lists what was not checked, and it names the models that did the work. The Scope section does not explain why the change is a bug fix rather than a feature, but the issue link makes that clear. The template's title guidance is not applicable here because this check covers the description only. Minor gaps: the title was not provided in the description, and the 'Change' section is brief about why the zero-width space is needed for the same fix across the components it touches. Overall the description is mostly complete.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
This change passed review and its checks are green, so it is ready to merge.
It is held for now because it changes the native app: merging it would block over-the-air updates until a new store build ships. It is labelled staged-for-store and will be merged when the next store release is prepared. Nothing is needed from you until then.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
📱 Native ChangeChanges the native fingerprint; merging blocks production OTAs until a new store build ships.size:M30-99 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Holding the on-screen delete key in the iOS terminal deleted only what had been typed since the last space and then stopped, so the rest of a line had to be deleted one tap at a time. The hidden input field now always starts with an invisible character, so the keyboard keeps repeating the delete.
resetInputFieldfills the field with a zero-width space (U+200B) instead of leaving it empty. While delete is held, the keyboard keeps repeating only while there is text before the caret, and now there always is.handleInputEditingChanged, and the field then puts it back.textFieldDidChangeSelectionkeeps the caret from moving in front of the zero-width space, for example with the space-bar trackpad. Otherwise the next keystroke would erase a real character and send U+200B to the shell.TerminalInputField.deleteBackwarddoes nothing when the caret is just after the zero-width space and typed text follows it. This is the same as the empty-prefix case before this change; deleting the zero-width space there would erase the character in front of that text.Fixes #46869
Reproduction on main
Commit 19da14d (origin/main). Started an isolated backend (T3CODE_DEV_SEED=0 vp run dev:server -- --host 0.0.0.0, fresh database), ran Metro (apps/mobile vp run dev:client), leased an iPhone 18 Pro simulator (iOS 27.2) from the device pool, installed the dev client with vp run mobile:install ios and paired it with the backend. Opened the thread, tapped Terminal, chose 'Open new terminal', and the on-screen keyboard appeared. Typed
echo alpha bravo charlie, then long-pressed the keyboard's delete key for 4000 ms. Onlycharliewas deleted and deletion stopped at the space, leavingecho alpha bravo. Long-pressed delete again for 4000 ms: exactly one character (the space) was deleted, leavingecho alpha bravo. So holding delete repeats only through the characters typed since the last space, and after that each hold deletes a single character.Evidence
On both commits: iPhone 18 Pro simulator, iOS 27.2, native T3 Code Dev client, Metro, light theme, 402 × 874 logical viewport. Each backend used a fresh database with a synthetic Demo project and Replay thread. The matching native client was installed for each commit.
Open the thread's new terminal, set a neutral
$prompt and clear the screen, typeecho alpha bravo charliewithout submitting it, then hold the on-screen delete key for 4,000 ms twice, with a one-second pause between holds. The same uploaded driver performed both runs.bravo; second hold deletes only that space.Interaction driver. Both recordings were inspected using sampled frame sheets; final stills were checked against a second identical screenshot.
Not shown:
Tests
Mobile Native Static Analysis(swiftlint lint --config .swiftlint.yml --strict) andCheck; Macroscope Approvability and Correctness passvp run check:changed(on 7e6c29d, whose code differs only in where one brace sits): pass (format, and typecheck for 2 packages)vp run mobile:install ios --prepare(on 7e6c29d): the iOS dev client built, so the Swift compilesT3CODE_DEV_SEED=0) and Metro: one 4s hold of delete removed all ofecho alpha bravo charlie, thenecho ok | od -cprintedo k \n(no U+200B)charlie, and a second hold only the spaceNot in this change
Who did the work
Run by the t3code factory in T3 Code.