Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(clients): show unsupported environments as neutral rows with their machine icon #12026

Mergedjuliusmarmingemerged 2 commits intomain fromrefs/pull/12026/headmerged by juliusmarminge View on GitHub

Showing 11 changed files with 39 additions and 16 deletions (loading 8).

x
0 of 11 viewed, 11 left
34 additions and 13 deletionsapps/mobile/src/features/connection/CloudEnvironmentRows.tsxModified
View file
@@ -7,6 +7,7 @@
import {
type EnvironmentId,
type EnvironmentMachineKind,
+ type ExecutionEnvironmentDescriptor,
resolveEnvironmentMachineKind,
} from "@t3tools/contracts";
import { useAtomValue } from "@effect/atom-react";
@@ -99,6 +100,16 @@
[controller],
​
+ // The relay's health probe carries each server's descriptor, so a machine
+ // can wear its detected glyph before this device ever connects to it.
+ const discoveredDescriptors = new Map(
+ controller.relayEnvironments.flatMap((entry) =>
+ entry.status?.descriptor === undefined
+ ? []
+ : [[entry.environment.environmentId, entry.status.descriptor] as const],
+ ),
+ );
+​
const handleToggleCloudError = useCallback((environmentId: string) => {
setExpandedErrorId((current) => (current === environmentId ? null : environmentId));
}, []);
@@ -140,6 +151,7 @@
<ConnectedCloudEnvironmentRow
key={environment.environmentId}