diff --git a/ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-row.tsx b/ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-row.tsx new file mode 100644 index 00000000000..27f27c77c54 --- /dev/null +++ b/ui/litellm-dashboard/src/app/(dashboard)/agents/components/session-row.tsx @@ -0,0 +1,54 @@ +"use client"; + +/** + * SessionRow — single entry in the SessionList sidebar. + * + * Status pill colors map session.status to antd Tag colors. We avoid + * "yellow" intentionally (per CLAUDE.md UI rules); use "gold" for amber. + */ +import Link from "next/link"; +import { Tag, Typography } from "antd"; +import dayjs from "dayjs"; +import type { CloudAgentSession, CloudAgentSessionStatus } from "@/types/cloud-agents"; + +const { Text, Paragraph } = Typography; + +const STATUS_TO_COLOR: Record = { + provisioning: "gold", + running: "blue", + paused: "default", + completed: "green", + failed: "red", +}; + +interface SessionRowProps { + session: CloudAgentSession; + active: boolean; +} + +export default function SessionRow({ session, active }: SessionRowProps) { + const updated = dayjs(session.updated_at); + const updatedLabel = updated.fromNow?.() ?? updated.format("YYYY-MM-DD HH:mm"); + return ( + +
+ + {session.title || "Untitled session"} + + + {session.status} + +
+ + {session.branch} • {updatedLabel} + + + ); +}