// Compact cadence labels for the scheduler table's chips: "10m", "1w", "off", // "default". Deliberately terse — the point of the column is that 40 channels' // cadences stay scannable at a glance; the expanded editor spells everything // out in full. export function formatCadence(configuredMinutes: number | undefined): string { if (configuredMinutes === undefined) return "default"; return formatMinutes(configuredMinutes); } export function formatMinutes(minutes: number): string { if (minutes <= 0) return "off"; if (minutes % 10080 === 0) return `${minutes / 10080}w`; if (minutes % 1440 === 0) return `${minutes / 1440}d`; if (minutes % 60 === 0) return `${minutes / 60}h`; return `${minutes}m`; }