Add some tests, make it an actual endpoint (whoops said we didn't need that) and tidy things up a bit

This commit is contained in:
Jack Kingsman
2026-04-02 12:43:42 -07:00
parent 967dd05fad
commit 5f969017f7
9 changed files with 157 additions and 42 deletions
@@ -47,16 +47,8 @@ function formatUptime(seconds: number): string {
return `${(seconds / 86400).toFixed(1)}d`;
}
export function TelemetryHistoryPane({
entries,
statusFetchedAt,
}: {
entries: TelemetryHistoryEntry[];
statusFetchedAt?: number | null;
}) {
export function TelemetryHistoryPane({ entries }: { entries: TelemetryHistoryEntry[] }) {
const [metric, setMetric] = useState<Metric>('battery_volts');
// statusFetchedAt is used to indicate freshness; suppress unused lint
void statusFetchedAt;
const config = METRIC_CONFIG[metric];