From 9e183d94ee9383b1f21f831411ec9740c4f52dbf Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 26 Jan 2026 10:21:12 +0100 Subject: [PATCH] project: Do not send `UpdateProject` message on remote server spawn (#47633) The client has not yet setup its own side of things so the message will always error as being unhandled anyways. Release Notes: - N/A *or* Added/Fixed/Improved ... --- crates/project/src/worktree_store.rs | 8 +++++++- crates/remote/src/remote_client.rs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/project/src/worktree_store.rs b/crates/project/src/worktree_store.rs index 754bc99ce7f112170c47f01e0e861a3fbfc45e77..ff6e620618d3b03e30a4bff775cbe9aeed17523a 100644 --- a/crates/project/src/worktree_store.rs +++ b/crates/project/src/worktree_store.rs @@ -913,7 +913,13 @@ impl WorktreeStore { } } } - self.send_project_updates(cx); + // Only send project updates if we share in a collaborative mode. + // Otherwise we are the remote server which is currently constructing + // worktree store before the client actually has set up its message + // handlers. + if remote_id != REMOTE_SERVER_PROJECT_ID { + self.send_project_updates(cx); + } } pub fn unshared(&mut self, cx: &mut Context) { diff --git a/crates/remote/src/remote_client.rs b/crates/remote/src/remote_client.rs index 5f67ae75df287b67709d3e6e68a8acecc41aada7..1a2ccbef648b3e12c8606b2d3550d430751daacc 100644 --- a/crates/remote/src/remote_client.rs +++ b/crates/remote/src/remote_client.rs @@ -842,7 +842,7 @@ impl RemoteClient { } } } else if exit_code > 0 { - log::error!("proxy process terminated unexpectedly"); + log::error!("proxy process terminated unexpectedly: {exit_code}"); this.update(cx, |this, cx| { this.reconnect(cx).ok(); })?;