The best way to control Claude Code, Codex and more from any computer or phone
fix(server): disable text conversion when measuring review-guide hunks (#21988)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Victor Vogel committed
Oct 30, 2026 at 15:30 UTC
915bb6dd161c6bceec82fe7e9da705e06309ca60
2 files changed
+49
-1
apps/server/src/pullRequest/PullRequestReviewGuideService.test.ts
+45
@@ -466,6 +466,51 @@ it.layer(layerBase, { excludeTestServices: true })("PullRequestReviewGuideServic
466
),
467
);
468
469
+ it.effect("keeps excerpts of source lines a configured diff driver would convert away", () =>
470
+ Effect.scoped(
471
+ Effect.gen(function* () {
472
+ const repositories = yield* makeRepositories;
473
+ const fs = yield* FileSystem.FileSystem;
474
+ yield* fs.writeFileString(
475
+ `${repositories.workspace}/.git/info/attributes`,
476
+ "feature.txt diff=blank\n",
477
+ );
478
+ yield* git(repositories.workspace, ["config", "diff.blank.textconv", "true"]);
479
+ const stored = yield* Deferred.make<void>();
480
+ const context = yield* Layer.build(
481
+ makeLayer({
482
+ ...repositories,
483
+ stored,
484
+ generate: () =>
485
+ Effect.succeed({
486
+ stops: [
487
+ {
488
+ title: "The feature",
489
+ summary: "The change.",
490
+ attention: null,
491
+ excerpts: [{ path: "feature.txt", side: "new", start: 1, end: 3, caption: "" }],
492
+ files: [],
493
+ notes: [],
494
+ questions: [],
495
+ },
496
+ ],
497
+ }),
498
+ }),
499
+ );
500
+ const service = Context.get(
501
+ context,
502
+ PullRequestReviewGuideService.PullRequestReviewGuideService,
503
+ );
504
+ yield* service.generate(reference);
505
+ yield* Deferred.await(stored);
506
+ const result = yield* service.get(reference);
507
+ assert.deepStrictEqual(result.guide?.stops[0]?.excerpts, [
508
+ { path: "feature.txt", side: "new", start: 1, end: 3, caption: "" },
509
+ ]);
510
+ }),
511
+ ),
512
+ );
513
+
514
it.effect("refuses generation when the verified remote disappeared despite a usable origin", () =>
515
Effect.scoped(
516
Effect.gen(function* () {
apps/server/src/pullRequest/PullRequestReviewGuideService.ts
+4
-1
@@ -344,7 +344,10 @@ const make = Effect.gen(function* () {
344
})
345
.pipe(Effect.map((result) => result.stdout));
346
const [nameOnly, patch] = yield* Effect.all(
347
- [diff(["--name-only", "-z"]), diff(["--unified=0", "--no-color", "--no-ext-diff"])],
347
+ [
348
+ diff(["--name-only", "-z"]),
349
+ diff(["--unified=0", "--no-color", "--no-ext-diff", "--no-textconv"]),
350
+ ],
351
{ concurrency: "unbounded" },
352
);
353
return parseReviewGuideChange(nameOnly, patch);