feat: add "Retry All Errors" batch reanalyze button

Backend:
- POST /api/messages/reanalyze-batch — bulk reset error messages to pending
- messages.repository.reanalyzeErrorBatch() — scoped by guildId/channelId/messageIds
- messages.service.reanalyzeErrorBatch() — validation layer

Frontend:
- reanalyzeErrorBatch() API client function
- useMessages.reanalyzeAllErrors() — optimistic state + batch call
- MessagesPanel: destructive button visible when error count > 0
- Shows confirmation text with queued count

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-03 00:17:51 +07:00
co-authored by Claude Opus 4.8
parent d81aaf2b4a
commit 6da8a32c9b
7 changed files with 156 additions and 3 deletions
@@ -167,6 +167,17 @@ export function reanalyzeMessage(id: string): Promise<void> {
return request<void>(`/api/messages/${id}/reanalyze`, { method: "POST" });
}
export function reanalyzeErrorBatch(opts: {
guildId?: string;
channelId?: string;
messageIds?: string[];
}): Promise<{ ok: boolean; count: number }> {
return request<{ ok: boolean; count: number }>(
"/api/messages/reanalyze-batch",
{ method: "POST", body: JSON.stringify(opts) },
);
}
export function moderateMessage(
id: string,
actionType: string,