From 40a3b02a8c9189844b5a962e94dc8ce73e99bb8c Mon Sep 17 00:00:00 2001 From: Arjun <6592213+arkml@users.noreply.github.com> Date: Tue, 17 Feb 2026 12:10:45 +0530 Subject: [PATCH] new chat doesnt have a tab --- apps/x/apps/renderer/src/App.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index 1e8ab581..e9177e9b 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -2448,8 +2448,14 @@ function App() { } return } - // Open in a new tab - openInNewTab(runIdToLoad) + // 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) + } if (selectedPath || isGraphOpen || selectedBackgroundTask) { setSelectedPath(null) setIsGraphOpen(false)