From 3c31832a0de5519a2451ec228a09ac319a3fbb03 Mon Sep 17 00:00:00 2001 From: Pepe44DEV Date: Thu, 2 Jul 2026 13:55:17 +0200 Subject: [PATCH] improve dashboard usability and fix backend TS build errors Frontend: fix HeroUI Switch usage across the whole app (Content/Control/ Thumb composition was missing, so no toggle ever rendered visibly), replace raw channel/role ID text fields with proper name-based dropdowns (ChannelSelect/RoleSelect) backed by the existing /guild/resources endpoint, redesign Automod's filters as inline toggle rows, turn the Ticket Pipeline tab into a drag-and-drop Kanban board, narrow the sidebar further and rework its collapse toggle and profile footer, and add a Discord-style message preview for Welcome/Support Login. Backend: fix the ~50 TypeScript build errors blocking `npm run build` (SlashCommandBuilder typing, discord.js v14 channel-union guards, Prisma JSON null handling, logger.warn signature, and related type narrowing) so the project compiles cleanly again. Co-Authored-By: Claude Sonnet 5 --- frontend/src/app.css | 9 ++ frontend/src/components/layout/Sidebar.tsx | 101 ++++++++--------- frontend/src/components/shared/AppSwitch.tsx | 32 ++++++ .../src/components/shared/ChannelSelect.tsx | 56 +++++++++ .../src/components/shared/DiscordPreview.tsx | 59 ++++++++++ frontend/src/components/shared/RoleSelect.tsx | 56 +++++++++ .../src/components/shared/TicketKanban.tsx | 98 ++++++++++++++++ frontend/src/pages/Automod.tsx | 107 +++++++++++------- frontend/src/pages/Birthday.tsx | 27 +++-- frontend/src/pages/DynamicVoice.tsx | 38 ++++--- frontend/src/pages/Events.tsx | 14 ++- frontend/src/pages/Modules.tsx | 7 +- frontend/src/pages/ReactionRoles.tsx | 14 ++- frontend/src/pages/ServerStats.tsx | 11 +- frontend/src/pages/Settings.tsx | 82 ++++++++------ frontend/src/pages/Statuspage.tsx | 27 +++-- frontend/src/pages/SupportLogin.tsx | 53 ++++----- frontend/src/pages/Tickets.tsx | 54 ++------- frontend/src/pages/Welcome.tsx | 49 ++++---- src/commands/admin/clear.ts | 5 +- src/commands/tickets/panel.ts | 2 +- src/commands/tickets/transcript.ts | 4 +- src/commands/utility/configure.ts | 4 +- src/commands/utility/rank.ts | 2 +- src/config/context.ts | 8 +- src/config/state.ts | 13 ++- src/services/automodService.ts | 6 +- src/services/commandHandler.ts | 2 +- src/services/levelService.ts | 4 +- src/services/loggingService.ts | 9 +- src/services/musicService.ts | 4 +- src/services/reactionRoleService.ts | 14 +-- src/utils/logger.ts | 8 +- src/utils/types.ts | 4 +- src/web/routes/api.ts | 18 ++- 35 files changed, 691 insertions(+), 310 deletions(-) create mode 100644 frontend/src/components/shared/AppSwitch.tsx create mode 100644 frontend/src/components/shared/ChannelSelect.tsx create mode 100644 frontend/src/components/shared/DiscordPreview.tsx create mode 100644 frontend/src/components/shared/RoleSelect.tsx create mode 100644 frontend/src/components/shared/TicketKanban.tsx diff --git a/frontend/src/app.css b/frontend/src/app.css index 7bdc9d9..d548bb2 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -3,6 +3,15 @@ @custom-variant dark (&:is(.dark *)); +:root { + /* HeroUI ships fields with a transparent border and 0 border-width by default, + so an Input on a plain Card is invisible (identical bg, no outline). Give + every field a real, visible box across the whole app. */ + --field-border-width: 1px; + --field-border: var(--border-secondary); + --field-background: var(--surface-tertiary); +} + html, body, #root { min-height: 100%; } diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index 35ecc9b..29e044e 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -1,6 +1,6 @@ import { useState } from 'react'; import { - Button, Card, CardContent, ScrollShadow, Tooltip, + Button, ScrollShadow, Tooltip, Select, SelectTrigger, SelectValue, SelectPopover, ListBox, ListBoxItem } from '@heroui/react'; import { @@ -64,18 +64,23 @@ export function Sidebar() { const [collapsed, setCollapsed] = useState(false); return ( -