@devries-cameron20 / t3code Mirror · read-only / commits / 7e1a05808a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 17:15 UTC

test(server): terminal checkout test waits for the refresh's last event (#36071)

Julius Marminge committed Nov 13, 2026 at 00:11 UTC 7e1a05808aaf5df39fe9d20cc5c3603f3978696a
1 file changed +5 -2
apps/server/src/vcs/VcsStatusBroadcaster.test.ts
+5 -2
@@ -1360,7 +1360,10 @@ describe("VcsStatusBroadcaster", () => {
1360 const next = applyGitStatusStreamEvent(clientStates.at(-1) ?? null, event);
1361 clientStates.push(next);
1362 yield* Deferred.succeed(subscribed, undefined);
1363 - if (next.refName === "repro") yield* Deferred.succeed(checkedOut, undefined);
1363 + // The refresh ends with the new branch's remote, after its local update.
1364 + if (event._tag === "remoteUpdated" && event.remote && next.refName === "repro") {
1365 + yield* Deferred.succeed(checkedOut, undefined);
1366 + }
1367 }),
1368 ).pipe(Effect.forkScoped);
1369 yield* Deferred.await(subscribed);
@@ -1375,7 +1378,7 @@ describe("VcsStatusBroadcaster", () => {
1378
1379 assert.deepStrictEqual(
1380 clientStates.filter((status) => status.refName === "repro").map((status) => status.pr),
1378 - [null],
1381 + [null, null],
1382 );
1383 // A checkout must not trigger a network fetch.
1384 assert.deepStrictEqual(state.remoteStatusRefreshUpstreamValues.slice(1), [false]);