Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): load selected diff metadata before file patches #30567

MergedYash-Singh1(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/30567/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 10 changed files with 115 additions and 1 deletion (loading 9).

x
0 of 10 viewed, 10 left
115 additions and 1 deletionapps/server/src/vcs/GitVcsDriverCore.test.tsModified
View file
@@ -2170,6 +2170,14 @@
.sources[0]!;
assert.equal(rootSource.baseRef, emptyTree);
assert.include(rootSource.diff, "+# test");
+ const rootMetadata = (yield* driver.getReviewDiffPreview({
+ cwd: upstream,
+ commitSha: root,
+ metadataOnly: true,
+ })).sources[0]!;
+ assert.deepStrictEqual(rootMetadata.files, rootSource.files);
+ assert.isTrue(rootMetadata.patchesDeferred);
+ assert.isEmpty(rootMetadata.diff);
yield* writeTextFile(upstream, "README.md", "# boundary\n");
yield* git(upstream, ["commit", "-am", "boundary"]);
@@ -2396,6 +2404,78 @@
+ it.effect(
+ "returns an incomplete selected tracked preview while untracked discovery is held",
+ () =>
+ Effect.gen(function* () {
+ const cwd = yield* makeTmpDir();
+ yield* initRepoWithCommit(cwd);
+ yield* writeTextFile(cwd, "README.md", "changed\n");
+ yield* writeTextFile(cwd, "new.txt", "untracked\n");
+ const started = yield* Deferred.make<void>();
+ const release = yield* Deferred.make<void>();