fix(repomap): clear stuck "waiting for soul map" semantic stub

- post-scan semantic/cache task could reject and strand /repo-map on the "waiting for soul map..." stub
- wrap in try/catch; on failure reset semantic status to off when still showing the stub

Co-Authored-By: SoulForge <[email protected]>
This commit is contained in:
PouiiroandSoulForge committed 2026-06-04 22:25:49 +01:00
1 parent c89d1e9f72
commit be3c1095cc
1 file changed
+16 -1
+16 -1
View File
@@ -395,7 +395,22 @@ export class ContextManager {
this.setSemanticSummaries(persisted === "off" ? "ast" : persisted),
);
}
await Promise.all([semanticTask, this.warmRepoMapCache()]);
try {
await Promise.all([semanticTask, this.warmRepoMapCache()]);
} catch (e) {
// A failed semantic/cache task must not strand the UI on the
// "waiting for soul map..." stub. Surface the error and reset the
// semantic status so /repo-map doesn't show a frozen "generating".
logBackgroundError(
"context-manager",
`post-scan semantic/cache task failed: ${e instanceof Error ? e.message : String(e)}`,
);
const store = useRepoMapStore.getState();
if (store.semanticProgress.includes("waiting for soul map")) {
store.setSemanticStatus("off");
store.setSemanticProgress("");
}
}
} else {
this.repoMapReady = false;
this.syncRepoMapStore("error");