Skip to content

fix(terminal): batch visible output repaints#1868

Open
Jinwoo-H wants to merge 9 commits into
mainfrom
Jinwoo-H/windows-codex-cursor-flicker
Open

fix(terminal): batch visible output repaints#1868
Jinwoo-H wants to merge 9 commits into
mainfrom
Jinwoo-H/windows-codex-cursor-flicker

Conversation

@Jinwoo-H
Copy link
Copy Markdown
Contributor

Summary

  • coalesce visible terminal output for one frame before writing to xterm
  • flush pending visible output before forwarding terminal input
  • extend terminal output scheduler tests for foreground batching and explicit flushes

Why

Codex-style TUIs repaint the prompt/status area by moving the terminal cursor through intermediate positions. Writing every PTY chunk to xterm immediately can expose those positions as cursor flicker on Windows. Batching visible output to one frame keeps repaint bursts together while preserving explicit flush points for input and replay-sensitive paths.

Test plan

  • pnpm vitest run --config config/vitest.config.ts src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.test.ts src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.test.ts
  • pnpm exec oxlint --format github src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.ts src/renderer/src/lib/pane-manager/pane-terminal-output-scheduler.test.ts src/renderer/src/components/terminal-pane/pty-connection.ts
  • pnpm run typecheck

Note: local Windows full pnpm test is blocked by Node 25/native module mismatch and Windows named pipe behavior; CI runs Node 24 on Linux.

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