commit ff09ffab39cafc3d410be053aa1aada6e06cc79e
parent ee630392db5de72799353b730efa28ee685b8b29
Author: William Casarin <jb55@jb55.com>
Date: Fri, 20 Feb 2026 12:50:29 -0800
dave: keep Done focus cue until user manually focuses session
Auto-steal-focus was immediately dequeuing Done sessions from the
focus queue, so the blue indicator dot never rendered. Now Done
entries persist in the queue and are cleared when the user clicks
a session in the list or scene view.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat:
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs
@@ -927,7 +927,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr
let (dave_response, view_action) = ui::scene_ui(
&mut self.session_manager,
&mut self.scene,
- &self.focus_queue,
+ &mut self.focus_queue,
&self.model_config,
is_interrupt_pending,
self.auto_steal_focus,
@@ -981,6 +981,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr
SessionListAction::NewSession => return DaveResponse::new(DaveAction::NewChat),
SessionListAction::SwitchTo(id) => {
self.session_manager.switch_to(id);
+ self.focus_queue.dequeue(id);
}
SessionListAction::Delete(id) => {
self.delete_session(id);
@@ -1013,6 +1014,7 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr
}
SessionListAction::SwitchTo(id) => {
self.session_manager.switch_to(id);
+ self.focus_queue.dequeue(id);
self.show_session_list = false;
}
SessionListAction::Delete(id) => {
diff --git a/crates/notedeck_dave/src/ui/mod.rs b/crates/notedeck_dave/src/ui/mod.rs
@@ -208,7 +208,7 @@ pub enum SceneViewAction {
pub fn scene_ui(
session_manager: &mut SessionManager,
scene: &mut AgentScene,
- focus_queue: &FocusQueue,
+ focus_queue: &mut FocusQueue,
model_config: &ModelConfig,
is_interrupt_pending: bool,
auto_steal_focus: bool,
@@ -294,6 +294,7 @@ pub fn scene_ui(
SceneAction::SelectionChanged(ids) => {
if let Some(id) = ids.first() {
session_manager.switch_to(*id);
+ focus_queue.dequeue(*id);
}
}
SceneAction::SpawnAgent => {
diff --git a/crates/notedeck_dave/src/update.rs b/crates/notedeck_dave/src/update.rs
@@ -574,17 +574,14 @@ pub fn process_auto_steal_focus(
tracing::debug!("Auto-steal: saved home session {:?}", home_session);
}
- // Jump to first Done item and clear it from the queue
+ // Jump to first Done item (keep in queue so blue dot renders;
+ // cleared when user manually focuses the session)
if let Some(idx) = focus_queue.first_done_index() {
focus_queue.set_cursor(idx);
if let Some(entry) = focus_queue.current() {
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 {:?} and cleared indicator",
- sid
- );
+ tracing::debug!("Auto-steal: switched to Done session {:?}", sid);
return true;
}
}