refactor(frontend): remove warn moderation status — hardcode warn to 0 in charts, drop warn filter/badge/buttons/Api, simplify to flagged-only

This commit is contained in:
MythEclipse
2026-06-03 01:13:47 +07:00
parent b7d4e66600
commit 8d34aa7125
10 changed files with 15 additions and 108 deletions
+3 -3
View File
@@ -97,15 +97,15 @@ export default function App() {
onMessageAnalyzed: (m) => {
const msg = m as MessageRecord;
messages.setMessages((prev) => mergeMessages(prev, [msg]));
// Show toast for moderation alerts (warn/flagged)
// Show toast for moderation alerts (flagged)
const status = msg.ai_status;
if (status === "flagged" || status === "warn") {
if (status === "flagged") {
const username = msg.username || msg.user_id || "unknown";
const severity = msg.ai_severity || "";
const categories = msg.ai_categories || "";
const brief =
msg.ai_analysis?.slice(0, 80) ??
`Message ${status === "flagged" ? "flagged" : "warned"} by AI`;
"Message flagged by AI";
window.dispatchEvent(
new CustomEvent("moderation_alert", {
detail: { type: status, username, severity, categories, brief },