A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
Purge thread references when their host is deleted
RoversX2fcd08fd5c48
diff --git a/wezterm-gui/src/ssh_hosts.rs b/wezterm-gui/src/ssh_hosts.rsindex fcf088b6..605b037f 100644--- a/wezterm-gui/src/ssh_hosts.rs+++ b/wezterm-gui/src/ssh_hosts.rs@@ -545,6 +545,10 @@ pub fn forget_spaces_of_deleted_hosts() {Err(err) => log::warn!("cannot remove unreachable Space {space_id}: {err:?}"),}}+ // Startup catch-all for references into those machines (a host deleted+ // while the app was closed, or an interrupted delete): with no host+ // record left to resolve them, the refs would grey out forever.+ crate::workspace_threads::purge_thread_refs_for_machines(&unreachable);}pub fn list_system_hosts() -> Vec<SshHostEntry> {diff --git a/wezterm-gui/src/termwindow/ssh_hosts_view.rs b/wezterm-gui/src/termwindow/ssh_hosts_view.rsindex 40395742..b82176e9 100644--- a/wezterm-gui/src/termwindow/ssh_hosts_view.rs+++ b/wezterm-gui/src/termwindow/ssh_hosts_view.rs@@ -617,9 +617,8 @@ impl SshHostsView {// nothing resolves the domain to connect, and every rename or// delete is refused because it has to go through a server this// device can no longer name.- let orphaned_spaces = workspace_threads::space_ids_for_domains(- &ssh_hosts::domain_names_for_host(&entry.spec),- );+ let host_domains = ssh_hosts::domain_names_for_host(&entry.spec);+ let orphaned_spaces = workspace_threads::space_ids_for_domains(&host_domains);if let Err(err) = ssh_hosts::try_remove_host(&id) {log::error!("failed to delete SSH host {id}: {err:#}");@@ -627,6 +626,10 @@ impl SshHostsView {return ContentViewResponse::Redraw;}let _ = workspace_threads::remove_project(&id);+ // References into this host's mux Spaces would otherwise+ // linger as permanent grey rows: with the host record gone,+ // nothing can ever resolve them again.+ workspace_threads::purge_thread_refs_for_machines(&host_domains);self.refresh();if orphaned_spaces.is_empty() {