From 7eeb43774a6c013a7d28f690152ed82411336193 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Thu, 3 Sep 2026 08:23:36 +0100 Subject: [PATCH] feat(maestro): clear AwaitingInput after 1s of focus Was 5s, which felt slow on a pane the operator is already looking at. --- crates/maestro-daemon/src/activity.rs | 4 ++-- docs/SIDEBAR.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/maestro-daemon/src/activity.rs b/crates/maestro-daemon/src/activity.rs index 4d02d2b..21d2069 100644 --- a/crates/maestro-daemon/src/activity.rs +++ b/crates/maestro-daemon/src/activity.rs @@ -69,7 +69,7 @@ pub fn decide(idle_for: Duration, awaiting_input: bool) -> ActivityState { /// How long a session's pane must be continuously focused (a client's pane, /// not a sidebar highlight) before an `AwaitingInput` glow clears: the /// operator has looked, so the rail stops asking for attention. -pub const FOCUS_CLEAR_HOLD: Duration = Duration::from_secs(5); +pub const FOCUS_CLEAR_HOLD: Duration = Duration::from_secs(1); /// Downgrade `raw` from `AwaitingInput` to `Idle` once the pane has been /// focused for at least [`FOCUS_CLEAR_HOLD`]. @@ -161,7 +161,7 @@ mod tests { fn awaiting_input_glows_until_focus_hold_is_reached() { let now = std::time::Instant::now(); let mut suppressed = false; - let since = now - (FOCUS_CLEAR_HOLD - Duration::from_secs(1)); + let since = now - (FOCUS_CLEAR_HOLD - Duration::from_millis(200)); assert_eq!( apply_focus_suppression( ActivityState::AwaitingInput, diff --git a/docs/SIDEBAR.md b/docs/SIDEBAR.md index 46f1b5b..c04b42b 100644 --- a/docs/SIDEBAR.md +++ b/docs/SIDEBAR.md @@ -234,7 +234,7 @@ the agent, and answering 204 would hide it. A session's pane — the pane a client's own attach view is showing, never a sidebar highlight — clears its `AwaitingInput` glow once it has been -**continuously focused for 5 seconds**: the operator has looked, so the rail +**continuously focused for 1 second**: the operator has looked, so the rail stops asking for attention and the card reads as `Idle` instead. This is a real state change, not a client-side paint-over — the daemon computes it, so every client watching the session (web, TUI, a second pane on the same