fix(meshcore): honor Temperature Unit on the DM telemetry graph (#3659)#3662
Conversation
The per-node telemetry graph on the MeshCore Direct Messages page rendered temperature in Celsius regardless of the user's Temperature Unit setting, because it mounted <TelemetryGraphs> without the `temperatureUnit` prop (which defaults to 'C'). TelemetryGraphs already performs the conversion — the Meshtastic DM view and the MeshCore Telemetry dashboard already pass it; only this call site was missing it. Pass `temperatureUnit` and `telemetryVisualizationHours` from useSettings, mirroring MessagesTab. Axis label and tooltip now reflect °F/°C per the setting. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011JEaCGwY9Wz8jeV4e22GW4
|
Claude finished @Yeraze's task —— View job PR Review: fix(meshcore): honor Temperature Unit on the DM telemetry graph
SummaryThis is a clean, minimal, and correct fix. The root cause was clearly identified and the solution mirrors the existing pattern used in Implementation (
|
Summary
Closes #3659.
The per-node telemetry graph on the MeshCore Direct Messages page always showed temperature in Celsius regardless of the user's Temperature Unit setting. Root cause: it mounted
<TelemetryGraphs nodeId=… baseUrl=… />without thetemperatureUnitprop, which defaults to'C'.TelemetryGraphsalready does the conversion (viaformatTemperature), and both the Meshtastic DM view (MessagesTab.tsx) and the MeshCore Telemetry dashboard (MeshCoreTelemetryView.tsx) already passtemperatureUnit— only this one call site was missing it.Fix
Pass
temperatureUnitandtelemetryVisualizationHoursfromuseSettings()into the DM-pageTelemetryGraphs, mirroringMessagesTab. Axis label + tooltip now reflect °F/°C per the setting.Testing
MeshCoreDirectMessagesView.test.tsx— asserts the graph receivestemperatureUnitand the telemetry hours from settings (12 tests pass).tscclean.🤖 Generated with Claude Code