Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ default = [
"minimalist_ui",
"avatar_in_tab_bar",
"full_screen_zen_mode",
"workflow_aliases",
"ligatures",
"dynamic_workflow_enums",
"rect_selection",
Expand Down Expand Up @@ -795,7 +794,6 @@ integration_tests = [
]
traces = []
viewing_shared_sessions = []
workflow_aliases = []
rect_selection = []
alacritty_settings_import = []
shared_with_me = []
Expand Down
6 changes: 1 addition & 5 deletions app/src/completer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,7 @@ impl SessionContext {
current_working_directory: TypedPathBuf,
#[allow(unused_variables)] ctx: &AppContext,
) -> Self {
let workflow_aliases = if FeatureFlag::WorkflowAliases.is_enabled() {
WorkflowAliases::as_ref(ctx).autocomplete_data(ctx)
} else {
Default::default()
};
let workflow_aliases = WorkflowAliases::as_ref(ctx).autocomplete_data(ctx);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] SessionContext::new is used by minimal unit-test apps that do not register WorkflowAliases; removing the flag guard makes every construction look up that singleton and will panic unless those callers register the settings group first.


cfg_if::cfg_if! {
if #[cfg(feature = "completions_v2")] {
Expand Down
2 changes: 0 additions & 2 deletions app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2622,8 +2622,6 @@ pub fn enabled_features() -> HashSet<FeatureFlag> {
FeatureFlag::MinimalistUI,
#[cfg(feature = "avatar_in_tab_bar")]
FeatureFlag::AvatarInTabBar,
#[cfg(feature = "workflow_aliases")]
FeatureFlag::WorkflowAliases,
#[cfg(feature = "ssh_drag_and_drop")]
FeatureFlag::SshDragAndDrop,
#[cfg(feature = "drag_tabs_to_windows")]
Expand Down
4 changes: 1 addition & 3 deletions app/src/server/telemetry/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5578,9 +5578,7 @@ impl TelemetryEventDesc for TelemetryEventDiscriminants {
Self::WorkflowAliasAdded
| Self::WorkflowAliasRemoved
| Self::WorkflowAliasArgumentEdited
| Self::WorkflowAliasEnvVarsAttached => {
EnablementState::Flag(FeatureFlag::WorkflowAliases)
}
| Self::WorkflowAliasEnvVarsAttached => EnablementState::Always,
Self::ToggledAgentModeAutoexecuteReadonlyCommandsSetting
| Self::ChangedAgentModeCodingPermissions
| Self::ChangedAgentModeAskUserQuestionPermission
Expand Down
2 changes: 1 addition & 1 deletion app/src/terminal/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12757,7 +12757,7 @@ impl Input {
ctx
);

if FeatureFlag::WorkflowAliases.is_enabled() {
{
let mut command_string = self.editor.as_ref(ctx).buffer_text(ctx);
// If the alias was inserted from the completions menu, it will have trailing
// whitespace - trim it in-place.
Expand Down
11 changes: 2 additions & 9 deletions app/src/workflows/workflow_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,9 +971,6 @@ impl WorkflowView {
}

fn are_aliases_dirty(&self, app: &AppContext) -> bool {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return false;
}
self.alias_bar.as_ref(app).has_unsaved_changes()
}

Expand Down Expand Up @@ -1186,10 +1183,6 @@ impl WorkflowView {
}

fn handle_alias_bar_event(&mut self, event: &AliasBarEvent, ctx: &mut ViewContext<Self>) {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return;
}

match event {
AliasBarEvent::SelectedAliasChanged => {
// Clone the arguments so that we can update the argument editors.
Expand Down Expand Up @@ -1582,7 +1575,7 @@ impl WorkflowView {
/// Save the workflow and associated state. This makes a best-effort attempt to not
/// unnecessarily modify the backing Warp Drive object.
fn save(&mut self, ctx: &mut ViewContext<Self>) {
if FeatureFlag::WorkflowAliases.is_enabled() && self.are_aliases_dirty(ctx) {
if self.are_aliases_dirty(ctx) {
self.save_aliases(ctx);
}
if self.is_workflow_dirty(ctx) {
Expand Down Expand Up @@ -2947,7 +2940,7 @@ impl View for WorkflowView {
let mut main_section = Flex::column();
main_section.add_child(self.render_workflow_details(appearance));

if FeatureFlag::WorkflowAliases.is_enabled() && !self.is_for_agent_mode {
if !self.is_for_agent_mode {
main_section.add_child(self.render_alias_section(appearance));
}

Expand Down
29 changes: 3 additions & 26 deletions app/src/workflows/workflow_view/alias_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ use std::{cmp::Ordering, collections::HashMap};

use anyhow::Error;
use pathfinder_geometry::vector::vec2f;
use warp_core::{
features::FeatureFlag,
ui::{
appearance::Appearance,
theme::{color::internal_colors::neutral_4, Fill},
},
use warp_core::ui::{
appearance::Appearance,
theme::{color::internal_colors::neutral_4, Fill},
};
use warpui::{
elements::{
Expand Down Expand Up @@ -270,10 +267,6 @@ impl AliasBar {
}

fn select_alias(&mut self, index: usize, ctx: &mut ViewContext<Self>) {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return;
}

if index >= self.aliases.len() {
return;
}
Expand All @@ -282,18 +275,10 @@ impl AliasBar {
}

fn deselect_alias(&mut self, ctx: &mut ViewContext<Self>) {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return;
}

self.set_selected_alias(None, ctx);
}

fn add_alias(&mut self, ctx: &mut ViewContext<Self>) {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return;
}

self.renaming_alias = Some(self.aliases.len());
self.set_selected_alias(self.renaming_alias, ctx);
self.name_editor
Expand All @@ -314,10 +299,6 @@ impl AliasBar {
}

fn remove_alias(&mut self, index: usize, ctx: &mut ViewContext<Self>) {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return;
}

let removed = self.aliases.remove(index);
self.deleted_aliases.push(removed.alias_name.clone());
if let Some(selected_index) = &mut self.selected_alias {
Expand Down Expand Up @@ -345,10 +326,6 @@ impl AliasBar {
}

fn rename_alias(&mut self, index: usize, ctx: &mut ViewContext<Self>) {
if !FeatureFlag::WorkflowAliases.is_enabled() {
return;
}

if let Some(alias) = self.aliases.get(index) {
self.deleted_aliases.push(alias.alias_name.clone());
self.name_editor.update(ctx, |editor, ctx| {
Expand Down
10 changes: 4 additions & 6 deletions app/src/workflows/workflow_view/argument_editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,12 +547,10 @@ impl WorkflowView {
}
}

if FeatureFlag::WorkflowAliases.is_enabled()
&& matches!(
mode,
ArgumentEditorMode::WorkflowDefinition | ArgumentEditorMode::Alias
)
&& !self.is_for_agent_mode
if matches!(
mode,
ArgumentEditorMode::WorkflowDefinition | ArgumentEditorMode::Alias
) && !self.is_for_agent_mode
{
arguments_section.add_child(self.render_env_vars_selector(appearance, app));
}
Expand Down
3 changes: 0 additions & 3 deletions crates/warp_features/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ pub enum FeatureFlag {
/// Adds avatar to the tab bar.
AvatarInTabBar,

/// Adds aliases for executing Warp Drive workflows.
WorkflowAliases,

SshDragAndDrop,
DragTabsToWindows,

Expand Down
Loading