feat(tui2): coalesce transcript scroll redraws (#8295)
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`
This commit is contained in:
parent
e3d3445748
commit
1d4463ba81
1 changed files with 3 additions and 1 deletions
|
|
@ -953,7 +953,9 @@ impl App {
|
|||
self.transcript_scroll
|
||||
.scrolled_by(delta_lines, &line_meta, visible_lines);
|
||||
|
||||
tui.frame_requester().schedule_frame();
|
||||
// Delay redraws slightly so scroll bursts coalesce into a single frame.
|
||||
tui.frame_requester()
|
||||
.schedule_frame_in(Duration::from_millis(16));
|
||||
}
|
||||
|
||||
/// Convert a `ToBottom` (auto-follow) scroll state into a fixed anchor at the current view.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue