From 47b8544ba889a1357f6578469d2163bbd438ab00 Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Fri, 11 Sep 2026 23:03:55 +0200 Subject: [PATCH] fix(workspace): don't auto-open repo when switching to Management view When switching workspaces, skip calling openRepo if the current activeView is "management". Previously a session.activePath would be opened even when the user was on the Management/dashboard view, causing an unwanted navigate-away. Now a keepDashboard flag prevents openRepo from running in that case, preserving the dashboard state. --- src/App.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.svelte b/src/App.svelte index 70d5ca1..3cc760a 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1697,6 +1697,7 @@ async function switchWorkspace(id: string) { if (isBusy || id === workspaceState.selectedId) return; + const keepDashboard = activeView === "management"; persistWorkspaces(); repoOpenRequestId += 1; closeRepoTabContextMenu(); @@ -1706,7 +1707,7 @@ repoTabs = session.openPaths.map(path => repoRowFromPath(path)); activeView = "management"; persistRepoLists(); - if (session.activePath) await openRepo(session.activePath); + if (!keepDashboard && session.activePath) await openRepo(session.activePath); } async function saveWorkspace(id: string, name: string, repositories: string[]) {