feat: Remove notifications when comments are added/edited/removed (#369)
* fix: remove comment toast notifications Remove success toasts after updating a comment Remove success toasts after saving a comment draft Keep saving logic and line reset intact without toast feedback * fix(ui): remove success toast on draft save Remove success toast after saving a draft Suppress toast when updating an existing draft * fix(planview): suppress toast on save and reset state Remove toast notification after saving or updating a draft Clear comment input and line selection after commit Preserve draft save/update logic without triggering toast
This commit is contained in:
@@ -745,7 +745,6 @@ export const FilesView: React.FC = () => {
|
|||||||
startLine: finalRange.start,
|
startLine: finalRange.start,
|
||||||
endLine: finalRange.end,
|
endLine: finalRange.end,
|
||||||
});
|
});
|
||||||
toast.success('Comment updated');
|
|
||||||
} else {
|
} else {
|
||||||
addDraft({
|
addDraft({
|
||||||
sessionKey,
|
sessionKey,
|
||||||
@@ -757,7 +756,6 @@ export const FilesView: React.FC = () => {
|
|||||||
language: getLanguageFromExtension(selectedFile.path) || 'text',
|
language: getLanguageFromExtension(selectedFile.path) || 'text',
|
||||||
text: text.trim(),
|
text: text.trim(),
|
||||||
});
|
});
|
||||||
toast.success('Comment saved');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setLineSelection(null);
|
setLineSelection(null);
|
||||||
|
|||||||
@@ -299,8 +299,6 @@ export const PierreDiffViewer: React.FC<PierreDiffViewerProps> = ({
|
|||||||
setCommentText('');
|
setCommentText('');
|
||||||
setSelection(null);
|
setSelection(null);
|
||||||
setEditingDraftId(null);
|
setEditingDraftId(null);
|
||||||
|
|
||||||
toast.success(editingDraftId ? 'Comment updated' : 'Comment saved');
|
|
||||||
}, [selection, fileName, language, original, modified, addDraft, updateDraft, getSessionKey, editingDraftId]);
|
}, [selection, fileName, language, original, modified, addDraft, updateDraft, getSessionKey, editingDraftId]);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -267,8 +267,6 @@ export const PlanView: React.FC = () => {
|
|||||||
setCommentText('');
|
setCommentText('');
|
||||||
setLineSelection(null);
|
setLineSelection(null);
|
||||||
setEditingDraftId(null);
|
setEditingDraftId(null);
|
||||||
|
|
||||||
toast.success(editingDraftId ? 'Comment updated' : 'Comment saved');
|
|
||||||
}, [lineSelection, content, displayPath, resolvedPath, addDraft, updateDraft, getSessionKey, extractSelectedCode, editingDraftId]);
|
}, [lineSelection, content, displayPath, resolvedPath, addDraft, updateDraft, getSessionKey, extractSelectedCode, editingDraftId]);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user