From 235250bbb32b04b81190e16c14c0132079576541 Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:26:59 +0530 Subject: [PATCH] removed default tab --- apps/x/apps/renderer/src/App.tsx | 28 ++++--------- .../src/components/sidebar-content.tsx | 39 +++++++++++++------ 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index 71b04162..ba12e122 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -2408,19 +2408,7 @@ function App() { handleNewChatTab() }, onSelectRun: (runIdToLoad) => { - // If it's already the active tab's run, do nothing - const activeTab = openTabs.find(t => t.id === activeTabId) - if (activeTab?.runId === runIdToLoad) { - // Just ensure we're in chat view - if (selectedPath || isGraphOpen || selectedBackgroundTask) { - setSelectedPath(null) - setIsGraphOpen(false) - setExpandedFrom(null) - setSelectedBackgroundTask(null) - } - return - } - // If already open in another tab, switch to it + // If already open in a tab, switch to that tab const existingTab = openTabs.find(t => t.runId === runIdToLoad) if (existingTab) { switchToTab(existingTab.id) @@ -2432,14 +2420,12 @@ function App() { } return } - // If active tab is empty (new chat with no run), reuse it - if (activeTab && !activeTab.runId) { - setOpenTabs(prev => prev.map(t => t.id === activeTabId ? { ...t, runId: runIdToLoad } : t)) - loadRun(runIdToLoad) - } else { - // Open in a new tab - openInNewTab(runIdToLoad) - } + // Navigate current tab to this run + setOpenTabs(prev => prev.map(t => t.id === activeTabId ? { ...t, runId: runIdToLoad } : t)) + void navigateToView({ type: 'chat', runId: runIdToLoad }) + }, + onOpenInNewTab: (targetRunId) => { + openInNewTab(targetRunId) if (selectedPath || isGraphOpen || selectedBackgroundTask) { setSelectedPath(null) setIsGraphOpen(false) diff --git a/apps/x/apps/renderer/src/components/sidebar-content.tsx b/apps/x/apps/renderer/src/components/sidebar-content.tsx index 5906f4d5..7be37308 100644 --- a/apps/x/apps/renderer/src/components/sidebar-content.tsx +++ b/apps/x/apps/renderer/src/components/sidebar-content.tsx @@ -8,6 +8,7 @@ import { ChevronsDownUp, ChevronsUpDown, Copy, + ExternalLink, FilePlus, FolderPlus, AlertTriangle, @@ -149,6 +150,7 @@ type TasksActions = { onNewChat: () => void onSelectRun: (runId: string) => void onDeleteRun: (runId: string) => void + onOpenInNewTab?: (runId: string) => void onSelectBackgroundTask?: (taskName: string) => void } @@ -1178,17 +1180,32 @@ function TasksSection({ ) : null} {!processingRunIds?.has(run.id) && ( - +