From 2f100b2a046aca319e795c8575b4a7faab8ef285 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Thu, 13 Aug 2026 17:27:53 +0800 Subject: [PATCH] fix(switcher): drop a parked create when its machine's connect is called off Disconnect clears the in-flight connect, so finish_connect never runs and the PendingCreate outlived the intent behind it: the next successful connect to that machine would have silently created a workspace nobody was waiting for anymore. --- src/ui/switcher.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ui/switcher.rs b/src/ui/switcher.rs index 4762f885..63042c38 100644 --- a/src/ui/switcher.rs +++ b/src/ui/switcher.rs @@ -946,6 +946,16 @@ impl Tty7App { { self.connect = None; } + // A create still waiting on this machine's link dies with the link: + // calling the connect off is calling the create off, or the next + // successful connect would grow a workspace nobody asked it for. + if self + .pending_create + .as_ref() + .is_some_and(|p| &p.target == target) + { + self.pending_create = None; + } cx.notify(); }