/** * QueueItem -- a single row in the queue list. * * Shows type badge, staleness indicator, title, project/IID, and requestedBy. * Clicking sets this item as THE ONE THING. */ import type { FocusItem, FocusItemType, Staleness } from "@/lib/types"; import { computeStaleness } from "@/lib/types"; import { formatIid } from "@/lib/format"; export interface QueueItemProps { item: FocusItem; onClick: (id: string) => void; isFocused?: boolean; isDragging?: boolean; } const TYPE_LABELS: Record = { mr_review: "MR REVIEW", issue: "ISSUE", mr_authored: "MR AUTHORED", manual: "TASK", }; const STALENESS_DOT: Record = { fresh: "bg-mc-fresh", normal: "bg-zinc-500", amber: "bg-mc-amber", urgent: "bg-mc-urgent animate-pulse", }; const STALENESS_LABEL: Record = { fresh: "Updated recently", normal: "Updated 1-2 days ago", amber: "Updated 3-6 days ago", urgent: "Needs attention - over a week old", }; export function QueueItem({ item, onClick, isFocused = false, isDragging = false, }: QueueItemProps): React.ReactElement { const staleness = computeStaleness(item.updatedAt); return ( ); }