From 3f120e438d6c57f2b7f1e61e2585a0c3133c5845 Mon Sep 17 00:00:00 2001 From: Edward Shao <92406694+exzshao@users.noreply.github.com> Date: Tue, 28 Apr 2026 12:13:46 -0400 Subject: [PATCH] [WAR-7381] Move "Discard all" to end of code review overflow menu (#9236) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Moves the "Discard all" menu item to the last position in `header_menu_items_new`, so it appears after the AI context and comment items. This matches the intended UX ordering from [WAR-7381](https://linear.app/warpdotdev/issue/WAR-7381/discard-all-should-be-the-last-item-in-the-list). ## Testing Manually verified the ordering logic. No new tests needed — this is a pure reordering of existing menu items with no behavioral changes. ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode Co-Authored-By: Oz Co-authored-by: Oz --- app/src/code_review/code_review_view.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/code_review/code_review_view.rs b/app/src/code_review/code_review_view.rs index 93e4e193..11f834d4 100644 --- a/app/src/code_review/code_review_view.rs +++ b/app/src/code_review/code_review_view.rs @@ -7025,15 +7025,6 @@ impl CodeReviewView { let has_changes = matches!(self.state(), CodeReviewViewState::Loaded(loaded) if !loaded.to_diff_stats().has_no_changes()); - if FeatureFlag::DiscardPerFileAndAllChanges.is_enabled() && has_changes { - items.push( - MenuItemFields::new("Discard all") - .with_icon(Icon::ReverseLeft) - .with_on_select_action(CodeReviewAction::ShowDiscardConfirmDialog(None)) - .into_item(), - ); - } - let is_ai_enabled = AISettings::as_ref(ctx).is_any_ai_enabled(ctx); if is_ai_enabled && FeatureFlag::DiffSetAsContext.is_enabled() && has_changes { items.push( @@ -7060,6 +7051,15 @@ impl CodeReviewView { ); } + if FeatureFlag::DiscardPerFileAndAllChanges.is_enabled() && has_changes { + items.push( + MenuItemFields::new("Discard all") + .with_icon(Icon::ReverseLeft) + .with_on_select_action(CodeReviewAction::ShowDiscardConfirmDialog(None)) + .into_item(), + ); + } + items }