Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@joshka-oai
Copy link
Collaborator

Problem

  • Mouse wheel events were scheduling a redraw on every event, which could backlog and create lag during fast scrolling.

Solution

  • Schedule transcript scroll redraws with a short delay (16ms) so the frame requester coalesces bursts into fewer draws.

Why

  • Smooths rapid wheel scrolling while keeping the UI responsive.

Testing

  • Manual: Scrolled in iTerm and Ghostty; no lag observed.
  • cargo clippy --fix --all-features --tests --allow-dirty --allow-no-vcs -p codex-tui2

Use a small delay when scheduling redraws from scroll events so the frame
requester can coalesce bursts of mouse wheel input, avoiding backlogged
redraws while keeping the UI responsive.
@joshka-oai joshka-oai merged commit 1d4463b into main Dec 19, 2025
45 of 47 checks passed
@joshka-oai joshka-oai deleted the joshka/tui2-scroll-coalesce branch December 19, 2025 20:19
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants