From 0085518dc842d80797b7f7b2ecae8ec8c5148299 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 7c2b7c2e..71b04162 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -2432,8 +2432,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)