From 9c12562c207029d7513dead25c01a0d91053cd64 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Tue, 31 Mar 2026 03:51:57 -0500 Subject: [PATCH] ep: Only fetch experiments if `cx.is_staff` (#52739) (cherry-pick to preview) (#52784) Cherry-pick of #52739 to preview ---- 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 3ae4eb72b3a60ab56d865a235c43e2f0e3adab31..30c114ef38f002ff5fe31f9d632b41e199b255bb 100644 --- a/crates/edit_prediction/src/edit_prediction.rs +++ b/crates/edit_prediction/src/edit_prediction.rs @@ -778,8 +778,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(); });