Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): repository rows in thread details open their diff #40346

OpenGuria(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/40346/headopened View on GitHub

Showing 14 changed files with 21 additions and 1 deletion (loading 11).

x
0 of 14 viewed, 14 left
17 additions and 0 deletionsapps/server/src/vcs/VcsStatusBroadcaster.test.tsModified
View file
@@ -1541,6 +1541,23 @@
true,
false,
+​
+ // A repository row asks for totals without retaining the remote refresh loop.
+ const remoteCalls = state.remoteStatusCalls;
+ const rowEvents = yield* Queue.unbounded<VcsStatusStreamEvent>();
+ yield* broadcaster
+ .streamStatus({ cwd: "/repo", includeRemote: false, includeBranchChanges: true })
+ .pipe(
+ Stream.runForEach((event) => Queue.offer(rowEvents, event)),
+ Effect.forkScoped,
+ );
+ const rowSnapshot = yield* Queue.take(rowEvents);
+ assert.strictEqual(rowSnapshot._tag, "snapshot");
+ if (rowSnapshot._tag === "snapshot") {
+ assert.deepStrictEqual(rowSnapshot.local.branchChanges, branchChanges);
+ }
+ yield* TestClock.adjust("30 seconds");
+ assert.equal(state.remoteStatusCalls, remoteCalls);
}).pipe(Effect.provide(layerTestFor(state)), Effect.scoped);
3 additions and 1 deletionapps/server/src/vcs/VcsStatusBroadcaster.tsModified
View file
@@ -1321,7 +1321,9 @@
else detailedSubscribers.set(cwd, remaining);