Files
Nexumi/docs/PHASE-TRACKING.md
smueller bcbfa07697 Implement Batch B features and enhancements for dashboard modules
- Completed integration of shared Zod schemas for various dashboard modules, including Tickets, Giveaways, and more, with new tests added.
- Established WebUI-BullMQ infrastructure for managing jobs related to giveaways, schedules, and guild backups.
- Expanded bot functionality with new jobs for giveaways and suggestions, enabling staff actions through the dashboard.
- Updated module configurations, API routes, and UI components for improved management of tickets, giveaways, and guild backups.
- Enhanced localization with new i18n keys for Batch B modules and verified successful builds across all packages.
2026-07-22 15:57:18 +02:00

5.7 KiB
Raw Blame History

Phase 6 WebUI-Fundament (Status: abgeschlossen, manuell bestätigt)

Abgeschlossen

  • apps/webui als @nexumi/webui (Next.js 15 App Router, Tailwind 4, React 19)
  • Discord-OAuth2 + Redis-Sessions; Cookie-Fix für HTTP (Secure nur bei HTTPS; Set-Cookie am Redirect-Response)
  • Settings-Framework, Layout, Shared Zod-API, Modul-Toggles, Access-Rules, Dashboard-Audit
  • Deploy: bot+webui healthy; Login manuell bestätigt (WEBUI_URL=http://10.111.0.65:3000)

Phase 7 WebUI Modul-Seiten + Owner-Panel (Status: in Arbeit)

Abgeschlossen (Batch A)

  • Prisma-Grundlage für Owner-Features: CommandOverride, OwnerTeamMember, GlobalUserBlacklist, GuildBlacklist, FeatureFlag, BotPresenceConfig, ChangelogEntry, OwnerAuditLog inkl. Migration 20260722190000_phase7_owner
  • Shared Zod-Schemas für Dashboard-Module in packages/shared/src/dashboard.ts (Moderation, Automod, Logging, Welcome, Verification, Leveling, Economy, Fun, Cases, Warnings) + Tests
  • OWNER_USER_IDS-Env-Variable (WebUI-Env-Schema + .env.example), noch ohne Owner-Panel-Nutzung
  • API-Routen (GET+PATCH) für: moderation, automod, logging, welcome, verification, leveling, economy, fun; zusätzlich GET cases und warnings
  • Funktionierende Dashboard-Seiten (Formular + Speichern über SettingsForm/SaveBar, echte Daten, keine Platzhalter) für alle acht Batch-A-Module, inkl. Cases-Tabelle auf der Moderation-Seite
  • i18n-Keys modulePages.* in de.json und en.json ergänzt
  • Platzhalter-Route dashboard/[guildId]/[module]/page.tsx greift nur noch für die verbleibenden Batch-B/C-Module (Batch-A-Routen haben eigene Ordner mit Vorrang)
  • Verifiziert: pnpm --filter @nexumi/shared build+test, pnpm --filter @nexumi/webui typecheck+lint, pnpm --filter @nexumi/bot typecheck+lint+test grün; next build kompiliert und rendert alle Seiten (inkl. neue Batch-A-Routen) erfolgreich einzige Auffälligkeit ist ein bekanntes Windows-only EPERM-Symlink-Problem bei output: standalone außerhalb von Docker, ohne Auswirkung auf den Linux-Container-Build

Abgeschlossen (Batch B)

  • Shared Zod-Schemas in packages/shared/src/dashboard.ts für alle restlichen Module ergänzt: Tickets (Config + Kategorien), Giveaways (+ Create/Action), SelfRoles, Tags, Starboard, Suggestions (Config + Liste + Action), Birthdays, TempVoice, Stats, SocialFeeds, Scheduler, GuildBackups, CommandOverrides, ActivityStatSummary, KNOWN_COMMAND_NAMES inkl. neuer Tests in dashboard.test.ts
  • WebUI-BullMQ-Infrastruktur (apps/webui/src/lib/queues.ts): eigene Queue/QueueEvents-Instanzen für giveaways, schedules, guild-backups, suggestions (dieselben Queue-Namen wie im Bot), plus addJobAndAwait-Helper für bounded-wait auf Bot-Jobs
  • BOT_TOKEN zusätzlich im WebUI-Env-Schema (apps/webui/src/lib/env.ts) für schmale Discord-REST-Aufrufe (Guild-Backup-Snapshot) und BullMQ-Jobs
  • Bot-seitige Erweiterungen für Dashboard-Aktionen, die einen laufenden discord.js-Client brauchen:
    • giveaways: neuer giveawayCreate-Job (runGiveawayCreateJob) für Dashboard-Erstellung, Worker in apps/bot/src/jobs.ts erweitert
    • suggestions: neue Queue suggestions + Job suggestionStatusUpdate (runSuggestionStatusUpdateJob) für Dashboard-Staff-Actions (Approve/Deny/Consider/Implement inkl. Embed-Move + Autor-DM)
    • guildbackup: Restore weiterhin über bestehende guild-backups-Queue (restoreGuildBackup), jetzt auch von der WebUI aus angestoßen
  • Modul-Configs (apps/webui/src/lib/module-configs/*) + API-Routen (apps/webui/src/app/api/guilds/[guildId]/...) + Formulare/Manager (apps/webui/src/components/modules/*) + Seiten/Loading (apps/webui/src/app/dashboard/[guildId]/<href>/) für: tickets, giveaways, selfroles, tags, starboard, suggestions, birthdays, tempvoice, stats, feeds, scheduler, backup (Href für guildbackup)
    • Guild-Backup: Liste/Info/Download/Delete direkt über Prisma; Create via schmalem Discord-REST-Snapshot (apps/webui/src/lib/guild-backup.ts); Restore nur für den Discord-Server-Owner (Check über OAuth-Guild-Liste guild.owner), mit doppelter Bestätigung im UI
    • Scheduler: Dashboard-Erstellung spiegelt exakt die Job-Optionen von apps/bot/src/modules/scheduler/service.ts (schedule-{id}-JobId, scheduleSend-Jobname, gleiche Queue) kein separater Bot-seitiger Reconciler nötig
  • /dashboard/[guildId]/commands (CommandOverride-CRUD auf Basis von KNOWN_COMMAND_NAMES, Toggle + Cooldown + Rollen-/Kanal-Listen), Sidebar-Eintrag im Settings-Bereich ergänzt
  • Overview-Seite um 7-Tage-ActivityStat-Aggregate erweitert (Nachrichten, Voice-Minuten, aktive Mitglieder) via apps/webui/src/lib/activity.ts
  • Platzhalter-Route dashboard/[guildId]/[module]/page.tsx entfernt (alle Module haben jetzt eigene Ordner)
  • i18n-Keys modulePages.* für alle Batch-B-Module + nav.commands + common.optional + dashboard.overview.activity* in de.json und en.json ergänzt
  • Verifiziert: pnpm --filter @nexumi/shared build+test, pnpm --filter @nexumi/webui typecheck+lint, pnpm --filter @nexumi/bot typecheck+lint+test grün

Offen (Batch C)

  • Owner-Panel-UI (Übersicht, Guilds, User-Blacklist, Feature-Flags, Präsenz, Team, Jobs, Changelog, Audit) auf Basis der in Batch A angelegten Prisma-Modelle
  • Manuelle Tests der Batch-B-Seiten im laufenden Stack (Docker: bot + webui + Redis + Postgres), insbesondere: Giveaway-Create/End über BullMQ, Suggestion-Staff-Actions, Guild-Backup-Restore (Owner-Check), Scheduler-Job-Aufnahme durch den Bot-Worker

Nächster geplanter Schritt

  • Batch C (Owner-Panel-UI) umsetzen, danach Phase 7 komplett manuell freigeben, anschließend Phase 8 (Landing, Status, Rechtsseiten).