diff --git a/frontend/src/components/projects/AgentPanel.tsx b/frontend/src/components/projects/AgentPanel.tsx index a165d73..ac17d14 100644 --- a/frontend/src/components/projects/AgentPanel.tsx +++ b/frontend/src/components/projects/AgentPanel.tsx @@ -126,7 +126,7 @@ function AgentListItem({ onAction(agent.id, 'view')}> View Details - {agent.status === 'active' || agent.status === 'working' ? ( + {agent.status === 'working' || agent.status === 'waiting' ? ( onAction(agent.id, 'pause')}> Pause Agent @@ -196,7 +196,7 @@ export function AgentPanel({ } const activeAgentCount = agents.filter( - (a) => a.status === 'active' || a.status === 'working' + (a) => a.status === 'working' || a.status === 'waiting' ).length; return ( diff --git a/frontend/src/components/projects/AgentStatusIndicator.tsx b/frontend/src/components/projects/AgentStatusIndicator.tsx index 8c26029..14a2751 100644 --- a/frontend/src/components/projects/AgentStatusIndicator.tsx +++ b/frontend/src/components/projects/AgentStatusIndicator.tsx @@ -14,21 +14,17 @@ const statusConfig: Record = { color: 'bg-yellow-500', label: 'Idle', }, - active: { - color: 'bg-green-500', - label: 'Active', - }, working: { color: 'bg-green-500 animate-pulse', label: 'Working', }, - pending: { - color: 'bg-gray-400', - label: 'Pending', + waiting: { + color: 'bg-blue-500', + label: 'Waiting', }, - error: { - color: 'bg-red-500', - label: 'Error', + paused: { + color: 'bg-gray-400', + label: 'Paused', }, terminated: { color: 'bg-gray-600', @@ -49,7 +45,7 @@ export function AgentStatusIndicator({ showLabel = false, className, }: AgentStatusIndicatorProps) { - const config = statusConfig[status] || statusConfig.pending; + const config = statusConfig[status] || statusConfig.idle; const sizeClasses = { sm: 'h-2 w-2', diff --git a/frontend/src/components/projects/IssueSummary.tsx b/frontend/src/components/projects/IssueSummary.tsx index 4333965..6cd68c0 100644 --- a/frontend/src/components/projects/IssueSummary.tsx +++ b/frontend/src/components/projects/IssueSummary.tsx @@ -24,7 +24,7 @@ import { } from '@/components/ui/card'; import { Separator } from '@/components/ui/separator'; import { Skeleton } from '@/components/ui/skeleton'; -import type { IssueSummary as IssueSummaryType } from './types'; +import type { IssueCountSummary } from './types'; // ============================================================================ // Types @@ -32,7 +32,7 @@ import type { IssueSummary as IssueSummaryType } from './types'; interface IssueSummaryProps { /** Issue summary data */ - summary: IssueSummaryType | null; + summary: IssueCountSummary | null; /** Whether data is loading */ isLoading?: boolean; /** Callback when "View All Issues" is clicked */ @@ -171,8 +171,8 @@ export function IssueSummary({ {onViewAllIssues && ( diff --git a/frontend/src/components/projects/ProjectDashboard.tsx b/frontend/src/components/projects/ProjectDashboard.tsx index e5ce54e..9f217a8 100644 --- a/frontend/src/components/projects/ProjectDashboard.tsx +++ b/frontend/src/components/projects/ProjectDashboard.tsx @@ -28,7 +28,7 @@ import type { AgentInstance, Sprint, BurndownDataPoint, - IssueSummary as IssueSummaryType, + IssueCountSummary, ActivityItem, } from './types'; @@ -52,7 +52,7 @@ const mockProject: Project = { id: 'proj-001', name: 'E-Commerce Platform Redesign', description: 'Complete redesign of the e-commerce platform with modern UI/UX', - status: 'in_progress', + status: 'active', autonomy_level: 'milestone', current_sprint_id: 'sprint-003', created_at: '2025-01-15T00:00:00Z', @@ -66,7 +66,7 @@ const mockAgents: AgentInstance[] = [ project_id: 'proj-001', name: 'Product Owner', role: 'product_owner', - status: 'active', + status: 'working', current_task: 'Reviewing user story acceptance criteria', last_activity_at: new Date(Date.now() - 2 * 60 * 1000).toISOString(), spawned_at: '2025-01-15T00:00:00Z', @@ -102,7 +102,7 @@ const mockAgents: AgentInstance[] = [ project_id: 'proj-001', name: 'Frontend Engineer', role: 'frontend_engineer', - status: 'active', + status: 'working', current_task: 'Implementing product catalog component', last_activity_at: new Date(Date.now() - 1 * 60 * 1000).toISOString(), spawned_at: '2025-01-15T00:00:00Z', @@ -114,7 +114,7 @@ const mockAgents: AgentInstance[] = [ project_id: 'proj-001', name: 'QA Engineer', role: 'qa_engineer', - status: 'pending', + status: 'waiting', current_task: 'Preparing test cases for Sprint 3', last_activity_at: new Date(Date.now() - 30 * 60 * 1000).toISOString(), spawned_at: '2025-01-15T00:00:00Z', @@ -148,12 +148,12 @@ const mockBurndownData: BurndownDataPoint[] = [ { day: 8, remaining: 20, ideal: 24 }, ]; -const mockIssueSummary: IssueSummaryType = { +const mockIssueSummary: IssueCountSummary = { open: 12, in_progress: 8, in_review: 3, blocked: 2, - done: 45, + closed: 45, total: 70, }; @@ -392,7 +392,7 @@ export function ProjectDashboard({ projectId, className }: ProjectDashboardProps = { - draft: { - label: 'Draft', - className: 'bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-200', - }, - in_progress: { - label: 'In Progress', + active: { + label: 'Active', className: 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200', }, paused: { @@ -32,10 +28,6 @@ const projectStatusConfig: Record diff --git a/frontend/src/components/projects/types.ts b/frontend/src/components/projects/types.ts index 7617ba7..c7996f9 100644 --- a/frontend/src/components/projects/types.ts +++ b/frontend/src/components/projects/types.ts @@ -11,7 +11,10 @@ // Project Types // ============================================================================ -export type ProjectStatus = 'draft' | 'in_progress' | 'paused' | 'completed' | 'blocked' | 'archived'; +/** + * Matches backend: ProjectStatus enum in app/models/syndarix/enums.py + */ +export type ProjectStatus = 'active' | 'paused' | 'completed' | 'archived'; export type AutonomyLevel = 'full_control' | 'milestone' | 'autonomous'; @@ -31,7 +34,10 @@ export interface Project { // Agent Types // ============================================================================ -export type AgentStatus = 'idle' | 'active' | 'working' | 'pending' | 'error' | 'terminated'; +/** + * Matches backend: AgentStatus enum in app/models/syndarix/enums.py + */ +export type AgentStatus = 'idle' | 'working' | 'waiting' | 'paused' | 'terminated'; export interface AgentInstance { id: string; @@ -50,7 +56,10 @@ export interface AgentInstance { // Sprint Types // ============================================================================ -export type SprintStatus = 'planning' | 'active' | 'review' | 'completed'; +/** + * Matches backend: SprintStatus enum in app/models/syndarix/enums.py + */ +export type SprintStatus = 'planned' | 'active' | 'in_review' | 'completed' | 'cancelled'; export interface Sprint { id: string; @@ -78,7 +87,10 @@ export interface BurndownDataPoint { // Issue Types // ============================================================================ -export type IssueStatus = 'open' | 'in_progress' | 'in_review' | 'blocked' | 'done' | 'closed'; +/** + * Matches backend: IssueStatus enum in app/models/syndarix/enums.py + */ +export type IssueStatus = 'open' | 'in_progress' | 'in_review' | 'blocked' | 'closed'; export type IssuePriority = 'low' | 'medium' | 'high' | 'critical'; @@ -96,12 +108,12 @@ export interface Issue { labels?: string[]; } -export interface IssueSummary { +export interface IssueCountSummary { open: number; in_progress: number; in_review: number; blocked: number; - done: number; + closed: number; total: number; }