From 66f7aea1664af5d66a08bbfe9d831b7cccc6f28c Mon Sep 17 00:00:00 2001 From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com> Date: Wed, 18 Feb 2026 11:34:27 -0500 Subject: [PATCH] agent: Disables multi workspace refresh queue for non-staff (#49496) Refreshing the queue was causing hangs on debug builds, so this is a short term fix until we rework how the sidebar gets its data. Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing - [x] Done a self-review taking into account security and performance aspects - [ ] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - N/A --- crates/sidebar/src/sidebar.rs | 5 +++++ crates/workspace/src/multi_workspace.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/sidebar/src/sidebar.rs b/crates/sidebar/src/sidebar.rs index e259b86d95d69ac36c7f0abef75d9577840320f3..2dfefcc5be7948daa0340dd61131d8bf53dcaaf9 100644 --- a/crates/sidebar/src/sidebar.rs +++ b/crates/sidebar/src/sidebar.rs @@ -2,6 +2,7 @@ use acp_thread::ThreadStatus; use agent_ui::{AgentPanel, AgentPanelEvent}; use chrono::{Datelike, Local, NaiveDate, TimeDelta}; use db::kvp::KEY_VALUE_STORE; + use fs::Fs; use fuzzy::StringMatchCandidate; use gpui::{ @@ -993,6 +994,10 @@ impl Sidebar { cx: &mut Context, ) { cx.defer_in(window, move |this, window, cx| { + if !this.multi_workspace.read(cx).multi_workspace_enabled(cx) { + return; + } + this._project_subscriptions = this.subscribe_to_projects(window, cx); this._agent_panel_subscriptions = this.subscribe_to_agent_panels(window, cx); this._thread_subscriptions = this.subscribe_to_threads(window, cx); diff --git a/crates/workspace/src/multi_workspace.rs b/crates/workspace/src/multi_workspace.rs index 2a528d21e778876e1fb83145065ae2cdbce45a87..75c794cb6f53ba884b9879192118e1f8bea0870e 100644 --- a/crates/workspace/src/multi_workspace.rs +++ b/crates/workspace/src/multi_workspace.rs @@ -144,7 +144,7 @@ impl MultiWorkspace { .map_or(false, |s| s.has_notifications(cx)) } - pub(crate) fn multi_workspace_enabled(&self, cx: &App) -> bool { + pub fn multi_workspace_enabled(&self, cx: &App) -> bool { cx.has_flag::() }