// frontend/src/shell/NavSessions.tsx import type { ReactNode } from "react"; import type { SessionSummary } from "../api/types"; import { Checkbox } from "../components/ui/checkbox"; interface Props { sessions: SessionSummary[]; activeSessionId: string | null; onOpenPanel: (id: string) => void; menuFor: (session: SessionSummary) => ReactNode; selectedIds?: ReadonlySet; onSelectionChange?: (id: string, selected: boolean) => void; showOwner?: boolean; } function statusIndicator(status: string) { if (status === "finalized") return { color: "bg-[oklch(var(--success))]", label: "Completed" }; if (status === "closed") return { color: "bg-[oklch(var(--warning))]", label: "Stopped by user" }; if (status === "failed") return { color: "bg-destructive", label: "Stopped by system error" }; return { color: "bg-muted-foreground/50", label: "In progress" }; } export function NavSessions({ sessions, activeSessionId, onOpenPanel, menuFor, selectedIds = new Set(), onSelectionChange = () => undefined, showOwner = false, }: Props) { if (sessions.length === 0) { return (

No sessions yet. Start with New session.

); } return ( ); }