Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove auto watch feature flag (#59619)
Joseph T. Lyons184cf97ee9e8
diff --git a/Cargo.lock b/Cargo.lockindex 794ec8f1ce5..ad39bf4af7b 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3505,7 +3505,6 @@ dependencies = ["collections","db","editor",- "feature_flags","futures 0.3.32","fuzzy","gpui",diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.tomlindex 978af1387cb..920f620e0ea 100644--- a/crates/collab_ui/Cargo.toml+++ b/crates/collab_ui/Cargo.toml@@ -36,7 +36,6 @@ client.workspace = truecollections.workspace = truedb.workspace = trueeditor.workspace = true-feature_flags.workspace = truefutures.workspace = truefuzzy.workspace = truegpui.workspace = truediff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rsindex 907c462aa63..0958587a5ca 100644--- a/crates/collab_ui/src/collab_panel.rs+++ b/crates/collab_ui/src/collab_panel.rs@@ -11,7 +11,6 @@ use collections::{HashMap, HashSet};use contact_finder::ContactFinder;use db::kvp::KeyValueStore;use editor::{Editor, EditorElement, EditorStyle};-use feature_flags::{AutoWatchFeatureFlag, FeatureFlagAppExt as _};use fuzzy::{StringMatch, StringMatchCandidate, match_strings};use gpui::{AnyElement, App, AsyncWindowContext, Bounds, ClickEvent, ClipboardItem, DismissEvent, Div,@@ -2911,66 +2910,46 @@ impl CollabPanel {let is_auto_watching = auto_watch_state.enabled();let button = match section {- Section::ActiveCall => {- let has_auto_watch_flag = cx.has_flag::<AutoWatchFeatureFlag>();- let show_auto_watch = has_auto_watch_flag && is_auto_watching;- let show_copy = channel_link.is_some();-- if show_auto_watch || show_copy {- Some(- h_flex()- .when_some(channel_link, |this, channel_link| {- this.child(- CopyButton::new("copy-channel-link", channel_link)- .visible_on_hover("section-header")- .tooltip_label("Copy Channel Link"),- )- })- .when(has_auto_watch_flag, |this| {- this.child(- IconButton::new(- "auto-watch-screens",- if is_auto_watching {- IconName::Eye- } else {- IconName::EyeOff- },- )- .icon_size(IconSize::Small)- .toggle_state(is_auto_watching)- .selected_style(match auto_watch_state {- AutoWatch::Paused => {- ButtonStyle::Tinted(TintColor::Warning)- }- _ => ButtonStyle::Tinted(TintColor::Accent),- })- .when(!is_auto_watching, |this| {- this.visible_on_hover("section-header")- })- .tooltip(Tooltip::text(match auto_watch_state {- AutoWatch::Paused => {- "Auto Watch Screens (paused while sharing)"- }- AutoWatch::Active { .. } => "Stop Auto Watching Screens",- AutoWatch::Off => "Auto Watch Screens",- }))- .on_click(cx.listener(- |this, _, window, cx| {- this.workspace- .update(cx, |workspace, cx| {- workspace.toggle_auto_watch(window, cx)- })- .ok();- },- )),- )- })- .into_any_element(),+ Section::ActiveCall => Some(+ h_flex()+ .when_some(channel_link, |this, channel_link| {+ this.child(+ CopyButton::new("copy-channel-link", channel_link)+ .visible_on_hover("section-header")+ .tooltip_label("Copy Channel Link"),+ )+ })+ .child(+ IconButton::new(+ "auto-watch-screens",+ if is_auto_watching {+ IconName::Eye+ } else {+ IconName::EyeOff+ },+ )+ .icon_size(IconSize::Small)+ .toggle_state(is_auto_watching)+ .selected_style(match auto_watch_state {+ AutoWatch::Paused => ButtonStyle::Tinted(TintColor::Warning),+ _ => ButtonStyle::Tinted(TintColor::Accent),+ })+ .when(!is_auto_watching, |this| {+ this.visible_on_hover("section-header")+ })+ .tooltip(Tooltip::text(match auto_watch_state {+ AutoWatch::Paused => "Auto Watch Screens (paused while sharing)",+ AutoWatch::Active { .. } => "Stop Auto Watching Screens",+ AutoWatch::Off => "Auto Watch Screens",+ }))+ .on_click(cx.listener(|this, _, window, cx| {+ this.workspace+ .update(cx, |workspace, cx| workspace.toggle_auto_watch(window, cx))+ .ok();+ })),)- } else {- None- }- }+ .into_any_element(),+ ),Section::Contacts => Some(IconButton::new("add-contact", IconName::Plus).icon_size(IconSize::Small)diff --git a/crates/feature_flags/src/flags.rs b/crates/feature_flags/src/flags.rsindex 8a5de71d822..2552eacf102 100644--- a/crates/feature_flags/src/flags.rs+++ b/crates/feature_flags/src/flags.rs@@ -123,14 +123,6 @@ impl FeatureFlag for AgentSettingsUiFeatureFlag {}register_feature_flag!(AgentSettingsUiFeatureFlag);-pub struct AutoWatchFeatureFlag;--impl FeatureFlag for AutoWatchFeatureFlag {- const NAME: &'static str = "auto-watch-screens";- type Value = PresenceFlag;-}-register_feature_flag!(AutoWatchFeatureFlag);-/// Wraps agent-run terminal commands in an OS-level sandbox where supported/// (currently macOS Seatbelt only). When off, terminal commands run with the/// agent's full ambient permissions, as they always have.