Skip to content

fix: hide cursor during streaming output#22

Merged
190km merged 1 commit intomainfrom
fix/hide-cursor-streaming-output
Mar 29, 2026
Merged

fix: hide cursor during streaming output#22
190km merged 1 commit intomainfrom
fix/hide-cursor-streaming-output

Conversation

@190km
Copy link
Copy Markdown
Owner

@190km 190km commented Mar 29, 2026

Summary

  • The terminal cursor was always visible during streaming output from AI tools (Codex, Claude, etc.), making the shimmer/wave text look bad
  • Implemented should_hide_cursor_for_streaming_output() in pty.rs using the existing last_input_at / last_output_at timestamps to detect active streaming
  • The cursor is now hidden only when output arrived within the last 100ms AND the user hasn't typed for 150ms, so it stays visible during normal interactive use
  • Added a repaint request in panel.rs so the cursor reappears promptly (within 150ms) once streaming stops

Test plan

  • cargo check passes
  • All 15 tests pass (cargo test --locked), including the existing streaming_output_hides_cursor test in renderer.rs
  • Manual: run an AI tool (e.g. Claude, Codex) that streams output and verify the cursor is hidden during streaming
  • Manual: type interactively and verify the cursor remains visible
  • Manual: verify the cursor reappears promptly after streaming stops

🤖 Generated with Claude Code

@190km 190km merged commit 111d411 into main Mar 29, 2026
8 checks passed
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