Repository navigation
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This changes the default Android terminal path by adding keyboard-synchronized layout animation and deferring/collapsing shared PTY resize operations until the grid settles. The scope is focused and tested, but the cross-cutting production UI and terminal synchronization behavior warrants human review. You can add or adjust custom eligibility rules. Learn more. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note Written by thanks @only21mil for the keyboard-progress padding, mounted controls, measured footer, and settled resize implementation. i preserved your commits and updated this original branch by merging main moved terminal lifecycle into the session store and deleted verification on
unverified: current-head android ime animation, hardware-keyboard focus, gesture/three-button navigation, real pty resize counts through the native client, and ios interaction. device access is disabled in this environment and adb lists no devices. the original recordings remain historical evidence; no fresh before/after screenshots or video are claimed. chrome cannot establish native ime behavior. maintainer approval and native verification remain the handoff gates. |
|
Note Written by Verified in a real dev environmentnone of the changed behavior could be exercised on this linux boat vm. this is an unverifiable result, not a passing verification. i read the description, discussion, commit authors and three-file diff at the affected flow is the native android thread terminal: show the keyboard, let it settle, press back to hide it, and inspect viewport/accessory motion and real pty resize events. android opts into the 120 ms settled resize; web and other clients retain the immediate default. runtime availability transcript: Not verifiedbaseline reproduction on github/main, current-head android keyboard animation, settled pty resize counts, gesture and three-button navigation, repeated show/hide, hardware-keyboard focus, rotation, permission changes and attachment/generation behavior remain unverified. ios also remains unverified. the repository's test-t3-mobile skill requires stopping verification when device tools or the selected device are unavailable. no alternate device automation was installed. no dev server, worktree installation or provider turn was started after this blocker; a chrome browser and a codex turn cannot exercise the native android ime path. no fresh screenshots or video were captured, and historical contributor media is not claimed as evidence for this run. no code, branches, labels or pr description were changed. verification needs enabled android device access and a native development client, followed by matching main/head runs through the actual terminal. |
|
Note Written by Verified on Android emulator (API 35) against a real dev serververified head repeated keyboard show/back-dismiss twice in each navigation mode. a real terminal process recorded exactly one SIGWINCH per transition: gesture navigation changed between 64×47 and 64×26; three-button navigation changed between 64×46 and 64×26. no intermediate grid resize occurred. the settled last row and right edge remained visible, and the accessory followed the keyboard. transient terminal redraw/reflow remains visible during resizing. neighboring checks passed: ctrl-c stopped the terminal probe, a subsequent shell command executed, the keyboard accessory hide control restored the footer, and attach output opened the terminal-output selection sheet. no code changes were needed. existing CI reports 29 successful checks, zero pending and zero failing; checks were not rerun. these screenshots show this head before and after opening the keyboard, not a main/head comparison. Not verifiedios cannot run on this linux vm. the original problem was not reproduced on |
|
Note Written by merged the single conflict combined main's terminal menu simplification with the existing keyboard animation. main's native grid prop remains intact. scope remains three files, 141 additions and 29 deletions. two independent code reviewers approved this head with no concrete findings. blacksmith unverified: native android runtime behavior on this merged head. device access is disabled and adb lists no devices; chrome cannot exercise native IME behavior. prior-head android evidence remains historical. macroscope's human-approval requirement still applies. no labels changed and no merge performed. |
The terminal screen now reads keyboard showing from main's terminalKeyboardShowing module, which hides the accessory on keyboardWillHide on every platform. The Android-only switch to keyboardDidHide is dropped: on Android the accessory and viewport follow the keyboard's animation progress, and main's module needs didHide to leave the accessory alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note 🤖 Opus 5.5 replying on behalf of Victor. Merged main ( One part of this PR is dropped because main now covers it. The terminal screen reads keyboard showing from main's Checked again on an Android 16 emulator (Pixel Fold AVD, software rendering, gesture navigation). A probe in the terminal logs every PTY resize, over two keyboard show and Back-dismiss cycles per build:
A Pixel 10 AVD run of main showed the same pattern (27 → 30 → 48 rows on each hide).
Before (main), Fold AVD: After (this head), Fold AVD: |
|
The automated pipeline stopped on this pull request and will not merge it: in the real app the problem is still there, and the rework changed nothing: Not fixed this round; nothing was pushed and the head is unchanged. The proof report says the problem still happens on the head but does not say what it observed. I set up an isolated server, a replay thread, a SIGWINCH probe in the terminal and a pooled Pixel 9 (API 36, Gboard). By mistake, Metro was started from the main checkout instead of the PR worktree, so every measurement ran main's mobile code, not this PR. That is also why temporary instrumentation and a resizeSettleDelayMs: 0 edit never took effect. What I measured matches the PR author's main baseline and confirms the reported bug on main: show sends one PTY resize (64x50 to 64x29), while every hide sends two (64x29 to 64x32, then 64x50 about 0.45 to 0.65 s later). The 3-row step matches the 52 dp accessory leaving before the keyboard closes. The device pool's worker then kept disconnecting from the gateway, including on a second, fresh lease, so I could not re-run against the PR head within the budget. Reading the PR code found nothing that explains a split resize: the native view emits a resize only on layout change, and the animated padding formula cannot lose just the accessory term while the keyboard is still fully open. So I made no code change without a measurement. Next round: start the server and Metro as separate commands using the worktree's absolute path, confirm the process on port 8081 has its cwd in the worktree, then count SIGWINCH per hide on the PR head. For per-frame grids, temporarily set resizeSettleDelayMs to 0 and send probe data with fetch to an HTTP listener on the VM, because app console output does not reach Metro. It stays open for a person to finish or close. |
|
Note 🤖 Opus 5.5 replying on behalf of Victor. @juliusmarminge The run in this stop measured main's mobile code, as the note says, so its two resizes per hide are main's bug; my main baseline on the same emulator shows the same pattern (24 → 28 → 43 rows on each hide). On this PR's code at On the head |
|
Note 🤖 Claude Opus 5.5 responding on behalf of Theo Closing. This PR has been open for more than 3 weeks, and |


Problem
On Android, the native terminal jumps to the keyboard's final height at the start of the IME animation. On hide, the accessory disappears before the viewport returns to its closed size, causing an intermediate PTY resize.
Change
Animate the Android terminal viewport and bottom controls from keyboard height and progress. Keep the accessory mounted through hide, measure the idle footer to preserve the closed grid, and send the PTY resize after the measured grid has been stable for 120 ms. Cancel stale resize targets and recheck permission before dispatch.
Scope
Bug fix for an Android layout bug. Fixes #14464. juliusmarminge's triage comment approves the fix direction: animate the terminal viewport with the keyboard inset and defer PTY resizing until the animation settles.
Verification
Revisions: main
7462f234e8, this head066737c6cd, and the head merged locally with that main,caeeaf15c6(not pushed). A probe terminal logs each SIGWINCH; three keyboard show and hide cycles per run.Android (Pixel 10 emulator, Android 16, Gboard, software rendering): main sends one resize per show and two per hide (27, 30, 48 rows with gesture navigation; 27, 30, 46 with three-button); head and merged send one per show and one per hide (27, 48 or 27, 46 rows). In the first merged run, right after install, the first two shows each sent one extra resize (36 and 39 rows before 27); a repeat run of five cycles and a run after a cold relaunch sent one per transition.
iOS (iPhone 17 Pro simulator, iOS 26.5): main, head and merged behave the same, one resize per show (19 rows) and two per hide (22, then 37 rows). This PR leaves iOS unchanged; iOS still passes through the intermediate grid on hide.
The two session-store tests in
packages/client-runtime/src/state/terminal.test.tsfail on main's session store (2 failed, 12 passed) and pass on the head and on the merged tree (14 passed).Android, main 7462f23, gesture navigation: recording frame during a hide; the probe shows an intermediate 30-row grid and the footer is not drawn
Android, head 066737c, gesture navigation: recording frame during a hide; the grid stays at 27 rows and the footer is drawn
Not checked: interactive swipe dismiss, rotation, a second client on the same PTY, physical devices, other IMEs, Android with host-GPU rendering, and the web terminal (its session store keeps the immediate default).
Method, probe logs and more stills
The first merged run's extra resizes came right after the client was installed and the bundle first loaded.
Revisions were run in this order: main
7462f234e8(newest main with a green push CI run), head, merged. This is a TypeScript-only change to Android terminal layout and its grid-sync scheduling. Verification reused the existing native development client.Method: one T3 test server from main (the change is client-only), a synthetic project, and a terminal shell that is a probe drawing the PTY grid and logging each SIGWINCH. Each revision ran its own Metro and the dev client for its own native fingerprint;
resizeSettleDelayMsoccurs 0 times in main's served bundle and 3 times in head's and merged's. Input through the T3 Device panel: tap Show keyboard, wait 4 s, then the system Back button (Android) or the accessory's Dismiss keyboard button (iOS), three cycles per run. Android ran software rendering (SwiftShader) with gesture and three-button navigation.Main
7462f234e8, gesture navigation, probe log:Head
066737c6cd, gesture navigation:Main
7462f234e8, three-button navigation:Head
066737c6cd, three-button navigation:Merged
caeeaf15c6, gesture navigation, first run:Merged
caeeaf15c6, gesture navigation, repeat run:Merged
caeeaf15c6, three-button navigation:iOS main
7462f234e8:iOS head
066737c6cd:iOS merged
caeeaf15c6:Android, main 7462f23, three-button navigation, closed: probe history 27, 30, 46 rows per cycle
Android, head 066737c, three-button navigation, closed: probe history 27, 46 rows per cycle
Android, merged caeeaf15c6, three-button navigation, closed: probe history 27, 46 rows per cycle
iOS, main 7462f23, closed: probe history 19, 22, 37 rows per cycle
iOS, head 066737c, closed: probe history 19, 22, 37 rows per cycle
Recordings
7462f234e8066737c6cdcaeeaf15c6Generated with GPT-6.1 Sol in T3 Code Nightly
Fixes #14464