From 74a3e9cb7991769afebdef6a86f3ccba40ee0432 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 15 Sep 2026 22:44:19 -0700 Subject: [PATCH] fix(clients): hold the discovered machine icon across relay refreshes Discovery empties its map at the start of every refresh, so a saved but unreached row blinked back to the generic server glyph each time. Keep the last descriptor seen. Also drop a dead unsupported guard on the web subtitle tone and keep the unsupported tooltip on the compatibility text. Co-Authored-By: Claude Fable 5.1 --- .../connection/CloudEnvironmentRows.tsx | 9 +++++++-- .../settings/ConnectionsSettings.tsx | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx b/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx index b1748b1938c7..dbb1dca068d4 100644 --- a/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx +++ b/apps/mobile/src/features/connection/CloudEnvironmentRows.tsx @@ -235,6 +235,12 @@ function ConnectedCloudEnvironmentRow(props: { ); const unsupported = props.environment.connectionState === "unsupported"; const enabled = props.environment.isEnabled && !unsupported; + // Discovery empties its map on every refresh; hold the last descriptor seen + // so the glyph does not blink back to the generic one each time. + const [lastDescriptor, setLastDescriptor] = useState(props.descriptor); + if (props.descriptor !== undefined && props.descriptor !== lastDescriptor) { + setLastDescriptor(props.descriptor); + } return ( } @@ -1571,8 +1574,8 @@ function SavedBackendListRow({ {subtitleText} - {unsupported && environment.connection.error - ? environment.connection.error + {unsupported + ? (environment.connection.error ?? connectionStatusText(environment.connection)) : enabled ? connectionStatusText(environment.connection) : "Switched off"}