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
mux: settle the handoff lease bookkeeping and move one window quietly
RoversXfd1c22210f0e
diff --git a/mux/src/lib.rs b/mux/src/lib.rsindex 5acb250e..ea06be9a 100644--- a/mux/src/lib.rs+++ b/mux/src/lib.rs@@ -1714,6 +1714,9 @@ impl Mux {access_changed = lease.handoff_owner.as_ref() != Some(client_id);lease.handoff_owner = Some(client_id.clone());lease.handoff_ever_owned = true;+ // An explicit claim supersedes whoever drove before: the+ // returning-device rule must not hand the lease back to it.+ lease.handoff_last_owner = None;if access_changed {for (affected_tab_id, state) in &mut lease.tabs {if state.view.take().is_some() && *affected_tab_id != tab_id {@@ -2075,7 +2078,10 @@ impl Mux {let mut affected = Vec::new();match mode {FrontendAccessMode::Handoff => {- lease.handoff_owner = None;+ // The screen whose geometry failed is the one that gets+ // to come back without a click, not whoever drove+ // before it.+ lease.handoff_last_owner = lease.handoff_owner.take();lease.handoff_ever_owned = true;for (affected_tab_id, state) in &mut lease.tabs {state.owner = None;@@ -2329,6 +2335,14 @@ impl Mux {self.rename_workspace_impl(old_workspace, new_workspace, false);}+ /// Move one window to `workspace` without announcing it. The other+ /// windows of its workspace stay where they are.+ pub fn move_window_to_workspace_quietly(&self, window_id: WindowId, workspace: &str) {+ if let Some(mut window) = self.get_window_mut(window_id) {+ window.set_workspace_quietly(workspace);+ }+ }+fn rename_workspace_impl(&self, old_workspace: &str, new_workspace: &str, announce: bool) {if old_workspace == new_workspace {return;diff --git a/mux/src/window.rs b/mux/src/window.rsindex 4923ac75..8af42f16 100644--- a/mux/src/window.rs+++ b/mux/src/window.rs@@ -109,6 +109,13 @@ impl Window {Mux::get().notify(MuxNotification::WindowWorkspaceChanged(self.id));}+ /// `set_workspace` without the notification: for moving a window+ /// aside that nothing should follow (a GUI syncs announced moves into+ /// its thread store).+ pub fn set_workspace_quietly(&mut self, workspace: &str) {+ self.workspace = workspace.to_string();+ }+pub fn window_id(&self) -> WindowId {self.id}