Keep the active project when switching workspace hosts (#3051)

* fix(app): preserve projects across host switches

New workspace entry context retained only a host-local placement, so switching hosts could replace the selected project with the destination's first project. Hydrate that placement against canonical project identity while keeping exact clone placement separate.

* fix(app): preserve manual project choice during hydration

Keep the raw route placement key as stable selection context while hydrating the routed project to its canonical identity.
This commit is contained in:
Mohamed Boudra
2026-08-09 00:51:07 +02:00
committed by GitHub
parent ce7b3a90c0
commit 8f38d04919
6 changed files with 175 additions and 5 deletions
@@ -71,7 +71,7 @@ export function hostProjectFromWorkspace(input: {
serverId: input.serverId,
projectId,
}),
projectKey: null,
projectKey: input.workspace.project?.projectKey ?? null,
projectName: input.workspace.projectDisplayName || projectId,
projectKind: input.workspace.projectKind,
iconWorkingDir,