From 5b0e02dfee532fc07c85e79f00c0c04421a9c5e5 Mon Sep 17 00:00:00 2001 From: NikkeTryHard Date: Mon, 9 Feb 2026 22:06:53 -0600 Subject: [PATCH] fix(reporting): reduce socket timeout and enable steady tick for responsive TUI Socket read timeout reduced from 5s to 100ms so the scheduler unblocks quickly for TUI updates. ProgressBar steady tick enabled at 100ms on both ProgressReporter and TachReporter so the spinner animates independently of test result arrival. Fixes #81 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/execution/scheduler.rs | 6 ++++-- src/reporting/reporter.rs | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/execution/scheduler.rs b/src/execution/scheduler.rs index 92f20c1d..9c4f4253 100644 --- a/src/execution/scheduler.rs +++ b/src/execution/scheduler.rs @@ -192,8 +192,10 @@ impl Scheduler { ) -> Result { let max_workers = log_capture.slot_count(); - // Set read timeout on result socket for crash detection - result_socket.set_read_timeout(Some(Duration::from_secs(5)))?; + // Set read timeout on result socket for crash detection. + // 100ms keeps the scheduler responsive for TUI updates while still + // being efficient (the scheduler sleeps 50ms between iterations anyway). + result_socket.set_read_timeout(Some(Duration::from_millis(100)))?; // Set read timeout on cmd socket to prevent indefinite hang if Zygote crashes cmd_socket.set_read_timeout(Some(Duration::from_secs(10)))?; diff --git a/src/reporting/reporter.rs b/src/reporting/reporter.rs index fb0babfb..947871f6 100644 --- a/src/reporting/reporter.rs +++ b/src/reporting/reporter.rs @@ -17,6 +17,7 @@ use crate::config::TracebackStyle; use serde::Serialize; use std::collections::{HashMap, HashSet}; use std::io::IsTerminal; +use std::time::Duration; // Re-export TracebackStyle for convenience pub use crate::config::TracebackStyle as TbStyle; @@ -681,6 +682,7 @@ impl ProgressReporter { .unwrap_or_else(|_| ProgressStyle::default_bar()) .progress_chars("=>-"), ); + bar.enable_steady_tick(Duration::from_millis(100)); Self { bar, @@ -1040,6 +1042,7 @@ impl TachReporter { .template("{spinner:.green} {msg}") .expect("invalid spinner template"), ); + bar.enable_steady_tick(Duration::from_millis(100)); Self { bar, file_results: HashMap::new(),