orca/mobile/src/terminal
Brennan Benson 658532a1b0
Stop the mobile app from running hot during terminal streaming (#9489)
A busy PTY delivers up to ~200 terminal frames/s to the phone (the desktop
coalesces output at a 5ms window), and each frame paid a full RN-bridge +
WebView postMessage + WebKit IPC + xterm write + paint pipeline. Coalesce
stream writes in the RN layer: leading-edge immediate delivery keeps
keystroke echo instant, and sustained streams batch into at most ~21
WebView messages/s (48ms trailing window).

Measured (iOS Simulator A/B at ~200 lines/s, only this file flipped):
terminal WebContent CPU 8.0% -> 2.8%, app process 19.3% -> 15.2%,
combined continuous CPU -34%.

Ordering boundaries preserve today's semantics: resize/reflow flush
pending bytes first; init/clear drop superseded pre-snapshot bytes;
reload/content-process-termination/unmount clear the buffer. The
notification-dispatch extraction from TerminalWebView is a verbatim move
forced by the max-lines cap.
2026-07-20 14:45:58 -07:00
..
TerminalWebView.tsx Stop the mobile app from running hot during terminal streaming (#9489) 2026-07-20 14:45:58 -07:00
mobile-terminal-query-reply.test.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
mobile-terminal-query-reply.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
quick-commands.test.ts feat(mobile): Quick Commands (terminal + agent-prompt presets) (#9298) 2026-07-19 23:42:31 -07:00
quick-commands.ts feat(mobile): Quick Commands (terminal + agent-prompt presets) (#9298) 2026-07-19 23:42:31 -07:00
terminal-accessory-keys.test.ts
terminal-accessory-keys.ts
terminal-accessory-layout.test.ts
terminal-accessory-layout.ts
terminal-auto-restore-fit-state.test.ts
terminal-auto-restore-fit-state.ts
terminal-file-url-tap.ts
terminal-foreground-recovery.test.ts Fix stale terminal panes after backgrounding by retrying deferred foreground recovery (#8198) 2026-07-11 16:20:28 -07:00
terminal-foreground-recovery.ts Fix stale terminal panes after backgrounding by retrying deferred foreground recovery (#8198) 2026-07-11 16:20:28 -07:00
terminal-gesture-input.test.ts
terminal-gesture-input.ts
terminal-ios-dictation-write-back.test.ts Fix iOS native keyboard dictation in mobile terminal inputs (#7933) 2026-07-09 05:02:39 -07:00
terminal-ios-ime-keyboard.test.ts
terminal-keyboard-dismiss.test.ts
terminal-keyboard-dismiss.ts
terminal-keyboard-type.test.ts
terminal-keyboard-type.ts
terminal-live-accessory-input.ts
terminal-live-accessory-raw-send-target.test.ts
terminal-live-accessory-raw-send-target.ts
terminal-live-control-send-order.test.ts
terminal-live-control-send-order.ts
terminal-live-dictation-routing.test.ts
terminal-live-dictation-routing.ts
terminal-live-hangul-mirror.test.ts
terminal-live-hangul-mirror.ts
terminal-live-input-affordance.test.ts
terminal-live-input-sender.ts
terminal-live-input.test.ts
terminal-live-input.ts
terminal-live-pending-flush-state.test.ts
terminal-live-pending-flush-state.ts
terminal-live-text-commit.test.ts
terminal-live-text-commit.ts
terminal-osc-link-ranges.ts
terminal-path-tap-injected.ts
terminal-path-tap.test.ts
terminal-path-tap.ts
terminal-send-rpc-response.test.ts
terminal-send-rpc-response.ts
terminal-text-input-normalization.test.ts fix(mobile): drop smart-dash write-back recovery that kills iOS dictation (#8008) 2026-07-09 20:38:17 -07:00
terminal-text-input-normalization.ts fix(mobile): drop smart-dash write-back recovery that kills iOS dictation (#8008) 2026-07-09 20:38:17 -07:00
terminal-viewport-refit-state.ts fix(mobile): harden terminal height refit (follow-up to #8647) (#8707) 2026-07-14 02:52:50 -07:00
terminal-viewport-refit.test.ts fix(mobile): harden terminal height refit (follow-up to #8647) (#8707) 2026-07-14 02:52:50 -07:00
terminal-viewport-refit.ts refactor(comments): slim verbose comments in mobile (#9547) 2026-07-20 03:18:35 -07:00
terminal-webview-contract.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
terminal-webview-engine-error-state.tsx
terminal-webview-engine-error.test.ts fix(mobile): recover terminal WebView/WebGL/viewport/theme state after iOS resume (#8196) 2026-07-10 20:22:16 -07:00
terminal-webview-engine.test.ts fix(mobile): recover terminal WebView/WebGL/viewport/theme state after iOS resume (#8196) 2026-07-10 20:22:16 -07:00
terminal-webview-frame-styles.ts
terminal-webview-html.ts refactor(comments): slim verbose comments in mobile (#9547) 2026-07-20 03:18:35 -07:00
terminal-webview-init-surface.test.ts Fix restored mobile terminals and workspace visibility parity (#8789) 2026-07-14 19:36:47 -07:00
terminal-webview-messages.ts fix(mobile): recover terminal WebView/WebGL/viewport/theme state after iOS resume (#8196) 2026-07-10 20:22:16 -07:00
terminal-webview-notification-dispatch.ts Stop the mobile app from running hot during terminal streaming (#9489) 2026-07-20 14:45:58 -07:00
terminal-webview-pending-messages.ts
terminal-webview-query-reply-injected.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
terminal-webview-query-reply-routing.test.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
terminal-webview-query-reply-routing.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
terminal-webview-query-reply.test.ts Fix mobile terminal query reply authority (#8227) 2026-07-11 02:13:15 -07:00
terminal-webview-ready-watchdog.ts
terminal-webview-reflow-injected.ts
terminal-webview-reflow.test.ts
terminal-webview-scroll-routing.test.ts
terminal-webview-surface-swap-injected.ts Fix restored mobile terminals and workspace visibility parity (#8789) 2026-07-14 19:36:47 -07:00
terminal-webview-tap-dispatch-injected.ts
terminal-webview-tap-routing.test.ts
terminal-webview-text-zoom.test.ts fix(mobile): recover terminal WebView/WebGL/viewport/theme state after iOS resume (#8196) 2026-07-10 20:22:16 -07:00
terminal-webview-theme-injected.ts fix(mobile): recover terminal WebView/WebGL/viewport/theme state after iOS resume (#8196) 2026-07-10 20:22:16 -07:00
terminal-webview-url-tap.test.ts
terminal-webview-url-tap.ts
terminal-webview-webgl-recovery-injected.ts fix(mobile): recover terminal WebView/WebGL/viewport/theme state after iOS resume (#8196) 2026-07-10 20:22:16 -07:00
terminal-write-coalescer-boundaries.test.ts Stop the mobile app from running hot during terminal streaming (#9489) 2026-07-20 14:45:58 -07:00
terminal-write-coalescer.test.ts Stop the mobile app from running hot during terminal streaming (#9489) 2026-07-20 14:45:58 -07:00
terminal-write-coalescer.ts Stop the mobile app from running hot during terminal streaming (#9489) 2026-07-20 14:45:58 -07:00
use-terminal-live-accessory-input-commit.test.ts
use-terminal-live-accessory-input-commit.ts
use-terminal-live-input-commit.test.ts Fix iOS native keyboard dictation in mobile terminal inputs (#7933) 2026-07-09 05:02:39 -07:00
use-terminal-live-input-commit.ts Fix iOS native keyboard dictation in mobile terminal inputs (#7933) 2026-07-09 05:02:39 -07:00
use-terminal-live-pending-input-flush.ts