diff --git a/frontend/src/components/repeater/RepeaterTelemetryHistoryPane.tsx b/frontend/src/components/repeater/RepeaterTelemetryHistoryPane.tsx index 9b3f706..4f43f84 100644 --- a/frontend/src/components/repeater/RepeaterTelemetryHistoryPane.tsx +++ b/frontend/src/components/repeater/RepeaterTelemetryHistoryPane.tsx @@ -338,6 +338,56 @@ export function TelemetryHistoryPane({ } }; + const formatSeriesValue = (key: string, value: number): string => { + if (key === 'recv_error_pct') return `${value}%`; + if (activeMetric === 'uptime_seconds') return formatUptime(value); + const suffix = + activeConfig.unit && activeMetric !== 'packets' && activeMetric !== 'recv_errors' + ? ` ${activeConfig.unit}` + : ''; + return `${value}${suffix}`; + }; + + // Custom tooltip so each row carries a color swatch matching its line — + // essential for the multi-series packets view where four values overlap. + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const renderTooltip = ({ active, payload, label }: any) => { + if (!active || !Array.isArray(payload) || payload.length === 0) return null; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const rows = (payload as any[]).filter((p) => p.value != null); + if (rows.length === 0) return null; + return ( +