notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 3e54e3ae3c2405f424b9515ac343965b197baf73
parent db9a57615c5300899a84c4e664048a251fee6653
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 26 Jan 2026 18:36:13 -0800

dave: focus another node after deleting selected nodes

When deleting nodes with Delete key in scene view, automatically
select the most recently used remaining session instead of leaving
nothing focused.

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

Diffstat:
Mcrates/notedeck_dave/src/lib.rs | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/crates/notedeck_dave/src/lib.rs b/crates/notedeck_dave/src/lib.rs @@ -414,7 +414,12 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr for id in self.scene.selected.clone() { self.delete_session(id); } - self.scene.clear_selection(); + // Focus another node after deletion + if let Some(session) = self.session_manager.sessions_ordered().first() { + self.scene.select(session.id); + } else { + self.scene.clear_selection(); + } } SceneAction::AgentMoved { id, position } => { if let Some(session) = self.session_manager.get_mut(id) { @@ -550,6 +555,10 @@ You are an AI agent for the nostr protocol called Dave, created by Damus. nostr if let Some(session) = self.session_manager.get_mut(id) { session.focus_requested = true; } + // Also update scene selection if in scene view + if self.show_scene { + self.scene.select(id); + } } /// Delete a session and clean up backend resources