From 3a73d1e53fce36eca28d336b84f36aa97e1ac8a6 Mon Sep 17 00:00:00 2001 From: "Joseph R. Quinn" <423821+quinnjr@users.noreply.github.com> Date: Wed, 25 Feb 2026 10:25:11 -0500 Subject: [PATCH] refactor(dashboard): replace inline Tailwind chains with BEM component classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inline Tailwind utility chains scattered across 25 components made the HTML hard to read and impossible to maintain consistently. Every button, card header, and badge had its own hand-rolled utility soup, so visual changes required hunting through dozens of files and there was no single source of truth for what a "button" or "card" looked like. Extract all recurring patterns into a BEM component library in app.css using @apply, CSS nesting (Lightning CSS via Tailwind v4), and plain CSS custom properties. No SCSS was introduced — Tailwind v4 with the vite plugin handles nesting natively, avoiding SCSS/PostCSS import conflicts. New BEM blocks: - .badge (--running, --paused, --success, --error, --warning, --info, --primary) — replaces badge-running, badge-paused, etc. - .btn (--sm, --md, --icon) × (--primary, --secondary, --ghost, --success, --danger) — single definition for all button variants - .card, .card__header, .card__header-title, .card__body - .form__label, .form__input, .form__textarea, .form__select - .nav-tab (--main, --sub, --active) — replaces .main-tab and .mem-tab - .mobile-menu, .mobile-menu--open, .mobile-menu__header, .mobile-menu__nav, .mobile-menu__nav-item (--active), .mobile-menu-overlay (--open) — replaces .mobile-nav-item + .open - .alert (--success, --error, --warning, --info) - .chat-bubble (--user, --assistant, --system) - .token-health (--good, --warning, --expired) - .pwa-banner, .pwa-banner__message, .pwa-banner__actions, .pwa-banner__install-btn, .pwa-banner__dismiss-btn - .kg-canvas, .custom-scroll, .tab-scroll, .animate-subtle-pulse All 25 component files updated to use the new class names. Inline utility chains retained only where they express layout context unique to that component rather than a reusable widget appearance. Co-Authored-By: Claude Sonnet 4.6 --- src/dashboard/frontend/src/App.svelte | 28 +- src/dashboard/frontend/src/app.css | 355 ++++++++++++++---- .../src/components/ActivityLog.svelte | 4 +- .../frontend/src/components/ChatTab.svelte | 16 +- .../src/components/ConversationHistory.svelte | 12 +- .../src/components/CredentialRow.svelte | 6 +- .../frontend/src/components/GoalsTab.svelte | 14 +- .../frontend/src/components/Header.svelte | 24 +- .../src/components/KnowledgeGraphViz.svelte | 10 +- .../src/components/KnowledgeTab.svelte | 8 +- .../frontend/src/components/LiveFeed.svelte | 2 +- .../src/components/LoginOverlay.svelte | 27 +- .../src/components/MemoryPanel.svelte | 8 +- .../src/components/OperationsTab.svelte | 36 +- .../src/components/PendingActions.svelte | 14 +- .../src/components/PersonaEditor.svelte | 16 +- .../src/components/SecurityTab.svelte | 15 +- .../src/components/SettingsTab.svelte | 124 +++--- .../frontend/src/components/SkillCard.svelte | 32 +- .../src/components/SkillMarketplace.svelte | 14 +- .../frontend/src/components/SkillsTab.svelte | 16 +- .../frontend/src/components/StatsPanel.svelte | 4 +- .../frontend/src/components/ToolsTab.svelte | 4 +- .../frontend/src/components/TrashTab.svelte | 12 +- .../src/components/TwoFactorPanel.svelte | 22 +- .../frontend/src/components/UsersPanel.svelte | 38 +- 26 files changed, 516 insertions(+), 345 deletions(-) diff --git a/src/dashboard/frontend/src/App.svelte b/src/dashboard/frontend/src/App.svelte index 60704a5..d694de8 100644 --- a/src/dashboard/frontend/src/App.svelte +++ b/src/dashboard/frontend/src/App.svelte @@ -168,27 +168,27 @@ {#if dashboard.mobileMenuOpen}
dashboard.mobileMenuOpen = false} role="presentation" >
-