From efc85f2a1dbbae1160f017f621afac25a6734b05 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Tue, 31 Mar 2026 06:36:25 -0500 Subject: [PATCH] ep: Only fetch experiments if `cx.is_staff` (#52739) (cherry-pick to stable) (#52783) Cherry-pick of #52739 to stable ---- Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A --- crates/edit_prediction/src/edit_prediction.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/edit_prediction/src/edit_prediction.rs b/crates/edit_prediction/src/edit_prediction.rs index cfc5c7efe348b7238813853bbf3e5fd70047340d..252516a28dcc058bfff9a57b20c656e31d62d25f 100644 --- a/crates/edit_prediction/src/edit_prediction.rs +++ b/crates/edit_prediction/src/edit_prediction.rs @@ -804,8 +804,11 @@ impl EditPredictionStore { while current_user.borrow().is_none() { current_user.next().await; } + this.update(cx, |this, cx| { - this.refresh_available_experiments(cx); + if cx.is_staff() { + this.refresh_available_experiments(cx); + } }) .log_err(); });