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 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 15:31:34 +03:00
co-authored by Claude Opus 5.5
parent e663b0a609
commit 3f3d2cc63c
+4 -14
View File
@@ -4,10 +4,9 @@
// //
// Props: // Props:
// rssi — number | null | undefined — signal strength in dBm (e.g. -62). null/undefined = unknown. // rssi — number | null | undefined — signal strength in dBm (e.g. -62). null/undefined = unknown.
// isOnline — boolean | undefined — when explicitly false, renders a dimmed amber // isOnline — boolean | undefined — when explicitly false, renders a fully grey
// glyph with a diagonal slash overlay regardless of rssi, so a stale // (unlit) glyph regardless of rssi, so a stale last-known reading from
// last-known reading from an offline device never reads as a live // an offline device never reads as a live "full signal". When true (or undefined) but rssi is null/undefined,
// "full signal". When true (or undefined) but rssi is null/undefined,
// renders an amber "?" instead — legacy v1-firmware devices report a // renders an amber "?" instead — legacy v1-firmware devices report a
// heartbeat with no rssi field at all (see API Reference: legacy // heartbeat with no rssi field at all (see API Reference: legacy
// heartbeats predate rssi/state/ok), so "online with unknown signal" // 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 unsupported = !offline && !known && isOnline === true
const muted = offline || unsupported const muted = offline || unsupported
const level = known ? rssiToLevel(rssi) : 0 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 { box, strokeWidth } = SIZES[size] || SIZES.md
const label = offline const label = offline
? 'Signal strength unavailable — device offline' ? 'Signal strength unavailable — device offline'
@@ -101,15 +100,6 @@ export default function SignalIndicator({ rssi, isOnline, size = 'md', className
strokeLinecap="round" strokeLinecap="round"
style={{ transition: 'stroke 0.2s' }} style={{ transition: 'stroke 0.2s' }}
/> />
{/* Offline overlay — amber diagonal slash, standard "no signal" convention */}
{offline && (
<path
d="M3 21L21 3"
stroke={color}
strokeWidth={strokeWidth}
strokeLinecap="round"
/>
)}
{/* Unsupported overlay — amber "?", device is online but its firmware never reports rssi (v1 API) */} {/* Unsupported overlay — amber "?", device is online but its firmware never reports rssi (v1 API) */}
{unsupported && ( {unsupported && (
<text <text