fix(workspace): don't auto-open repo when switching to Management view
publish / Build and publish Ubuntu AppImage (release) Successful in 9m28s
publish / Build and publish Windows installer (release) Successful in 14m11s
publish / Build and publish AUR packages (release) Successful in 19m42s

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.
This commit is contained in:
2026-09-11 23:03:55 +02:00
parent 385b6304fa
commit 47b8544ba8
+2 -1
View File
@@ -1697,6 +1697,7 @@
async function switchWorkspace(id: string) { async function switchWorkspace(id: string) {
if (isBusy || id === workspaceState.selectedId) return; if (isBusy || id === workspaceState.selectedId) return;
const keepDashboard = activeView === "management";
persistWorkspaces(); persistWorkspaces();
repoOpenRequestId += 1; repoOpenRequestId += 1;
closeRepoTabContextMenu(); closeRepoTabContextMenu();
@@ -1706,7 +1707,7 @@
repoTabs = session.openPaths.map(path => repoRowFromPath(path)); repoTabs = session.openPaths.map(path => repoRowFromPath(path));
activeView = "management"; activeView = "management";
persistRepoLists(); 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[]) { async function saveWorkspace(id: string, name: string, repositories: string[]) {