fix(site): remove redundant success toasts from agents feature (#22884)

This commit is contained in:
Danielle Maywood
2026-03-10 10:32:27 +00:00
committed by GitHub
parent 73bf8478d8
commit b850d40db8
2 changed files with 2 additions and 13 deletions
-6
View File
@@ -171,7 +171,6 @@ const AgentsPage: FC = () => {
...archiveChatBase,
onSuccess: (_data, chatId) => {
clearChatErrorReason(chatId);
toast.success("Agent archived.");
},
onError: (error, chatId, context) => {
archiveChatBase.onError(error, chatId, context);
@@ -194,8 +193,6 @@ const AgentsPage: FC = () => {
clearChatErrorReason(chatId);
await queryClient.invalidateQueries({ queryKey: chatsKey });
await queryClient.invalidateQueries({ queryKey: chatKey(chatId) });
toast.success("Agent archived.");
toast.success("Workspace deletion initiated.");
},
onError: (error) => {
toast.error(getErrorMessage(error, "Failed to archive agent."));
@@ -204,9 +201,6 @@ const AgentsPage: FC = () => {
const unarchiveChatBase = unarchiveChat(queryClient);
const unarchiveAgentMutation = useMutation({
...unarchiveChatBase,
onSuccess: () => {
toast.success("Agent unarchived.");
},
onError: (error, chatId, context) => {
unarchiveChatBase.onError(error, chatId, context);
toast.error(getErrorMessage(error, "Failed to unarchive agent."));
+2 -7
View File
@@ -22,17 +22,12 @@ export const WebPushButton: FC = () => {
try {
if (webPush.subscribed) {
await webPush.unsubscribe();
toast.success("Notifications disabled.");
} else {
await webPush.subscribe();
toast.success("Notifications enabled.");
}
} catch (error) {
if (webPush.subscribed) {
toast.error(getErrorMessage(error, "Failed to disable notifications."));
} else {
toast.error(getErrorMessage(error, "Failed to enable notifications."));
}
const action = webPush.subscribed ? "disable" : "enable";
toast.error(getErrorMessage(error, `Failed to ${action} notifications.`));
}
};