From 2b4d6ef4984ddf828d4d92b8bd3804ce8d1f612e Mon Sep 17 00:00:00 2001 From: NKAntony777 <2212222@mail.nankai.edu.cn> Date: Thu, 11 Jun 2026 15:42:17 +0800 Subject: [PATCH] fix(desktop): remove duplicate '+' button in TabBar Remove the redundant '+' (new session) button from the TabBar component. The sidebar already has a prominent 'New Session' button, making the TabBar's small '+' button unnecessary and confusing. Fixes #3933 --- desktop/frontend/src/App.tsx | 1 - desktop/frontend/src/components/TabBar.tsx | 11 ++--------- desktop/frontend/src/locales/en.ts | 2 +- desktop/frontend/src/locales/zh.ts | 2 +- desktop/frontend/src/styles.css | 19 ------------------- 5 files changed, 4 insertions(+), 31 deletions(-) diff --git a/desktop/frontend/src/App.tsx b/desktop/frontend/src/App.tsx index 66dae8311..c99d567dd 100644 --- a/desktop/frontend/src/App.tsx +++ b/desktop/frontend/src/App.tsx @@ -1467,7 +1467,6 @@ export default function App() { onTabClose={(id) => void handleTabClose(id)} onTabsClose={(ids, nextActiveTabId) => void handleTabsClose(ids, nextActiveTabId)} onTabsReorder={(ids) => void handleTabsReorder(ids)} - onNewTab={() => void handleNewTab()} /> {!workspacePanelMaximized && ( void; onTabsClose: (tabIds: string[], nextActiveTabId?: string) => void; onTabsReorder: (tabIds: string[]) => void; - onNewTab: () => void; revealActiveSignal?: number; } @@ -50,7 +48,7 @@ function projectAccentStyle(color?: string): CSSProperties | undefined { return { "--project-accent": value } as CSSProperties; } -export function TabBar({ tabs, activeTabId, onTabChange, onTabClose, onTabsClose, onTabsReorder, onNewTab, revealActiveSignal = 0 }: TabBarProps) { +export function TabBar({ tabs, activeTabId, onTabChange, onTabClose, onTabsClose, onTabsReorder, revealActiveSignal = 0 }: TabBarProps) { const t = useT(); const [draggingTabId, setDraggingTabId] = useState(null); const [dropTarget, setDropTarget] = useState<{ id: string; side: DropSide } | null>(null); @@ -250,11 +248,6 @@ export function TabBar({ tabs, activeTabId, onTabChange, onTabClose, onTabsClose ); })} - - - = { "tabBar.closeTab": "关闭标签页", "tabBar.closeOtherTabs": "关闭其他标签页", "tabBar.closeTabsToRight": "关闭右侧标签页", - "tabBar.newSession": "新建会话", + "tabBar.tabActions": "标签页操作", // 侧边栏 diff --git a/desktop/frontend/src/styles.css b/desktop/frontend/src/styles.css index 068009e09..e6e0e64e0 100644 --- a/desktop/frontend/src/styles.css +++ b/desktop/frontend/src/styles.css @@ -9478,25 +9478,6 @@ a[href] { color: var(--fg); } -.tabbar__new { - flex: 0 0 auto; - width: 30px; - height: 30px; - display: flex; - align-items: center; - justify-content: center; - margin-left: 1px; - border: none; - border-radius: 7px; - background: transparent; - color: var(--fg-dim); -} - -.tabbar__new:hover { - background: var(--button-bg); - color: var(--fg); -} - .project-tree { --project-tree-action-column: 36px; --project-tree-edge-gap: 6px;