/** * @file The compact lane tile used in the Workspace carousel. It carries only * what you need to pick a lane — which lane, is it alive, what stage, how far — * because the full card, its controls and its working-copy facts live in the * detail panel below. Keeping the tile small is what lets a dozen lanes stay * scannable in one horizontal row. * @author Nguyễn Ngọc Trí Vĩ */ import { useTranslation } from "react-i18next"; import type { Lane } from "../../lib/types"; const LIVENESS_DOT: Record = { active: "bg-status-success", idle: "bg-surface-4", dead: "bg-status-danger", }; /** Whether the inferred stage sits ahead of the declared one in node order. */ function detectionLeads(lane: Lane): boolean { if (!lane.detected_stage) return false; const ids = lane.pipeline_nodes.map((n) => n.id); return ids.indexOf(lane.detected_stage) > ids.indexOf(lane.stage); } export default function LaneStripCard({ lane, selected, onSelect, }: { lane: Lane; selected: boolean; onSelect: () => void; }) { const { t } = useTranslation(["lanes"]); return ( ); }