From ce1fbe4b0144f9cbf4c26b0319d892aef61cf067 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 30 Sep 2026 11:10:55 -0600 Subject: [PATCH] fix: Correct status retrieval in HealthItem component to access nested commMonitor state --- src/components/TechControls/SystemStatus/HealthItem.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/TechControls/SystemStatus/HealthItem.tsx b/src/components/TechControls/SystemStatus/HealthItem.tsx index 158e22a..167e8db 100644 --- a/src/components/TechControls/SystemStatus/HealthItem.tsx +++ b/src/components/TechControls/SystemStatus/HealthItem.tsx @@ -20,7 +20,10 @@ export const HealthItem = ({ deviceKey }: { deviceKey: string }) => { // `communicationMonitorState` is typed as always present, but in practice it (like the rest of a // device's state) is only populated once `/fullStatus` actually returns - chain past it too. const state = monitor?.communicationMonitorState; - const status = (state?.status ?? 'StatusUnknown') as HealthStatus; + // The hook hands back the device's whole state, and `ICommunicationMonitorMessenger` nests the + // monitor under `commMonitor` ({ commMonitor: { isOnline, status } }). The top-level `status` the + // hook's type suggests is never sent, so reading it left every device "never online". + const status = (state?.commMonitor?.status ?? 'StatusUnknown') as HealthStatus; const minutes = useMinutesInStatus(status); return (