Conversation
- Capture environmentMetrics packets in useDevice (temp, humidity, pressure, IAQ, lux, wind) as time-series and per-node latest values - TelemetryPanel: three new charts (Temp/Humidity, Pressure, IAQ) with °C/°F toggle persisted to localStorage - NodeInfoBody: Environment section shows latest sensor readings for any node with env data; respects useFahrenheit prop - NodeDetailModal: passes useFahrenheit through to NodeInfoBody - ChatPanel: circular-arrow resend button on failed own messages Fixes #88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements two feature-parity items from issue #88 (matching Ian's meshtastic-cli):
EnvironmentMetricspackets (BME280/BME680/weather stations) with per-node latest readings and time-series chartsChanges
src/renderer/lib/types.tsEnvironmentTelemetryPointinterface with all protobuf env fields:temperature,relativeHumidity,barometricPressure,gasResistance,iaq,lux,windSpeed,windDirection,windGust,windLull,weight,rainfall1h,rainfall24henv_*fields onMeshNode(session-only, not persisted to DB — no schema change required)src/renderer/hooks/useDevice.tsonTelemetryPackettype cast to include all env metric fieldsenvironmentMetricsvariant handler: records time-series intoenvironmentTelemetrystate (capped atMAX_TELEMETRY_POINTS), and patches per-nodeenv_*fields onMeshNodeviaupdateNodesenvironmentTelemetry: EnvironmentTelemetryPoint[]exported from the hooksrc/renderer/components/TelemetryPanel.tsxenvironmentTelemetry,useFahrenheit,onToggleFahrenheittoF()helper for Celsius → Fahrenheit conversionlocalStorage['mesh-client:useFahrenheit']env_temperature_c,env_humidity_pct,env_pressure_hpa,env_iaqcolumnssrc/renderer/components/NodeInfoBody.tsxiaqLabel()helper maps IAQ score (0–500) to human-readable category (Excellent → Severely Polluted)useFahrenheit?: booleanpropNodeDetailModalandMapPanelLeaflet popups automaticallysrc/renderer/components/NodeDetailModal.tsxuseFahrenheit?: booleanprop threaded through toNodeInfoBodysrc/renderer/components/ChatPanel.tsxonResend: (msg: ChatMessage) => voidpropmsg.status === 'failed'(device/RF transport failure only — not triggered by MQTT-only failure). Clicking callsonResend(msg)withstopPropagation.src/renderer/App.tsxuseFahrenheitstate with localStorage persistencetoggleFahrenheitcallback (stable viauseCallback)handleResendcallback — callsdevice.sendMessagewith originalpayload,channel, andto(DM destination if set)TelemetryPanel,NodeDetailModal,ChatPanelsrc/renderer/components/ChatPanel.test.tsxonResend: vi.fn()to the default test props to satisfy the new required propTest plan
npm run build:renderer— no TypeScript or lint errorsnpm test— all 66 tests passFixes #88