From c45c72f600a307e28fc7d5cc78be1bf13fa77e07 Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 22 Jan 2026 23:03:10 -0800 Subject: [PATCH] =?UTF-8?q?docs(conversation-assistant):=20=F0=9F=93=9D=20?= =?UTF-8?q?Refactor=20frontend=20UI=20components=20and=20test=20mocks=20fo?= =?UTF-8?q?r=20dashboard,=20processing,=20training,=20device=20management,?= =?UTF-8?q?=20and=20red=20flag=20moderation=20configurations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend-dev/src/pages/DashboardPage.tsx | 28 ++++++----- .../frontend-dev/src/pages/ProcessingPage.tsx | 10 ++-- .../src/pages/ReviewQueuePage.tsx | 10 ++-- .../frontend-dev/src/pages/SettingsPage.tsx | 9 ++-- .../frontend-dev/src/pages/StudioPage.tsx | 12 +++-- .../frontend-dev/src/pages/TrainingPage.tsx | 14 ++++-- .../src/pages/devices/DeviceCard.tsx | 10 ++-- .../src/pages/devices/DevicesPage.tsx | 8 ++-- .../src/pages/devices/MaintenanceSection.tsx | 17 ++++--- .../src/pages/devices/SyncStats.tsx | 10 ++-- .../frontend-dev/src/pages/devices/styles.ts | 1 + .../src/pages/settings/RedFlagDocsPage.tsx | 29 +++++------ .../src/pages/settings/RedFlagsConfigPage.tsx | 31 ++++++------ .../src/pages/settings/StyleProfilePage.tsx | 15 +++--- .../frontend-dev/src/test/mocks/handlers.ts | 48 +++++++------------ 15 files changed, 133 insertions(+), 119 deletions(-) diff --git a/features/conversation-assistant/frontend-dev/src/pages/DashboardPage.tsx b/features/conversation-assistant/frontend-dev/src/pages/DashboardPage.tsx index 8c40bf51a..24436c1ba 100755 --- a/features/conversation-assistant/frontend-dev/src/pages/DashboardPage.tsx +++ b/features/conversation-assistant/frontend-dev/src/pages/DashboardPage.tsx @@ -1,7 +1,9 @@ -import styled from '@lilith/ui-styled-components'; -import type { ThemeInterface } from '@lilith/ui-theme'; import { Spinner } from '@lilith/ui-primitives'; +import styled from '@lilith/ui-styled-components'; import { Database, Server, Cpu, CheckCircle, AlertCircle, XCircle } from 'lucide-react'; + +import type { ThemeInterface } from '@lilith/ui-theme'; + import { useClassificationStats, useMLSuggestions, useHealthStatus } from '@/api'; import { ClassificationBadge } from '@/components/ClassificationBadge'; @@ -238,13 +240,13 @@ const HealthIcon = styled.div<{ $status: string }>` height: 40px; border-radius: 8px; background-color: ${(props) => { - if (props.$status === 'ok') return 'rgba(34, 197, 94, 0.15)'; - if (props.$status === 'unavailable' || props.$status === 'unhealthy') return 'rgba(239, 68, 68, 0.15)'; + if (props.$status === 'ok') {return 'rgba(34, 197, 94, 0.15)';} + if (props.$status === 'unavailable' || props.$status === 'unhealthy') {return 'rgba(239, 68, 68, 0.15)';} return 'rgba(156, 163, 175, 0.15)'; }}; color: ${(props) => { - if (props.$status === 'ok') return (props.theme as ThemeInterface).colors.success.main; - if (props.$status === 'unavailable' || props.$status === 'unhealthy') return (props.theme as ThemeInterface).colors.error.main; + if (props.$status === 'ok') {return (props.theme as ThemeInterface).colors.success.main;} + if (props.$status === 'unavailable' || props.$status === 'unhealthy') {return (props.theme as ThemeInterface).colors.error.main;} return (props.theme as ThemeInterface).colors.text.secondary; }}; `; @@ -262,8 +264,8 @@ const HealthServiceName = styled.div` const HealthServiceStatus = styled.div<{ $status: string }>` font-size: 12px; color: ${(props) => { - if (props.$status === 'ok') return (props.theme as ThemeInterface).colors.success.main; - if (props.$status === 'unavailable' || props.$status === 'unhealthy') return (props.theme as ThemeInterface).colors.error.main; + if (props.$status === 'ok') {return (props.theme as ThemeInterface).colors.success.main;} + if (props.$status === 'unavailable' || props.$status === 'unhealthy') {return (props.theme as ThemeInterface).colors.error.main;} return (props.theme as ThemeInterface).colors.text.secondary; }}; `; @@ -279,8 +281,8 @@ const HealthMeta = styled.div` `; function getStatusIcon(status: string) { - if (status === 'ok') return