diff --git a/dashboard/components/Header.js b/dashboard/components/Header.js deleted file mode 100644 index 49f7961..0000000 --- a/dashboard/components/Header.js +++ /dev/null @@ -1,58 +0,0 @@ -import { html, useState, useEffect } from '../lib/preact.js'; - -export function Header({ sessions }) { - const [clock, setClock] = useState(() => new Date()); - - useEffect(() => { - const timer = setInterval(() => setClock(new Date()), 30000); - return () => clearInterval(timer); - }, []); - - const counts = { - attention: sessions.filter(s => s.status === 'needs_attention').length, - active: sessions.filter(s => s.status === 'active').length, - starting: sessions.filter(s => s.status === 'starting').length, - done: sessions.filter(s => s.status === 'done').length, - }; - const total = sessions.length; - - return html` -
-
-
-
-
- - Control Plane -
-

- Agent Mission Control -

-

- ${total} live session${total === 1 ? '' : 's'} • Updated ${clock.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })} -

-
- -
-
-
${counts.attention}
-
Attention
-
-
-
${counts.active}
-
Active
-
-
-
${counts.starting}
-
Starting
-
-
-
${counts.done}
-
Done
-
-
-
-
-
- `; -} diff --git a/dashboard/components/SessionGroup.js b/dashboard/components/SessionGroup.js deleted file mode 100644 index 166ff22..0000000 --- a/dashboard/components/SessionGroup.js +++ /dev/null @@ -1,56 +0,0 @@ -import { html } from '../lib/preact.js'; -import { getStatusMeta, STATUS_PRIORITY } from '../utils/status.js'; -import { SessionCard } from './SessionCard.js'; - -export function SessionGroup({ projectName, projectDir, sessions, onCardClick, conversations, onFetchConversation, onRespond, onDismiss }) { - if (sessions.length === 0) return null; - - // Status summary for chips - const statusCounts = {}; - for (const s of sessions) { - statusCounts[s.status] = (statusCounts[s.status] || 0) + 1; - } - - // Group header dot uses the most urgent status - const worstStatus = sessions.reduce((worst, s) => { - return (STATUS_PRIORITY[s.status] ?? 99) < (STATUS_PRIORITY[worst] ?? 99) ? s.status : worst; - }, 'done'); - const worstMeta = getStatusMeta(worstStatus); - - return html` -
-
- -

${projectName}

- - ${sessions.length} agent${sessions.length === 1 ? '' : 's'} - - ${Object.entries(statusCounts).map(([status, count]) => { - const meta = getStatusMeta(status); - return html` - - ${count} ${meta.label.toLowerCase()} - - `; - })} -
- ${projectDir && projectDir !== 'unknown' && html` -
${projectDir}
- `} - -
- ${sessions.map(session => html` - <${SessionCard} - key=${session.session_id} - session=${session} - onClick=${onCardClick} - conversation=${conversations[session.session_id]} - onFetchConversation=${onFetchConversation} - onRespond=${onRespond} - onDismiss=${onDismiss} - /> - `)} -
-
- `; -}