Skip to content

Fix terminal stream backpressure and split-pane input lag#2341

Merged
Jinwoo-H merged 2 commits into
mainfrom
Jinwoo-H/investigate-frozen-pty
May 19, 2026
Merged

Fix terminal stream backpressure and split-pane input lag#2341
Jinwoo-H merged 2 commits into
mainfrom
Jinwoo-H/investigate-frozen-pty

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add daemon stream backpressure handling so PTY data/exit events preserve order, bound memory, and recover active sessions after stream failure
  • keep visible inactive split-pane output on the shared terminal output scheduler so noisy build/install panes cannot monopolize xterm writes while the active pane receives input
  • chunk large PTY IPC batches so one noisy PTY cannot serialize megabytes into the renderer in one main-process turn
  • add focused daemon/main/renderer coverage plus a headful Electron split-pane regression

Validation

  • Reproduced current installed Orca lag with a noisy inactive split pane: focus/typing into active pane stalled for multiple seconds
  • pnpm run test:e2e:headful -- terminal-output-scheduler.spec.ts
  • pnpm vitest run --config config/vitest.config.ts src/main/daemon/daemon-stream-data-batcher.test.ts src/main/daemon/client.test.ts src/main/daemon/daemon-server.test.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/ipc/pty.test.ts src/renderer/src/components/terminal-pane/pty-connection.test.ts src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.test.ts
  • pnpm run typecheck
  • pnpm exec oxlint src/main/daemon/daemon-stream-data-batcher.ts src/main/daemon/daemon-stream-data-batcher.test.ts src/main/daemon/daemon-server.ts src/main/daemon/daemon-server.test.ts src/main/daemon/client.ts src/main/daemon/client.test.ts src/main/daemon/daemon-pty-adapter.ts src/main/daemon/daemon-pty-adapter.test.ts src/main/ipc/pty.ts src/main/ipc/pty.test.ts src/renderer/src/components/terminal-pane/pty-connection.ts src/renderer/src/components/terminal-pane/pty-connection.test.ts tests/e2e/terminal-output-scheduler.spec.ts
  • git diff --check

Note: local commands emit the existing Node engine warning because this shell is on Node v25.9.0 while the repo wants Node 24.

Made with Orca 🐋

Jinwoo-H and others added 2 commits May 19, 2026 16:11
Co-authored-by: Orca <help@stably.ai>
@Jinwoo-H Jinwoo-H merged commit f010bb8 into main May 19, 2026
1 check passed
@Jinwoo-H Jinwoo-H deleted the Jinwoo-H/investigate-frozen-pty branch May 19, 2026 20:59
thomaszdxsn pushed a commit to thomaszdxsn/orca that referenced this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant