// Shared small primitives for the admin UI kit. // Status tone + tiny SVG icons + labels matching the codebase. const STATUS_LABELS = { queued: 'Inbox', running: 'Running', waiting_human: 'Waiting', waiting_subtasks: 'Subtasks', retry: 'Retry', succeeded: 'Done', failed: 'Failed', cancelled: 'Cancelled', }; const STATUS_TONE = { running: { bg: '#dcfce7', fg: '#166534' }, waiting_human: { bg: '#fef9c3', fg: '#854d0e' }, waiting_subtasks: { bg: '#e0e7ff', fg: '#3730a3' }, failed: { bg: '#fee2e2', fg: '#b91c1c' }, succeeded: { bg: '#dbeafe', fg: '#1e40af' }, retry: { bg: '#fef3c7', fg: '#92400e' }, queued: { bg: '#e2e8f0', fg: '#475569' }, cancelled: { bg: '#e2e8f0', fg: '#475569' }, }; function StatusBadge({ status, small }) { const tone = STATUS_TONE[status] || STATUS_TONE.queued; const label = STATUS_LABELS[status] || status; const style = { background: tone.bg, color: tone.fg, fontSize: small ? 10 : 11, fontWeight: 700, padding: small ? '1px 8px' : '2px 10px', borderRadius: 9999, display: 'inline-flex', alignItems: 'center', whiteSpace: 'nowrap', }; return {label}; } function StatChip({ label, value, color }) { return (