fix: address greptile review feedback (greploop iteration 1)

- Add missing useMemo deps (pendingApprovalAction, onApproveApproval,
  onRejectApproval) in CommentThread timelineSection
- Use .mutateAsync in useCallback deps instead of full mutation objects
  in IssueDetail to prevent unnecessary re-renders
This commit is contained in:
Devin Foley committed 2026-04-08 17:14:01 -07:00
1 parent 45b8198ba2
commit 4161af67d1
2 files changed
+6 -5

No files matched your search

+1
View File
@@ -736,6 +736,7 @@ export const CommentThread = memo(function CommentThread({
),
[
timeline, agentMap, currentUserId, companyId, projectId,
onApproveApproval, onRejectApproval, pendingApprovalAction,
feedbackVoteByTargetId, feedbackDataSharingPreference,
onVote, handleFeedbackVote, votingTargetId, highlightCommentId,
feedbackTermsUrl,
+5 -5
View File
@@ -1052,7 +1052,7 @@ export function IssueDetail() {
async (runId: string) => {
await interruptQueuedComment.mutateAsync(runId);
},
[interruptQueuedComment],
[interruptQueuedComment.mutateAsync],
);
const handleCommentImageUpload = useCallback(
@@ -1060,14 +1060,14 @@ export function IssueDetail() {
const attachment = await uploadAttachment.mutateAsync(file);
return attachment.contentPath;
},
[uploadAttachment],
[uploadAttachment.mutateAsync],
);
const handleCommentAttachImage = useCallback(
async (file: File) => {
await uploadAttachment.mutateAsync(file);
},
[uploadAttachment],
[uploadAttachment.mutateAsync],
);
const handleCommentAdd = useCallback(
@@ -1078,7 +1078,7 @@ export function IssueDetail() {
}
await addComment.mutateAsync({ body, reopen });
},
[addComment, addCommentAndReassign],
[addComment.mutateAsync, addCommentAndReassign.mutateAsync],
);
const handleCommentVote = useCallback(
@@ -1092,7 +1092,7 @@ export function IssueDetail() {
sharingPreferenceAtSubmit: feedbackDataSharingPreference,
});
},
[feedbackVoteMutation, feedbackDataSharingPreference],
[feedbackVoteMutation.mutateAsync, feedbackDataSharingPreference],
);
useEffect(() => {