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 @@ -578,7 +578,6 @@ default = [
"code_launch_modal",
"allow_ignoring_input_suggestions",
"mcp_oauth",
"expand_edit_to_pane",
"fallback_model_load_output_messaging",
"api_key_management",
"summarization_cancellation_confirmation",
Expand Down Expand Up @@ -921,7 +920,6 @@ conversation_filter = []
ai_context_menu_commands = []
preview_channel = []
ai_context_menu_code = []
expand_edit_to_pane = []
fallback_model_load_output_messaging = []
profiles_design_revamp = []
search_codebase_ui = []
Expand Down
2 changes: 0 additions & 2 deletions app/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ fn enabled_features() -> HashSet<FeatureFlag> {
FeatureFlag::AIContextMenuCommands,
#[cfg(feature = "ai_context_menu_code")]
FeatureFlag::AIContextMenuCode,
#[cfg(feature = "expand_edit_to_pane")]
FeatureFlag::ExpandEditToPane,
#[cfg(feature = "fallback_model_load_output_messaging")]
FeatureFlag::FallbackModelLoadOutputMessaging,
#[cfg(feature = "tab_close_button_on_left")]
Expand Down
28 changes: 10 additions & 18 deletions app/src/workspace/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8894,7 +8894,7 @@ impl Workspace {
}
}

/// Open a code diff view by temporarily replacing the current pane or in a new tab.
/// Open a code diff view by temporarily replacing the current pane.
fn open_code_diff(&mut self, view: ViewHandle<CodeDiffView>, ctx: &mut ViewContext<Self>) {
let focused_pane_id = self
.active_tab_pane_group()
Expand All @@ -8904,23 +8904,15 @@ impl Workspace {
view.set_original_pane_id(Some(focused_pane_id));
});

// Check if the ExpandEditToPane feature flag is enabled
if FeatureFlag::ExpandEditToPane.is_enabled() {
// Try to temporarily replace the current pane with the diff view
let new_pane = CodeDiffPane::from_view(view.clone(), ctx);
self.active_tab_pane_group().update(ctx, |pane_group, ctx| {
if !pane_group.replace_pane(focused_pane_id, new_pane, true, ctx) {
// If replacement failed, remove the pane we just added and fall back
//pane_group.close_pane(new_pane_id, ctx);
log::warn!("Failed to temporarily replace pane, falling back to new tab");
}
});
} else {
// Feature flag disabled: use the original behavior of opening in a new tab
let new_pane = CodeDiffPane::from_view(view, ctx);
let (new_idx, group_id) = self.new_tab_index_and_group(ctx);
self.add_tab_from_existing_pane(Box::new(new_pane), new_idx, group_id, ctx);
}
// Try to temporarily replace the current pane with the diff view

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] For this user-facing change, please include screenshots or a screen recording demonstrating the code diff opening in the current pane end to end.

let new_pane = CodeDiffPane::from_view(view, ctx);
self.active_tab_pane_group().update(ctx, |pane_group, ctx| {
if !pane_group.replace_pane(focused_pane_id, new_pane, true, ctx) {
// If replacement failed, remove the pane we just added and fall back
//pane_group.close_pane(new_pane_id, ctx);
log::warn!("Failed to temporarily replace pane, falling back to new tab");

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.

💡 [SUGGESTION] This message no longer matches the behavior because the new-tab fallback was removed.

Suggested change
log::warn!("Failed to temporarily replace pane, falling back to new tab");
log::warn!("Failed to temporarily replace pane with code diff view");

}
});
}

/// Open the AI Fact Collection pane in a split pane (default direction is left).
Expand Down
2 changes: 0 additions & 2 deletions crates/warp_features/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ pub enum FeatureFlag {
/// Enables Warp Drive objects (like workflows) as context in AI context menu
DriveObjectsAsContext,

/// Expands code diff edits to replace the current pane instead of opening in a new tab.
ExpandEditToPane,
/// Enables fallback model load output messaging in the warping indicator.
FallbackModelLoadOutputMessaging,

Expand Down
Loading