From 5b06992e055a8a30c2b3f1cf746cbd2c9b099061 Mon Sep 17 00:00:00 2001 From: Anso Date: Tue, 7 Apr 2026 01:44:28 -0400 Subject: [PATCH] fix(nav): remove toggle behavior on navigation tabs (#417) Clicking an already-active navigation tab previously toggled back to the dashboard/editor view. This was a holdover from the old UI where the tab buttons were different. Under the current design it causes confusion, so clicking the active tab now does nothing. --- frontend/src/components/EditorLayout.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/EditorLayout.tsx b/frontend/src/components/EditorLayout.tsx index 436b4fc6..073972c3 100644 --- a/frontend/src/components/EditorLayout.tsx +++ b/frontend/src/components/EditorLayout.tsx @@ -249,12 +249,9 @@ export default function EditorLayout() { setIsEditing(false); }; - // Navigation handler with toggle support const handleNavigate = (value: string) => { - if (value === activeView) { - // Toggle off: return to editor if a file is open, else dashboard - setActiveView(selectedFile ? 'editor' : 'dashboard'); - } else if (value === 'dashboard') { + if (value === activeView) return; + if (value === 'dashboard') { resetEditorState(); setActiveView('dashboard'); } else {