Make transcript mouse scroll speed configurable (#50209)

## What changed

Add `tui.mouse_scroll_speed` as a finite positive multiplier for transcript mouse wheel scrolling, including transcript overlays and session previews. Change the default from three rows to one row per wheel event; set the multiplier to `3.0` to retain the previous speed.

Fractional values accumulate movement across events and discard the remainder when direction reverses. For example, `0.5` scrolls one row every two events. Following the latest output pauses only when a whole row moves.

## Testing

Add tests for configuration validation, integer and fractional scroll speeds, direction changes, decimal accumulation, and following behavior. Extend local settings coverage to include a command-line override for the new setting.

GitOrigin-RevId: d355e246fd943415f0ce5a6affe849f77f3615e6
This commit is contained in:
Eric Traut
2026-10-02 06:50:10 +00:00
committed by copyberry
parent e3c2a83937
commit 4dd51f4a5f
22 changed files with 256 additions and 13 deletions
+4
View File
@@ -85,6 +85,8 @@ struct VisibleRow {
/// Shared scrolling and interaction state for compact and detailed transcript presentations.
pub(crate) struct TranscriptView {
pub(crate) mouse_scroll_speed: f64,
pending_mouse_scroll: f64,
pub(crate) copy_on_select: bool,
pub(crate) primary_selection: bool,
position: Position,
@@ -118,6 +120,8 @@ pub(crate) struct TranscriptView {
impl Default for TranscriptView {
fn default() -> Self {
Self {
mouse_scroll_speed: 1.0,
pending_mouse_scroll: 0.0,
copy_on_select: false,
primary_selection: false,
position: Position::Latest,