fix(web): keep disconnected environments from blocking the index landing

Signed-off-by: Yordis Prieto <[email protected]>
This commit is contained in:
Yordis Prieto committed 2026-07-16 13:37:44 -04:00
1 parent 360969126e
commit e69bab69b3
1 file changed
+12 -1
+12 -1
View File
@@ -1,3 +1,7 @@
import {
AVAILABLE_CONNECTION_STATE,
connectionProjectionPhase,
} from "@t3tools/client-runtime/connection";
import {
createEnvironmentShellAtoms,
createEnvironmentShellSummaryAtom,
@@ -24,7 +28,14 @@ export const allEnvironmentShellsBootstrappedAtom = Atom.make((get) => {
return false;
}
for (const environmentId of catalog.value.entries.keys()) {
if (Option.isNone(get(environmentShell.stateValueAtom(environmentId)).snapshot)) {
if (Option.isSome(get(environmentShell.stateValueAtom(environmentId)).snapshot)) {
continue;
}
const connection = Option.getOrElse(
AsyncResult.value(get(environmentCatalog.stateAtom(environmentId))),
() => AVAILABLE_CONNECTION_STATE,
);
if (connectionProjectionPhase(connection) !== "disconnected") {
return false;
}
}