fix(moderation): remove manual reanalyze triggers — auto-recovery only

Manual per-message and batch reanalyze buttons/endpoints let anyone
re-queue arbitrary messages for LLM analysis, burning AI credits on
spam. Removed:
- FE: Reanalyze buttons in message list, search panel, and messages page
- FE: useReanalyze/useReanalyzeBatch hooks + messagesApi methods
- BE: POST /api/messages/:id/reanalyze and /reanalyze-batch endpoints
- BE: markForReanalysis/reanalyzeErrorBatch service+repository methods

Recovery of failed messages is fully automatic: the discord-gateway
startPendingAIAnalysisWorker retries 'pending' (batch path) and
'error/analysis_incomplete' (individual path) messages on
AI_ANALYSIS_RECOVERY_INTERVAL_MS.
This commit is contained in:
asepharyana
2026-08-04 15:37:56 +07:00
parent 88484f12a9
commit 2f51f94610
11 changed files with 6 additions and 243 deletions
-2
View File
@@ -24,8 +24,6 @@ export {
useMessages,
useMessagesHasMore,
useMessagesWsSync,
useReanalyze,
useReanalyzeBatch,
useReview,
useTextChannels,
} from "./use-messages";
@@ -155,16 +155,6 @@ export function useMessageDetail(id: string | null) {
};
}
// ── Mutations ────────────────────────────────────
export function useReanalyze() {
return useAction((id: string) => messagesApi.reanalyze(id));
}
export function useReanalyzeBatch() {
return useAction((guildId: string) => messagesApi.reanalyzeBatch(guildId));
}
// ── Search ───────────────────────────────────────
export function useMessageSearch(query: string, enabled: boolean) {