authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-28 22:25:11-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-03-01 20:06:21-08:00
logc91b79b6e2e6a77bd44a301689e995288f080a79
tree7dd608b1a0e631ac928706a2404b7c879c58b1d1
parent5e55aa387f4d33209f55dc6ec00cb590ae7cbc2a

Scope upstream refresh in checkout effect lifecycle

- Replace fire-and-forget `Effect.runPromise` call with `Effect.forkScoped` - Keep checkout responsive while tying upstream refresh to scoped effect management

1 files changed, 3 insertions(+), 5 deletions(-)

apps/server/src/git/Layers/GitCore.ts+3-5
......@@ -1167,11 +1167,9 @@ const makeGitCore = Effect.gen(function* () {
11671167 });
11681168
11691169 // Refresh upstream refs in the background so checkout remains responsive.
1170 yield* Effect.sync(() => {
1171 void Effect.runPromise(
1172 refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.catch(() => Effect.void)),
1173 );
1174 });
1170 yield* Effect.forkScoped(
1171 refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.catch(() => Effect.void)),
1172 );
11751173 });
11761174
11771175 const initRepo: GitCoreShape["initRepo"] = (input) =>