From 5d52fffbc82280329bfdbeff4735fef2a9a45693 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Sat, 20 Dec 2025 19:27:24 -0800 Subject: [PATCH] fix(desktop): allow creating multiple terminal tabs per workspace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the idempotency check in addTab that was preventing users from creating new terminal tabs when one already existed for the workspace. This was introduced in b2ecbc38 and caused the "New Terminal" button to only activate existing tabs instead of creating new ones. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../desktop/src/renderer/stores/tabs/store.ts | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/apps/desktop/src/renderer/stores/tabs/store.ts b/apps/desktop/src/renderer/stores/tabs/store.ts index c0d4683e3df..c099a0de0b5 100644 --- a/apps/desktop/src/renderer/stores/tabs/store.ts +++ b/apps/desktop/src/renderer/stores/tabs/store.ts @@ -83,29 +83,6 @@ export const useTabsStore = create()( addTab: (workspaceId, options?: CreatePaneOptions) => { const state = get(); - // Idempotency check: if a tab already exists for this workspace, just activate it - const existingTab = state.tabs.find( - (t) => t.workspaceId === workspaceId, - ); - if (existingTab) { - const paneId = - state.focusedPaneIds[existingTab.id] ?? - getFirstPaneId(existingTab.layout); - - set({ - activeTabIds: { - ...state.activeTabIds, - [workspaceId]: existingTab.id, - }, - focusedPaneIds: { - ...state.focusedPaneIds, - [existingTab.id]: paneId, - }, - }); - - return { tabId: existingTab.id, paneId }; - } - const { tab, pane } = createTabWithPane( workspaceId, state.tabs,