Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions apps/maple-agent/app/src/ui/chat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,10 @@ impl ChatScreen {
return;
}
self.sidebar_collapsed = collapsed;
if collapsed {
// Its rows leave the window without seeing the pointer leave.
self.sidebar.update(cx, |sidebar, cx| sidebar.end_hover(cx));
}
cx.notify();
}

Expand Down Expand Up @@ -4017,7 +4021,8 @@ impl ChatScreen {
let Some((row, request)) = self.task_step_target(delta, cx) else {
return;
};
self.sidebar.read(cx).reveal_row(row);
self.sidebar
.update(cx, |sidebar, cx| sidebar.reveal_row(row, cx));
if request.computer.as_deref() == self.backend.remote_host() {
if let Destination::Task(id) = request.destination {
self.select_session(&id, cx);
Expand Down Expand Up @@ -6339,7 +6344,12 @@ impl Render for ChatScreen {
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
// Refreshed every frame; activation changes force a redraw, so
// this tracks focus closely enough to gate notifications.
self.window_active = window.is_window_active();
let was_active = std::mem::replace(&mut self.window_active, window.is_window_active());
if was_active && !self.window_active {
// Another app took over under a still pointer, which reports
// nothing; the sidebar's hover card goes with the window's focus.
self.sidebar.update(cx, |sidebar, cx| sidebar.end_hover(cx));
}
let vim_in_sidebar = self.application_vim_enabled
&& self.application_vim.region == self::navigation::ChatRegion::Sidebar;
self.sidebar
Expand Down
6 changes: 4 additions & 2 deletions apps/maple-agent/app/src/ui/chat/navigation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,11 @@ impl ChatScreen {
self.focus_application_vim(window, cx);
}

fn reveal_application_selection(&self, cx: &gpui::App) {
fn reveal_application_selection(&self, cx: &mut gpui::App) {
match self.application_vim.region {
ChatRegion::Sidebar => self.sidebar.read(cx).vim_reveal(),
ChatRegion::Sidebar => self
.sidebar
.update(cx, |sidebar, cx| sidebar.vim_reveal(cx)),
ChatRegion::Transcript => {
if let Some(item_id) = self.selected_transcript_id()
&& let Some(&(row, _)) = self.timeline_index.get(item_id)
Expand Down
Loading
Loading