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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user