BlueGit

ict rusty-teams

fix(presence): keyboard counts as activity, permanent failures retry after 30 min

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-11 · 7 weeks ago

Hash
1e619fdfc4ef76005e31f7e6485d17db2bd0ff20
Parent
a755adcc
2 files changed +22 −11
crates/app/src/user_activity.rs +7 −1
@@ -2,7 +2,7 @@ use std::sync::Arc;
2 2 use std::sync::atomic::{AtomicU64, Ordering};
3 3 use std::time::{Duration, Instant};
4 4
5 use gpui_kit::{DispatchPhase, IntoElement, MouseDownEvent, MouseMoveEvent, ScrollWheelEvent, canvas};
5 use gpui_kit::{DispatchPhase, IntoElement, KeyDownEvent, MouseDownEvent, MouseMoveEvent, ScrollWheelEvent, canvas};
6 6 use tokio::sync::watch;
7 7
8 8 pub const IDLE_AFTER: Duration = Duration::from_secs(5 * 60);
@@ -58,6 +58,12 @@ pub fn input_probe(input: Arc<UserInput>) -> impl IntoElement {
58 58 scrolled.touch();
59 59 }
60 60 });
61 let typed = input.clone();
62 window.on_key_event(move |_: &KeyDownEvent, phase, _, _| {
63 if phase == DispatchPhase::Capture {
64 typed.touch();
65 }
66 });
61 67 },
62 68 )
63 69 }
@@ -2,7 +2,7 @@ use std::sync::Arc;
2use std::sync::atomic::{AtomicU64, Ordering};
2use std::sync::atomic::{AtomicU64, Ordering};
3use std::time::{Duration, Instant};
3use std::time::{Duration, Instant};
4
4
5use gpui_kit::{DispatchPhase, IntoElement, MouseDownEvent, MouseMoveEvent, ScrollWheelEvent, canvas};
5use gpui_kit::{DispatchPhase, IntoElement, KeyDownEvent, MouseDownEvent, MouseMoveEvent, ScrollWheelEvent, canvas};
6use tokio::sync::watch;
6use tokio::sync::watch;
7
7
8pub const IDLE_AFTER: Duration = Duration::from_secs(5 * 60);
8pub const IDLE_AFTER: Duration = Duration::from_secs(5 * 60);
@@ -58,6 +58,12 @@ pub fn input_probe(input: Arc<UserInput>) -> impl IntoElement {
58 scrolled.touch();
58 scrolled.touch();
59 }
59 }
60 });
60 });
61 let typed = input.clone();
62 window.on_key_event(move |_: &KeyDownEvent, phase, _, _| {
63 if phase == DispatchPhase::Capture {
64 typed.touch();
65 }
66 });
61 },
67 },
62 )
68 )
63}
69}