commit 26c9f220b501cb989f512d6ad1bfadcc1dcbb2e5
parent a621b0b7b7d1ec17c31a71dfd56c485acf7558cc
Author: William Casarin <jb55@jb55.com>
Date: Thu, 19 Feb 2026 09:45:45 -0800
dave: clear done indicator from focus queue after auto-steal switch
Previously the done item stayed in the queue after switching to it,
causing repeated re-triggering. Dequeue the session after switching
so the indicator is cleared.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/crates/notedeck_dave/src/update.rs b/crates/notedeck_dave/src/update.rs
@@ -574,14 +574,16 @@ pub fn process_auto_steal_focus(
tracing::debug!("Auto-steal: saved home session {:?}", home_session);
}
- // Jump to first Done item
+ // Jump to first Done item and clear it from the queue
if let Some(idx) = focus_queue.first_done_index() {
focus_queue.set_cursor(idx);
if let Some(entry) = focus_queue.current() {
- switch_and_focus_session(session_manager, scene, show_scene, entry.session_id);
+ let sid = entry.session_id;
+ switch_and_focus_session(session_manager, scene, show_scene, sid);
+ focus_queue.dequeue(sid);
tracing::debug!(
- "Auto-steal: switched to Done session {:?}",
- entry.session_id
+ "Auto-steal: switched to Done session {:?} and cleared indicator",
+ sid
);
return true;
}