Improve mobile terminal input, selection, and resizing (#1607)

* Improve mobile terminal typing and selection

* Address mobile terminal review feedback

* Remove dead native terminal input branch

* Replay bracketed paste in terminal preamble

* Stop per-key terminal resize claims

* Stabilize terminal resize browser test

* Use tracked terminal mode for native paste

* Restore terminal toolbar focus handling

* Adapt native terminal to active visibility state

* Stabilize native mobile terminal interactions

* Add native terminal fallback boundary

* test(app): expect explicit terminal resize reclaim

* fix(app): stabilize terminal buffer coordinates

* fix(app): restrict terminal resize ownership

* fix(terminal): gate restored input modes

* fix(app): recover stalled terminal WebViews

* chore(app): remove obsolete terminal harnesses

* fix(app): make terminal resize claims explicit

* test(app): stabilize native terminal device flows

* test(app): track absolute scrollback coordinates

* fix(app): isolate terminal WebView streams

* fix(terminal): arbitrate size ownership across clients

The daemon now distinguishes explicit ownership claims from passive geometry updates. This keeps the active client authoritative while allowing its split, viewport, and keyboard changes to resize the PTY without idle clients stealing it.

* test(server): make worker resize assertion portable

Query the worker's authoritative terminal snapshot instead of invoking a Unix-only shell command, so the resize regression exercises the same boundary on Windows and Unix.
This commit is contained in:
Mohamed Boudra
2026-08-03 19:01:34 +08:00
committed by GitHub
parent 2948a435ed
commit 04fe30a3e2
119 changed files with 9843 additions and 1032 deletions
@@ -0,0 +1,14 @@
context platform=android timeout=90000 retries=1
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"workspace-header-menu-trigger\"" 45000
press "id=\"workspace-header-menu-trigger\""
wait "role=\"button\" label=\"New terminal\"" 10000
press "role=\"button\" label=\"New terminal\""
wait "id=\"terminal-keyboard-toggle\"" 10000
press "id=\"terminal-keyboard-toggle\""
type "echo __AD_OUTPUT_OK__" --delay-ms 0
press "id=\"terminal-key-enter\""
wait "text" "__AD_OUTPUT_OK__" 10000
close
@@ -0,0 +1,13 @@
context platform=ios timeout=60000 retries=1
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"workspace-header-menu-trigger\"" 20000
press "id=\"workspace-header-menu-trigger\""
press "id=\"workspace-header-new-terminal\""
wait "id=\"terminal-keyboard-toggle\"" 10000
press "id=\"terminal-keyboard-toggle\""
type "printf '__AD_%s__\\n' OUTPUT_OK" --delay-ms 0
press "id=\"terminal-key-enter\""
wait "text" "__AD_OUTPUT_OK__" 10000
close
@@ -0,0 +1,10 @@
context platform=ios timeout=90000 retries=0
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"terminal-surface\"" 30000
press "id=\"terminal-surface\""
type "echo __AD_IOS_HARDWARE_OK__" --delay-ms 0
press "id=\"terminal-key-enter\""
wait "text" "__AD_IOS_HARDWARE_OK__" 10000
close
@@ -0,0 +1,19 @@
context platform=ios timeout=60000 retries=1
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"workspace-header-menu-trigger\"" 20000
press "id=\"workspace-header-menu-trigger\""
press "id=\"workspace-header-new-terminal\""
wait "id=\"terminal-surface\"" 10000
press "id=\"terminal-surface\""
type "clear; yes SAME | head -41; echo AD_SCROLL_MARKER; yes SAME | head -38" --delay-ms 0
press "id=\"terminal-key-enter\""
wait "id=\"terminal-row-1\" label=\"AD_SCROLL_MARKER\"" 10000
gesture pan 200 380 0 28 600
wait "id=\"terminal-row-3\" label=\"AD_SCROLL_MARKER\"" 10000
gesture pan 200 380 0 28 600
wait "id=\"terminal-row-5\" label=\"AD_SCROLL_MARKER\"" 10000
gesture pan 200 380 0 28 600
wait "id=\"terminal-row-7\" label=\"AD_SCROLL_MARKER\"" 10000
close
@@ -0,0 +1,21 @@
context platform=android timeout=60000 retries=1
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"workspace-header-menu-trigger\"" 20000
press "id=\"workspace-header-menu-trigger\""
wait "role=\"button\" label=\"New terminal\"" 10000
press "role=\"button\" label=\"New terminal\""
wait "id=\"terminal-keyboard-toggle\"" 10000
press "id=\"terminal-keyboard-toggle\""
type "clear; printf ' PASEO_TARGET\\n'" --delay-ms 0
press "id=\"terminal-key-enter\""
wait "text" "PASEO_TARGET" 10000
longpress "label=\"PASEO_TARGET\"" 550
wait "id=\"terminal-copy\"" 10000
is visible "id=\"terminal-copy\""
gesture pan 532 346 400 0 700
is visible "id=\"terminal-copy\""
gesture pan 532 346 -400 0 700
is visible "id=\"terminal-copy\""
close
@@ -0,0 +1,20 @@
context platform=ios timeout=60000 retries=1
env APP_ID=sh.paseo.debug
open "${APP_ID}"
wait "id=\"workspace-header-menu-trigger\"" 20000
press "id=\"workspace-header-menu-trigger\""
press "id=\"workspace-header-new-terminal\""
wait "id=\"terminal-keyboard-toggle\"" 10000
press "id=\"terminal-keyboard-toggle\""
type "clear; printf ' PASEO_TARGET\\n'" --delay-ms 0
press "id=\"terminal-key-enter\""
wait "text" "PASEO_TARGET" 10000
longpress "label=\"PASEO_TARGET\"" 550
wait "id=\"terminal-copy\"" 10000
is visible "id=\"terminal-copy\""
gesture pan 198 167 170 0 700
is visible "id=\"terminal-copy\""
gesture pan 198 167 -170 0 700
is visible "id=\"terminal-copy\""
close