From 96a4130c0e20033eb155366d27ca05241b207203 Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Sun, 22 Mar 2026 02:00:35 -0400 Subject: [PATCH] refactor: migrate dashboard components to Design System v4 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../dashboard/ActiveFlowPilotSessions.tsx | 28 +++++++++---------- .../src/components/dashboard/FiltersBar.tsx | 8 +++--- .../dashboard/KnowledgeBaseCards.tsx | 10 +++---- .../dashboard/OnboardingChecklist.tsx | 26 ++++++++--------- .../src/components/dashboard/OpenSessions.tsx | 16 +++++------ .../dashboard/PendingEscalations.tsx | 12 ++++---- .../components/dashboard/PerformanceCards.tsx | 6 ++-- .../components/dashboard/PreparedSessions.tsx | 12 ++++---- .../src/components/dashboard/QuickActions.tsx | 10 +++---- .../src/components/dashboard/QuickStats.tsx | 6 ++-- .../components/dashboard/RecentActivity.tsx | 10 +++---- .../dashboard/RecentFlowPilotSessions.tsx | 10 +++---- .../src/components/dashboard/SectionGroup.tsx | 8 +++--- .../components/dashboard/SessionsPanel.tsx | 16 +++++------ .../dashboard/StartSessionInput.tsx | 16 +++++------ .../src/components/dashboard/TeamSummary.tsx | 10 +++---- .../src/components/dashboard/TreeListItem.tsx | 14 +++++----- .../components/dashboard/WeeklyCalendar.tsx | 14 +++++----- 18 files changed, 116 insertions(+), 116 deletions(-) diff --git a/frontend/src/components/dashboard/ActiveFlowPilotSessions.tsx b/frontend/src/components/dashboard/ActiveFlowPilotSessions.tsx index 1a74c625..26af94a1 100644 --- a/frontend/src/components/dashboard/ActiveFlowPilotSessions.tsx +++ b/frontend/src/components/dashboard/ActiveFlowPilotSessions.tsx @@ -29,13 +29,13 @@ export function ActiveFlowPilotSessions() { if (loading) { return ( -
+
-

Active Sessions

+

Active Sessions

{Array.from({ length: 3 }).map((_, i) => ( -
+
))}
@@ -43,22 +43,22 @@ export function ActiveFlowPilotSessions() { } return ( -
+
-

Active Sessions

+

Active Sessions

{sessions.length > 0 && ( - + {sessions.length} )}
View all @@ -66,7 +66,7 @@ export function ActiveFlowPilotSessions() { {sessions.length === 0 ? (
-

No active sessions

+

No active sessions

Start typing above to begin troubleshooting

) : ( @@ -75,26 +75,26 @@ export function ActiveFlowPilotSessions() { ))} -
- diff --git a/frontend/src/components/dashboard/KnowledgeBaseCards.tsx b/frontend/src/components/dashboard/KnowledgeBaseCards.tsx index 303bd82d..17478a8e 100644 --- a/frontend/src/components/dashboard/KnowledgeBaseCards.tsx +++ b/frontend/src/components/dashboard/KnowledgeBaseCards.tsx @@ -20,15 +20,15 @@ export function KnowledgeBaseCards() { ] return ( -
+
-

Knowledge Base

+

Knowledge Base

@@ -41,8 +41,8 @@ export function KnowledgeBaseCards() { className="flex flex-col items-center gap-2 py-5 hover:bg-[rgba(255,255,255,0.02)] transition-colors" > -

{item.value}

-

+

{item.value}

+

{item.label}

diff --git a/frontend/src/components/dashboard/OnboardingChecklist.tsx b/frontend/src/components/dashboard/OnboardingChecklist.tsx index f4552204..810eef8c 100644 --- a/frontend/src/components/dashboard/OnboardingChecklist.tsx +++ b/frontend/src/components/dashboard/OnboardingChecklist.tsx @@ -69,11 +69,11 @@ export function OnboardingChecklist() { } return ( -
+
{/* Progress bar */}
@@ -82,15 +82,15 @@ export function OnboardingChecklist() { {/* Header */}
-

+

Getting Started

-

+

{isAllDone ? ( - You're all set! + You're all set! ) : ( - {completedCount} + {completedCount} {' '}of {totalCount} complete )} @@ -98,7 +98,7 @@ export function OnboardingChecklist() {

diff --git a/frontend/src/components/dashboard/OpenSessions.tsx b/frontend/src/components/dashboard/OpenSessions.tsx index 310a2488..fb43e334 100644 --- a/frontend/src/components/dashboard/OpenSessions.tsx +++ b/frontend/src/components/dashboard/OpenSessions.tsx @@ -17,17 +17,17 @@ interface OpenSessionsProps { export function OpenSessions({ sessions }: OpenSessionsProps) { return ( -
+
-

My Open Sessions

- +

My Open Sessions

+ View All
{sessions.length === 0 ? (
-

No open sessions

+

No open sessions

) : ( sessions.map((session, i) => ( @@ -40,19 +40,19 @@ export function OpenSessions({ sessions }: OpenSessionsProps) { >
-
{session.treeName}
-
+
{session.treeName}
+
{session.stepNumber && session.totalSteps ? `Step ${session.stepNumber} of ${session.totalSteps}` : 'In progress'} · - {session.timeAgo} + {session.timeAgo}
Resume diff --git a/frontend/src/components/dashboard/PendingEscalations.tsx b/frontend/src/components/dashboard/PendingEscalations.tsx index f5f4fe07..6a6de03f 100644 --- a/frontend/src/components/dashboard/PendingEscalations.tsx +++ b/frontend/src/components/dashboard/PendingEscalations.tsx @@ -28,7 +28,7 @@ export function PendingEscalations() { return (
-

+

Pending Escalations {escalations.length} @@ -46,7 +46,7 @@ export function PendingEscalations() {

View all @@ -64,13 +64,13 @@ export function PendingEscalations() { >
-
+
{esc.problem_summary || 'Escalated session'}
-
+
{esc.problem_domain || 'General'} · - {timeAgo(esc.created_at)} + {timeAgo(esc.created_at)}
) })} diff --git a/frontend/src/components/dashboard/QuickActions.tsx b/frontend/src/components/dashboard/QuickActions.tsx index 5a34aa3a..139b690d 100644 --- a/frontend/src/components/dashboard/QuickActions.tsx +++ b/frontend/src/components/dashboard/QuickActions.tsx @@ -12,16 +12,16 @@ export function QuickActions() { const navigate = useNavigate() return ( -
+
-

Quick Actions

+

Quick Actions

{ACTIONS.map(({ icon: Icon, label, description, href, color }) => ( ))} diff --git a/frontend/src/components/dashboard/QuickStats.tsx b/frontend/src/components/dashboard/QuickStats.tsx index f98de76b..7ed7b03b 100644 --- a/frontend/src/components/dashboard/QuickStats.tsx +++ b/frontend/src/components/dashboard/QuickStats.tsx @@ -18,16 +18,16 @@ export function QuickStats({ stats }: QuickStatsProps) { {stats.map((stat, i) => (
-

+

{stat.label}

+

-

Recent Activity

+

Recent Activity

{activities.map((item, i) => ( @@ -39,15 +39,15 @@ export function RecentActivity({ activities = DEFAULT_ACTIVITIES }: RecentActivi }} >
-

{item.description}

+

{item.description}

- + {item.timestamp}
diff --git a/frontend/src/components/dashboard/RecentFlowPilotSessions.tsx b/frontend/src/components/dashboard/RecentFlowPilotSessions.tsx index d757f84e..0467cdcc 100644 --- a/frontend/src/components/dashboard/RecentFlowPilotSessions.tsx +++ b/frontend/src/components/dashboard/RecentFlowPilotSessions.tsx @@ -41,15 +41,15 @@ export function RecentFlowPilotSessions() { if (sessions.length === 0) return null return ( -
+
-

Recent Sessions

+

Recent Sessions

History @@ -69,11 +69,11 @@ export function RecentFlowPilotSessions() { >
-

+

{session.problem_summary || 'Session'}

- + {timeAgo(session.resolved_at || session.created_at)} diff --git a/frontend/src/components/dashboard/SectionGroup.tsx b/frontend/src/components/dashboard/SectionGroup.tsx index bfd448d4..7eb7b0af 100644 --- a/frontend/src/components/dashboard/SectionGroup.tsx +++ b/frontend/src/components/dashboard/SectionGroup.tsx @@ -19,19 +19,19 @@ export function SectionGroup({ title, count, defaultOpen = true, delay = 150, ch onClick={() => setOpen(!open)} className="flex w-full items-center gap-2 py-2" > - - + + {title} {count !== undefined && ( - + {count} )}
{open &&
{children}
} diff --git a/frontend/src/components/dashboard/SessionsPanel.tsx b/frontend/src/components/dashboard/SessionsPanel.tsx index aa49a20d..edd9106d 100644 --- a/frontend/src/components/dashboard/SessionsPanel.tsx +++ b/frontend/src/components/dashboard/SessionsPanel.tsx @@ -21,14 +21,14 @@ export function SessionsPanel({ sessions, delay = 200 }: SessionsPanelProps) { if (sessions.length === 0) return null return ( -
+
-

Recent Sessions

- +

Recent Sessions

+ View All
-
+
{sessions.map(session => ( {/* Name */} - {session.treeName} + {session.treeName} {/* Progress */} - + {session.status === 'completed' ? '✓ Resolved' : session.stepNumber && session.totalSteps @@ -59,7 +59,7 @@ export function SessionsPanel({ sessions, delay = 200 }: SessionsPanelProps) { {/* Ticket */} - + {session.ticketNumber || '—'} diff --git a/frontend/src/components/dashboard/StartSessionInput.tsx b/frontend/src/components/dashboard/StartSessionInput.tsx index d57f8b12..2ff6a1db 100644 --- a/frontend/src/components/dashboard/StartSessionInput.tsx +++ b/frontend/src/components/dashboard/StartSessionInput.tsx @@ -32,12 +32,12 @@ export function StartSessionInput() { } return ( -
+
setValue(e.target.value)} onKeyDown={handleKeyDown} placeholder="What are you troubleshooting?" - className="w-full rounded-xl border border-border bg-background py-3.5 pl-11 pr-4 text-sm text-foreground placeholder:text-muted-foreground focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20" + className="w-full rounded-xl border border-[#1e2130] bg-[#0c0d10] py-3.5 pl-11 pr-4 text-sm text-[#e2e5eb] placeholder:text-[#848b9b] focus:border-[rgba(6,182,212,0.3)] focus:outline-hidden focus:ring-1 focus:ring-primary/20" />
@@ -57,8 +57,8 @@ export function StartSessionInput() { className={cn( 'flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors', mode === 'guided' - ? 'bg-primary/10 text-foreground' - : 'text-muted-foreground hover:text-foreground' + ? 'bg-[rgba(34,211,238,0.10)] text-[#e2e5eb]' + : 'text-[#848b9b] hover:text-[#e2e5eb]' )} > @@ -70,15 +70,15 @@ export function StartSessionInput() { className={cn( 'flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-colors', mode === 'chat' - ? 'bg-primary/10 text-foreground' - : 'text-muted-foreground hover:text-foreground' + ? 'bg-[rgba(34,211,238,0.10)] text-[#e2e5eb]' + : 'text-[#848b9b] hover:text-[#e2e5eb]' )} > Open Chat
- + Press Enter to start
diff --git a/frontend/src/components/dashboard/TeamSummary.tsx b/frontend/src/components/dashboard/TeamSummary.tsx index a98c814c..74d5e365 100644 --- a/frontend/src/components/dashboard/TeamSummary.tsx +++ b/frontend/src/components/dashboard/TeamSummary.tsx @@ -25,15 +25,15 @@ export function TeamSummary() { ] return ( -
+
-

Team Summary

+

Team Summary

@@ -46,8 +46,8 @@ export function TeamSummary() { className="flex flex-col items-center gap-2 py-5 hover:bg-[rgba(255,255,255,0.02)] transition-colors" > -

{item.value}

-

+

{item.value}

+

{item.label}

diff --git a/frontend/src/components/dashboard/TreeListItem.tsx b/frontend/src/components/dashboard/TreeListItem.tsx index 5561e7a3..769290c5 100644 --- a/frontend/src/components/dashboard/TreeListItem.tsx +++ b/frontend/src/components/dashboard/TreeListItem.tsx @@ -33,7 +33,7 @@ export function TreeListItem({ return (
navigate(getTreeNavigatePath(id, treeType))} - className="group grid cursor-pointer items-center gap-3 rounded-lg border border-transparent bg-card px-4 py-3 transition-colors hover:border-border hover:bg-[var(--sidebar-hover)]" + className="group grid cursor-pointer items-center gap-3 rounded-lg border border-transparent bg-[#14161d] px-4 py-3 transition-colors hover:border-[#1e2130] hover:bg-[var(--sidebar-hover)]" style={{ gridTemplateColumns: '40px 1fr 130px 80px 100px 40px' }} > {/* Icon box */} @@ -46,15 +46,15 @@ export function TreeListItem({ {/* Info */}
-

{name}

+

{name}

{tags.slice(0, 3).map(tag => ( - + {tag} ))} {description && tags.length === 0 && ( - {description} + {description} )}
@@ -64,13 +64,13 @@ export function TreeListItem({ {category && ( <> - {category.name} + {category.name} )}
{/* Usage count */} -
+
{usageCount} uses
@@ -85,7 +85,7 @@ export function TreeListItem({ e.stopPropagation() navigate(getTreeEditorPath(id, treeType)) }} - className="flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100" + className="flex h-8 w-8 items-center justify-center rounded-md text-[#848b9b] opacity-0 transition-opacity hover:bg-accent group-hover:opacity-100" > diff --git a/frontend/src/components/dashboard/WeeklyCalendar.tsx b/frontend/src/components/dashboard/WeeklyCalendar.tsx index db289cfe..3c0f618c 100644 --- a/frontend/src/components/dashboard/WeeklyCalendar.tsx +++ b/frontend/src/components/dashboard/WeeklyCalendar.tsx @@ -34,10 +34,10 @@ export function WeeklyCalendar({ events = {} }: WeeklyCalendarProps) { const days = useMemo(() => getWeekDays(), []) return ( -
+
- -

This Week

+ +

This Week

{days.map((day, i) => { @@ -56,10 +56,10 @@ export function WeeklyCalendar({ events = {} }: WeeklyCalendarProps) { borderBottom: day.isToday ? '2px solid #06b6d4' : '1px solid var(--glass-border)', }} > - + {day.label} -
+
{day.date.getDate()}
@@ -76,8 +76,8 @@ export function WeeklyCalendar({ events = {} }: WeeklyCalendarProps) { background: 'rgba(255, 255, 255, 0.02)', }} > -
{event.title}
-
{event.time}
+
{event.title}
+
{event.time}
)) )}