From 3f3d2cc63c6905cb89cc242af17f02711bc8a723 Mon Sep 17 00:00:00 2001 From: bonamin Date: Wed, 30 Sep 2026 15:31:34 +0300 Subject: [PATCH] fix(ui): offline SignalIndicator is plain grey, no amber slash The amber diagonal slash on offline devices was too loud on the Fleet list. Offline now renders all arcs unlit in the neutral dim colour. The amber "?" for online-but-no-rssi (legacy v1 firmware) is unchanged. Co-Authored-By: Claude Opus 5.5 --- frontend/src/components/ui/SignalIndicator.jsx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/ui/SignalIndicator.jsx b/frontend/src/components/ui/SignalIndicator.jsx index 4227046..01f3432 100644 --- a/frontend/src/components/ui/SignalIndicator.jsx +++ b/frontend/src/components/ui/SignalIndicator.jsx @@ -4,10 +4,9 @@ // // Props: // rssi — number | null | undefined — signal strength in dBm (e.g. -62). null/undefined = unknown. -// isOnline — boolean | undefined — when explicitly false, renders a dimmed amber -// glyph with a diagonal slash overlay regardless of rssi, so a stale -// last-known reading from an offline device never reads as a live -// "full signal". When true (or undefined) but rssi is null/undefined, +// isOnline — boolean | undefined — when explicitly false, renders a fully grey +// (unlit) glyph regardless of rssi, so a stale last-known reading from +// an offline device never reads as a live "full signal". When true (or undefined) but rssi is null/undefined, // renders an amber "?" instead — legacy v1-firmware devices report a // heartbeat with no rssi field at all (see API Reference: legacy // heartbeats predate rssi/state/ok), so "online with unknown signal" @@ -51,7 +50,7 @@ export default function SignalIndicator({ rssi, isOnline, size = 'md', className const unsupported = !offline && !known && isOnline === true const muted = offline || unsupported const level = known ? rssiToLevel(rssi) : 0 - const color = muted ? 'var(--color-warning)' : rssiToColor(known ? rssi : null) + const color = unsupported ? 'var(--color-warning)' : rssiToColor(known ? rssi : null) const { box, strokeWidth } = SIZES[size] || SIZES.md const label = offline ? 'Signal strength unavailable — device offline' @@ -101,15 +100,6 @@ export default function SignalIndicator({ rssi, isOnline, size = 'md', className strokeLinecap="round" style={{ transition: 'stroke 0.2s' }} /> - {/* Offline overlay — amber diagonal slash, standard "no signal" convention */} - {offline && ( - - )} {/* Unsupported overlay — amber "?", device is online but its firmware never reports rssi (v1 API) */} {unsupported && (