- Replace fire-and-forget `Effect.runPromise` call with `Effect.forkScoped` - Keep checkout responsive while tying upstream refresh to scoped effect management
Unified · Split
| @@ -1167,11 +1167,9 @@ const makeGitCore = Effect.gen(function* () { · 1166 unmodified lines | |||
| 1167 | }); | 1167 | }); |
| 1168 | 1168 | ||
| 1169 | // Refresh upstream refs in the background so checkout remains responsive. | 1169 | // Refresh upstream refs in the background so checkout remains responsive. |
| 1170 | yield* Effect.sync(() => { | 1170 | yield* Effect.forkScoped( |
| 1171 | void Effect.runPromise( | 1171 | refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.catch(() => Effect.void)), |
| 1172 | refreshCheckedOutBranchUpstream(input.cwd).pipe(Effect.catch(() => Effect.void)), | 1172 | ); |
| 1173 | ); | ||
| 1174 | }); | ||
| 1175 | }); | 1173 | }); |
| 1176 | 1174 | ||
| 1177 | const initRepo: GitCoreShape["initRepo"] = (input) => | 1175 | const initRepo: GitCoreShape["initRepo"] = (input) => |