From e74a2c71d339b35087496905fd8ed195e6cde304 Mon Sep 17 00:00:00 2001 From: Hentry Martin Date: Wed, 3 Dec 2025 13:05:23 +0100 Subject: [PATCH] fix: mutation keys --- .../ScorecardQuestion/AiFeedback/AiFeedback.tsx | 7 +++---- .../AiFeedbackComments/AiFeedbackComment.tsx | 10 ++++------ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx b/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx index 129738904..a9bf48993 100644 --- a/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx +++ b/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx @@ -40,11 +40,10 @@ const AiFeedback: FC = props => { await createFeedbackComment(workflowId as string, workflowRun?.id as string, feedback?.id, { content, }) - await mutate(` - ${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}] - `) + // eslint-disable-next-line max-len + await mutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`) setShowReply(false) - }, [workflowId, workflowRun?.id, feedback?.id]) + }, [workflowId, workflowRun?.id, workflowRun?.status, feedback?.id]) if (!aiFeedbackItems?.length || !feedback) { return <> diff --git a/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackComments/AiFeedbackComment.tsx b/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackComments/AiFeedbackComment.tsx index 402f8d51f..438f6512d 100644 --- a/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackComments/AiFeedbackComment.tsx +++ b/src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedbackComments/AiFeedbackComment.tsx @@ -36,9 +36,8 @@ export const AiFeedbackComment: FC = props => { content, parentId: comment.id, }) - await mutate(` - ${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}] - `) + // eslint-disable-next-line max-len + await mutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`) setShowReply(false) }, [workflowId, workflowRun?.id, props.feedback?.id]) @@ -46,9 +45,8 @@ export const AiFeedbackComment: FC = props => { await updateRunItemComment(workflowId as string, workflowRun?.id as string, props.feedback?.id, comment.id, { content, }) - await mutate(` - ${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}] - `) + // eslint-disable-next-line max-len + await mutate(`${EnvironmentConfig.API.V6}/workflows/${workflowId}/runs/${workflowRun?.id}/items?[${workflowRun?.status}]`) setEditMode(false) }, [workflowId, workflowRun?.id, props.feedback?.id])