Skip to content

Commit 13c8279

Browse files
committed
fix(review): address Macroscope feedback
1 parent 821eb5e commit 13c8279

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎apps/web/src/components/DiffPanel.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -548,16 +548,16 @@ export default function DiffPanel({
548548
turnId: latestTurn?.turnId ?? null,
549549
};
550550
const previous = lastCompletedTurnRefreshRef.current;
551-
lastCompletedTurnRefreshRef.current = current;
552-
if (
553-
!canRefreshGitDiff ||
554-
previous === null ||
555-
previous.threadKey !== current.threadKey ||
556-
previous.turnId === current.turnId
557-
) {
551+
if (!canRefreshGitDiff) {
552+
return;
553+
}
554+
if (previous === null || previous.threadKey !== current.threadKey) {
555+
lastCompletedTurnRefreshRef.current = current;
558556
return;
559557
}
558+
if (previous.turnId === current.turnId) return;
560559
refreshBranchDiffPreview();
560+
lastCompletedTurnRefreshRef.current = current;
561561
}, [activeThreadRefreshKey, canRefreshGitDiff, latestTurn?.turnId, refreshBranchDiffPreview]);
562562

563563
const selectedGitSource = branchDiffPreview.data?.sources.find(

‎packages/client-runtime/src/state/review.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export function createReviewEnvironmentAtoms<R, E>(
3333
input.headRef,
3434
input.oldPath,
3535
input.newPath,
36+
input.changeType,
3637
]),
3738
},
3839
}),

0 commit comments

Comments
 (0)