From b35630156738a448dc389099da26b446c339629b Mon Sep 17 00:00:00 2001 From: Max Hsu Date: Sun, 10 May 2026 13:03:23 +0800 Subject: [PATCH] fix(workspace): widen unified new-session menu so "New worktree config" fits (#10269) The unified new-session/tab config menu rendered the same items in both horizontal and vertical tab modes, but only the vertical-tabs branch set the width to 268px (the OptionMenuItem Figma spec); the horizontal branch fell back to MENU_DEFAULT_WIDTH = 186px, which is too narrow for the "New worktree config" label and clipped it at the right edge. Apply the same 268px width in the horizontal branch. The MENU_DEFAULT_WIDTH import is no longer needed and is removed. --- app/src/workspace/view.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/workspace/view.rs b/app/src/workspace/view.rs index 1af337853b..3f09c58f78 100644 --- a/app/src/workspace/view.rs +++ b/app/src/workspace/view.rs @@ -253,10 +253,7 @@ use crate::drive::{ CloudObjectTypeAndId, DriveObjectType, DrivePanel, DrivePanelEvent, OpenWarpDriveObjectSettings, }; use crate::experiments::{BlockOnboarding, Experiment}; -use crate::menu::{ - Event as MenuEvent, Menu, MenuItem, MenuItemFields, MenuSelectionSource, - DEFAULT_WIDTH as MENU_DEFAULT_WIDTH, -}; +use crate::menu::{Event as MenuEvent, Menu, MenuItem, MenuItemFields, MenuSelectionSource}; use crate::modal::{Modal, ModalEvent, ModalViewState}; use crate::network::{NetworkStatus, NetworkStatusEvent}; use crate::notebooks::manager::{NotebookManager, NotebookSource}; @@ -6316,7 +6313,10 @@ impl Workspace { // Match the Figma mock width (OptionMenuItem component is 268px). context_menu.set_width(268.); } else { - context_menu.set_width(MENU_DEFAULT_WIDTH); + // Horizontal variant renders the same items, so it needs the + // same 268px to avoid clipping "New worktree config" — the + // global MENU_DEFAULT_WIDTH (186px) was too narrow. See #10269. + context_menu.set_width(268.); } context_menu.set_items(menu_items, view_ctx); match open_source {