Skip to content

Commit e767719

Browse files
fix(mobile): do not hold Start behind a failed clone subscription
Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent bc57a9f commit e767719

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/mobile/src/state/projectClones.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ const environmentProjectClonesAtom = Atom.family((environmentId: EnvironmentId)
2828
const config = get(serverEnvironment.configValueAtom(environmentId));
2929
if (config?.environment.capabilities.projectCloneTracking !== true) return EMPTY_CLONES;
3030
const result = get(sourceControlEnvironment.projectClones({ environmentId, input: {} }));
31+
// A failed subscription must not hold Start forever. Treating it as
32+
// "no clone tracked" lets the server's own dispatch guard decide; the
33+
// registry re-establishes the stream on reconnect.
34+
if (result._tag === "Failure") return EMPTY_CLONES;
3135
return Option.getOrElse(AsyncResult.value(result), () => "pending" as const);
3236
}).pipe(Atom.withLabel(`mobile-project-clones:${environmentId}`)),
3337
);

0 commit comments

Comments
 (0)