feat(maestro): clear AwaitingInput after 1s of focus
ci / web (push) Successful in 30s
ci / flake (push) Successful in 2m32s
ci / rust (push) Successful in 5m35s

Was 5s, which felt slow on a pane the operator is already looking at.
This commit is contained in:
Miguel Palhas
2026-09-03 08:23:36 +01:00
parent b36d571b21
commit 7eeb43774a
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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,