feat(ui): add Adaptive Prompt Tuner tab with correction submission UI

- Add pgCorrectedModerationsTable to shared schema
- Create backend corrections module (stats, list, create endpoints)
- Add TunerPanel with Stats, History, and Submit sub-tabs
- Add AuthOverlay gate for Tuner (admin-only, same as Live)
- Set messages as default tab
- Wire Tuner into sidebar, header, and mobile tab bar

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-12 21:28:05 +07:00
co-authored by Claude
parent fbc2184c6e
commit 7f3eb7b9ac
16 changed files with 1060 additions and 5 deletions
+2
View File
@@ -10,11 +10,13 @@ import type { WsStatus } from "../shared/ws/socket";
const titles: Record<DashboardTab, string> = {
live: "Voice, Media & Recordings",
messages: "Messages & Moderation",
tuner: "Prompt Tuner",
};
const subtitles: Record<DashboardTab, string> = {
live: "Join voice channels, play media, stream audio, and browse recordings.",
messages: "Capture, analyse, and moderate Discord messages.",
tuner: "Monitor correction patterns and improve AI moderation accuracy.",
};
interface HeaderProps {
+2 -1
View File
@@ -1,5 +1,5 @@
import { motion } from "framer-motion";
import { MessageSquare, Radio } from "lucide-react";
import { MessageSquare, Radio, SlidersHorizontal } from "lucide-react";
import type { DashboardTab } from "../entities/ui/types";
import type { MessageRecord } from "../shared/api/client";
import { useMascotChat } from "../shared/hooks/useMascotChat";
@@ -11,6 +11,7 @@ const navItems: Array<{ id: DashboardTab; label: string; icon: typeof Radio }> =
[
{ id: "live", label: "Live", icon: Radio },
{ id: "messages", label: "Messages", icon: MessageSquare },
{ id: "tuner", label: "Tuner", icon: SlidersHorizontal },
];
interface SidebarProps {