import { useQuery, useQueryClient } from '@tanstack/react-query' import { listProjects } from '../services/api' import { AlertCircle, RefreshCw, FolderKanban, Users } from 'lucide-react' const STATUS_COLORS: Record = { planned: 'bg-purple-500', active: 'bg-green-500', paused: 'bg-yellow-500', completed: 'bg-blue-400', } export default function ProjectsPage() { const queryClient = useQueryClient() const { data, isLoading, error } = useQuery({ queryKey: ['projects'], queryFn: listProjects, }) const projects = data?.data ?? [] if (isLoading) return if (error) { return (

Failed to load projects

) } return (

Projects

Tracked projects and initiatives

{projects.length === 0 ? (

No projects tracked

Projects synced from Linear will appear here.

) : (
{projects.map((project) => (

{project.name}

{project.description && (

{project.description}

)}
{project.agentIds?.length ?? 0} agent{(project.agentIds?.length ?? 0) !== 1 ? 's' : ''} assigned
))}
)}
) } function ProjectStatusBadge({ status }: { status: string }) { return (
{status}
) } function ProjectsSkeleton() { return (
{[...Array(6)].map((_, i) => (
))}
) }