From 4c81d60dc703ae8a3c8ad1eaa1befd1fa5d9f538 Mon Sep 17 00:00:00 2001 From: nitin <142569587+ehconitin@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:47:12 +0530 Subject: [PATCH] Fix workflow run tab not displaying when navigating from side panel to full page (#12531) closes https://github.com/twentyhq/core-team-issues/issues/1076 ## Problem When opening a workflow run in the side panel and then navigating to the full page view, the workflow visualizer tab wouldn't display until the page was refreshed. ## Root Cause - In the side panel, tabs are merged into a single "home" tab - When navigating to full page, the activeTabId state persisted as "home" - But the full page view only has a "workflowRun"(flow) tab, not "home" - TabList was trying to display a non-existent tab, resulting in blank content ## Solution Added validation in TabList to check if activeTabId exists in visibleTabs. If not, it falls back to the first available tab. --- .../src/modules/ui/layout/tab-list/components/TabList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx index f6def366d..c985de3bb 100644 --- a/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx +++ b/packages/twenty-front/src/modules/ui/layout/tab-list/components/TabList.tsx @@ -71,7 +71,8 @@ export const TabList = ({ const [containerWidth, setContainerWidth] = useState(0); const [moreButtonWidth, setMoreButtonWidth] = useState(0); - const initialActiveTabId = activeTabId || visibleTabs[0]?.id || ''; + const activeTabExists = visibleTabs.some((tab) => tab.id === activeTabId); + const initialActiveTabId = activeTabExists ? activeTabId : visibleTabs[0]?.id; const visibleTabCount = useMemo(() => { return calculateVisibleTabCount({