From c332be88fbbdec9561501c2999905a0bb0bfc5c0 Mon Sep 17 00:00:00 2001 From: Ben Kunkle Date: Mon, 30 Mar 2026 10:02:09 -0500 Subject: [PATCH] ep: Only fetch experiments if `cx.is_staff` (#52739) 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 34980e00cedb7da6b6273e69ec64b35b0d7e9785..3a66f712e31d7853bede21ab96ca6c7e92bea967 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(); });