Always use ArchiveSelectedThread action for archiving threads (#54348)

This changes the action for archiving threads in the main sidebar view
from `RemoveSelectedThread` to `ArchiveSelectedThread`. It has the same
key binding as before: `shift-backspace`. I also added `ctrl-backspace`
as a binding for deleting archived threads in the history view.

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld authored and GitHub committed 2026-04-20 18:47:40 +00:00
1 parent f37df7b78d
commit 4919ca43ec
4 files changed
+12 -9

No files matched your search

+2 -1
View File
@@ -727,7 +727,8 @@
"enter": "menu::Confirm",
"ctrl-f": "agents_sidebar::FocusSidebarFilter",
"ctrl-g": "agents_sidebar::ToggleThreadHistory",
"shift-backspace": "agent::RemoveSelectedThread",
"shift-backspace": "agent::ArchiveSelectedThread",
"ctrl-backspace": "agent::RemoveSelectedThread",
"ctrl-tab": "agents_sidebar::ToggleThreadSwitcher",
"ctrl-shift-tab": ["agents_sidebar::ToggleThreadSwitcher", { "select_last": true }],
},
+2 -1
View File
@@ -783,7 +783,8 @@
"enter": "menu::Confirm",
"cmd-f": "agents_sidebar::FocusSidebarFilter",
"cmd-g": "agents_sidebar::ToggleThreadHistory",
"shift-backspace": "agent::RemoveSelectedThread",
"shift-backspace": "agent::ArchiveSelectedThread",
"cmd-shift-backspace": "agent::RemoveSelectedThread",
"ctrl-tab": "agents_sidebar::ToggleThreadSwitcher",
"ctrl-shift-tab": ["agents_sidebar::ToggleThreadSwitcher", { "select_last": true }],
},
+2 -1
View File
@@ -728,7 +728,8 @@
"enter": "menu::Confirm",
"ctrl-f": "agents_sidebar::FocusSidebarFilter",
"ctrl-g": "agents_sidebar::ToggleThreadHistory",
"shift-backspace": "agent::RemoveSelectedThread",
"shift-backspace": "agent::ArchiveSelectedThread",
"ctrl-backspace": "agent::RemoveSelectedThread",
"ctrl-tab": "agents_sidebar::ToggleThreadSwitcher",
"ctrl-shift-tab": ["agents_sidebar::ToggleThreadSwitcher", { "select_last": true }],
},
+6 -6
View File
@@ -12,8 +12,8 @@ use agent_ui::threads_archive_view::{
ThreadsArchiveView, ThreadsArchiveViewEvent, format_history_entry_timestamp,
};
use agent_ui::{
AcpThreadImportOnboarding, Agent, AgentPanel, AgentPanelEvent, CrossChannelImportOnboarding,
DEFAULT_THREAD_TITLE, NewThread, RemoveSelectedThread, ThreadId, ThreadImportModal,
AcpThreadImportOnboarding, Agent, AgentPanel, AgentPanelEvent, ArchiveSelectedThread,
CrossChannelImportOnboarding, DEFAULT_THREAD_TITLE, NewThread, ThreadId, ThreadImportModal,
channels_with_threads, import_threads_from_other_channels,
};
use chrono::{DateTime, Utc};
@@ -3543,9 +3543,9 @@ impl Sidebar {
}
}
fn remove_selected_thread(
fn archive_selected_thread(
&mut self,
_: &RemoveSelectedThread,
_: &ArchiveSelectedThread,
window: &mut Window,
cx: &mut Context<Self>,
) {
@@ -3934,7 +3934,7 @@ impl Sidebar {
move |_window, cx| {
Tooltip::for_action_in(
"Archive Thread",
&RemoveSelectedThread,
&ArchiveSelectedThread,
&focus_handle,
cx,
)
@@ -4918,7 +4918,7 @@ impl Render for Sidebar {
.on_action(cx.listener(Self::fold_all))
.on_action(cx.listener(Self::unfold_all))
.on_action(cx.listener(Self::cancel))
.on_action(cx.listener(Self::remove_selected_thread))
.on_action(cx.listener(Self::archive_selected_thread))
.on_action(cx.listener(Self::new_thread_in_group))
.on_action(cx.listener(Self::toggle_archive))
.on_action(cx.listener(Self::focus_sidebar_filter))