fix: bootstrap registry on first workspace list

This commit is contained in:
2026-08-05 16:49:56 +02:00
parent b93f13e39e
commit 840db9bd4f
3 changed files with 49 additions and 0 deletions
+6
View File
@@ -155,6 +155,12 @@ export class WorkspaceRegistry {
}
async list(): Promise<WorkspaceRevision[]> {
const active = await this.tryActiveState();
if (active) return active.revisions;
// A clean installation has no active snapshot until the first registry operation. Keep
// this lazy so health/startup remain available when Git is temporarily unreachable, while
// still refusing corrupted existing state (tryActiveState throws instead of returning none).
await this.bootstrap();
return (await this.activeState()).revisions;
}