| ... | ... | @@ -1523,14 +1523,20 @@ function SavedBackendListRow({ |
| 1523 | 1523 | const serverVersion = environment.serverConfig?.environment.serverVersion ?? null; |
| 1524 | 1524 | // A saved T3 Connect machine this device has never reached (unsupported, |
| 1525 | 1525 | // or not yet connected) still has a descriptor from relay discovery, so |
| 1526 | | // it can wear its detected glyph instead of the generic server. |
| 1526 | // it can wear its detected glyph instead of the generic server. Discovery |
| 1527 | // empties its map on every refresh, so hold the last descriptor seen or |
| 1528 | // the glyph would blink back to the generic one each time. |
| 1527 | 1529 | const relayDiscovery = useRelayEnvironmentDiscovery(); |
| 1528 | 1530 | const discoveredDescriptor = Option.getOrNull( |
| 1529 | 1531 | relayDiscovery.environments.get(environmentId)?.status ?? Option.none(), |
| 1530 | 1532 | )?.descriptor; |
| 1533 | const [lastDescriptor, setLastDescriptor] = useState(discoveredDescriptor); |
| 1534 | if (discoveredDescriptor !== undefined && discoveredDescriptor !== lastDescriptor) { |
| 1535 | setLastDescriptor(discoveredDescriptor); |
| 1536 | } |
| 1531 | 1537 | const machineKind = resolveEnvironmentMachineKind( |
| 1532 | 1538 | environment.serverConfig ?? |
| 1533 | | (discoveredDescriptor === undefined ? null : { environment: discoveredDescriptor }), |
| 1539 | (lastDescriptor === undefined ? null : { environment: lastDescriptor }), |
| 1534 | 1540 | ); |
| 1535 | 1541 | const subtitleText = [ |
| 1536 | 1542 | environmentTransportLabel(environment), |
| ... | ... | @@ -1560,10 +1566,7 @@ function SavedBackendListRow({ |
| 1560 | 1566 | <span |
| 1561 | 1567 | className={cn( |
| 1562 | 1568 | "block truncate", |
| 1563 | | (enabled || unsupported) && |
| 1564 | | status.tone === "error" && |
| 1565 | | !resumingServerUpdate && |
| 1566 | | "text-destructive", |
| 1569 | enabled && status.tone === "error" && !resumingServerUpdate && "text-destructive", |
| 1567 | 1570 | )} |
| 1568 | 1571 | /> |
| 1569 | 1572 | } |
| ... | ... | @@ -1571,8 +1574,8 @@ function SavedBackendListRow({ |
| 1571 | 1574 | {subtitleText} |
| 1572 | 1575 | </TooltipTrigger> |
| 1573 | 1576 | <TooltipPopup side="top" className="max-w-80 whitespace-pre-wrap leading-tight"> |
| 1574 | | {unsupported && environment.connection.error |
| 1575 | | ? environment.connection.error |
| 1577 | {unsupported |
| 1578 | ? (environment.connection.error ?? connectionStatusText(environment.connection)) |
| 1576 | 1579 | : enabled |
| 1577 | 1580 | ? connectionStatusText(environment.connection) |
| 1578 | 1581 | : "Switched off"} |