fix(app): preserve active host connection choices (#2905)

Settings lost the workspace host when entering the app-wide route, while desktop bootstrap could restore a removed local connection before the saved registry was ready. Use the remembered workspace host for Settings and only register the managed daemon when its server is unknown after registry hydration.
This commit is contained in:
Mohamed Boudra
2026-08-05 20:26:41 +02:00
committed by GitHub
parent 781274ed1a
commit 48bdc5610f
8 changed files with 193 additions and 32 deletions
+5 -6
View File
@@ -1358,7 +1358,7 @@ export class HostRuntimeStore {
private queuedAgentDrainInFlight = new Set<string>();
private directorySyncByServer = new Map<string, DirectorySync>();
private configuredOverrideBootstrapInFlight: Promise<void> | null = null;
private bootStarted = false;
private bootPromise: Promise<void> | null = null;
private storage: HostRuntimeStorage;
private replicaCache: ReplicaCache;
@@ -1393,12 +1393,11 @@ export class HostRuntimeStore {
return this.hostRegistryLoaded;
}
boot(): void {
if (this.bootStarted) {
return;
boot(): Promise<void> {
if (!this.bootPromise) {
this.bootPromise = this.runBoot();
}
this.bootStarted = true;
void this.runBoot();
return this.bootPromise;
}
private async runBoot(): Promise<void> {