BlueGit

ict rusty-teams

fix(messages): hover toolbar no longer sticks to one message

- hovering another row clears a toolbar hover that never got its hover-out
- a menu action clears the menu pin even when the toolbar unmounts first

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

metis Daniel Däschle · pushed by metis

Authored 2026-11-04 · 3 weeks ago

Hash
ec7266a592651f4362b4fdd7d883ac3a57702678
Parent
b14378ec
1 file changed +11 −1
crates/app/src/views/conversation.rs +11 −1
@@ -2583,6 +2583,12 @@ impl ConversationView {
2583 2583 } else if target.as_deref() == Some(key) {
2584 2584 *target = None;
2585 2585 }
2586 if hovered
2587 && matches!(slot, HoverSlot::Row)
2588 && self.toolbar_hovered.as_deref().is_some_and(|toolbar| toolbar != key)
2589 {
2590 self.toolbar_hovered = None;
2591 }
2586 2592 if let Some(suppressed) = self.toolbar_suppressed.as_deref()
2587 2593 && self.hovered_message.as_deref() != Some(suppressed)
2588 2594 && self.toolbar_hovered.as_deref() != Some(suppressed)
@@ -3082,7 +3088,11 @@ impl ConversationView {
3082 3088 let action = |run: fn(&mut Self, &str, &mut Window, &mut Context<Self>)| -> Action {
3083 3089 let (view, key) = (view.clone(), key.to_owned());
3084 3090 Rc::new(move |window, cx| {
3085 view.update(cx, |this, cx| run(this, &key, window, cx)).ok();
3091 view.update(cx, |this, cx| {
3092 this.set_pinned(&key, false, cx);
3093 run(this, &key, window, cx)
3094 })
3095 .ok();
3086 3096 })
3087 3097 };
3088 3098 let react: PickHandler = {
@@ -2583,6 +2583,12 @@ impl ConversationView {
2583 } else if target.as_deref() == Some(key) {
2583 } else if target.as_deref() == Some(key) {
2584 *target = None;
2584 *target = None;
2585 }
2585 }
2586 if hovered
2587 && matches!(slot, HoverSlot::Row)
2588 && self.toolbar_hovered.as_deref().is_some_and(|toolbar| toolbar != key)
2589 {
2590 self.toolbar_hovered = None;
2591 }
2586 if let Some(suppressed) = self.toolbar_suppressed.as_deref()
2592 if let Some(suppressed) = self.toolbar_suppressed.as_deref()
2587 && self.hovered_message.as_deref() != Some(suppressed)
2593 && self.hovered_message.as_deref() != Some(suppressed)
2588 && self.toolbar_hovered.as_deref() != Some(suppressed)
2594 && self.toolbar_hovered.as_deref() != Some(suppressed)
@@ -3082,7 +3088,11 @@ impl ConversationView {
3082 let action = |run: fn(&mut Self, &str, &mut Window, &mut Context<Self>)| -> Action {
3088 let action = |run: fn(&mut Self, &str, &mut Window, &mut Context<Self>)| -> Action {
3083 let (view, key) = (view.clone(), key.to_owned());
3089 let (view, key) = (view.clone(), key.to_owned());
3084 Rc::new(move |window, cx| {
3090 Rc::new(move |window, cx| {
3085 view.update(cx, |this, cx| run(this, &key, window, cx)).ok();
3091 view.update(cx, |this, cx| {
3092 this.set_pinned(&key, false, cx);
3093 run(this, &key, window, cx)
3094 })
3095 .ok();
3086 })
3096 })
3087 };
3097 };
3088 let react: PickHandler = {
3098 let react: PickHandler = {