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:
co-authored by
Claude Opus 4.8
parent
d81aaf2b4a
commit
6da8a32c9b
@@ -45,6 +45,21 @@ export class MessagesService {
|
||||
logger.debug({ channelId, query }, "Getting attachments by channel");
|
||||
return messagesRepository.getAttachmentsByChannel(channelId, query);
|
||||
}
|
||||
|
||||
async reanalyzeErrorBatch(opts: {
|
||||
guildId?: string;
|
||||
channelId?: string;
|
||||
messageIds?: string[];
|
||||
}) {
|
||||
if (!opts.guildId && !opts.channelId && (!opts.messageIds || opts.messageIds.length === 0)) {
|
||||
throw new ValidationError(
|
||||
"At least one of guildId, channelId, or messageIds[] is required",
|
||||
);
|
||||
}
|
||||
|
||||
logger.info(opts, "Batch reanalyzing errored messages");
|
||||
return messagesRepository.reanalyzeErrorBatch(opts);
|
||||
}
|
||||
}
|
||||
|
||||
export const messagesService = new MessagesService();
|
||||
|
||||
Reference in New Issue
Block a user