The best way to control Claude Code, Codex and more from any computer or phone
fix(environments): draw the machine icon everywhere an environment is named (#9365)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Julius Marminge committed
Sep 2, 2026 at 23:23 UTC
829c3db94830fc70b5754513b8a370f7301ca213
10 files changed
+130
-70
apps/mobile/src/features/archive/ArchivedThreadsScreen.tsx
+29
-6
@@ -3,7 +3,11 @@ import type {
3
EnvironmentThreadShell,
4
} from "@t3tools/client-runtime/state/shell";
5
import { LegendList } from "@legendapp/list/react-native";
6
-import type { EnvironmentId } from "@t3tools/contracts";
6
+import {
7
+ type EnvironmentId,
8
+ type EnvironmentMachineKind,
9
+ resolveEnvironmentMachineKind,
10
+} from "@t3tools/contracts";
11
import type { MenuAction } from "@react-native-menu/menu";
12
import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/StackHeader";
13
import { SymbolView } from "../../components/AppSymbol";
@@ -24,10 +28,12 @@ import type { SwipeableMethods } from "react-native-gesture-handler/ReanimatedSw
28
import { AppText as Text } from "../../components/AppText";
29
import { ControlPillMenu } from "../../components/ControlPill";
30
import { EmptyState } from "../../components/EmptyState";
31
+import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
32
import { ProjectFavicon } from "../../components/ProjectFavicon";
33
import { useSafeAreaInsets } from "react-native-safe-area-context";
34
import { relativeTime } from "../../lib/time";
35
import { useUniwindTheme } from "../../lib/useUniwindTheme";
36
+import { useServerConfigs } from "../../state/entities";
37
import { ThreadSwipeable } from "../home/thread-swipe-actions";
38
import {
39
createNativeMailSearchToolbarItem,
@@ -45,6 +51,7 @@ type ArchivedThreadListItem =
51
readonly kind: "project";
52
readonly key: string;
53
readonly environmentLabel: string | null;
54
+ readonly environmentMachine: EnvironmentMachineKind;
55
readonly project: EnvironmentProject;
56
}
57
| {
@@ -360,6 +367,7 @@ function ArchivedThreadsHeader(props: {
367
368
function ProjectGroupLabel(props: {
369
readonly environmentLabel: string | null;
370
+ readonly environmentMachine: EnvironmentMachineKind;
371
readonly project: EnvironmentProject;
372
}) {
373
return (
@@ -378,9 +386,16 @@ function ProjectGroupLabel(props: {
386
{props.project.title}
387
</Text>
388
{props.environmentLabel ? (
381
- <Text className="max-w-[42%] text-2xs text-foreground-tertiary" numberOfLines={1}>
382
- {props.environmentLabel}
383
- </Text>
389
+ <View className="max-w-[42%] flex-row items-center gap-1">
390
+ <EnvironmentMachineSymbol
391
+ kind={props.environmentMachine}
392
+ size={10}
393
+ tintColorClassName="accent-foreground-tertiary"
394
+ />
395
+ <Text className="shrink text-2xs text-foreground-tertiary" numberOfLines={1}>
396
+ {props.environmentLabel}
397
+ </Text>
398
+ </View>
399
) : null}
400
</View>
401
);
@@ -517,6 +532,7 @@ export function ArchivedThreadsScreen(props: {
532
),
533
[props.environments],
534
);
535
+ const serverConfigs = useServerConfigs();
536
const listItems = useMemo<ReadonlyArray<ArchivedThreadListItem>>(() => {
537
const items: ArchivedThreadListItem[] = [];
538
for (const group of props.groups) {
@@ -525,6 +541,9 @@ export function ArchivedThreadsScreen(props: {
541
kind: "project",
542
key: `${group.key}:project`,
543
environmentLabel,
544
+ environmentMachine: resolveEnvironmentMachineKind(
545
+ serverConfigs.get(group.project.environmentId) ?? null,
546
+ ),
547
project: group.project,
548
});
549
@@ -540,7 +559,7 @@ export function ArchivedThreadsScreen(props: {
559
});
560
}
561
return items;
543
- }, [environmentLabelsById, props.groups]);
562
+ }, [environmentLabelsById, props.groups, serverConfigs]);
563
const handleSwipeableWillOpen = useCallback((methods: SwipeableMethods) => {
564
if (openSwipeableRef.current && openSwipeableRef.current !== methods) {
565
openSwipeableRef.current.close();
@@ -559,7 +578,11 @@ export function ArchivedThreadsScreen(props: {
578
if (item.kind === "project") {
579
return (
580
<View className="pt-4">
562
- <ProjectGroupLabel environmentLabel={item.environmentLabel} project={item.project} />
581
+ <ProjectGroupLabel
582
+ environmentLabel={item.environmentLabel}
583
+ environmentMachine={item.environmentMachine}
584
+ project={item.project}
585
+ />
586
</View>
587
);
588
}
apps/mobile/src/features/projects/AddProjectScreen.tsx
+13
-5
@@ -31,7 +31,13 @@ import {
31
inferProjectTitleFromPath,
32
isWindowsPlatform,
33
} from "@t3tools/client-runtime/state/projects";
34
-import { CommandId, type EnvironmentId, ProjectId } from "@t3tools/contracts";
34
+import {
35
+ CommandId,
36
+ type EnvironmentId,
37
+ type EnvironmentMachineKind,
38
+ ProjectId,
39
+ resolveEnvironmentMachineKind,
40
+} from "@t3tools/contracts";
41
import { CommonActions, StackActions, useNavigation } from "@react-navigation/native";
42
import { SymbolView } from "../../components/AppSymbol";
43
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
@@ -49,6 +55,7 @@ import { projectEnvironment } from "../../state/projects";
55
import { useEnvironmentQuery } from "../../state/query";
56
import { sourceControlEnvironment } from "../../state/sourceControl";
57
import { AppText as Text, AppTextInput as TextInput } from "../../components/AppText";
58
+import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
59
import { ErrorBanner } from "../../components/ErrorBanner";
60
import { SourceControlIcon } from "../../components/SourceControlIcon";
61
import { uuidv4 } from "../../lib/uuid";
@@ -65,6 +72,7 @@ interface EnvironmentOption {
72
readonly environmentId: EnvironmentId;
73
readonly label: string;
74
readonly platform: string;
75
+ readonly machine: EnvironmentMachineKind;
76
readonly baseDirectory: string | null;
77
readonly connectionState: EnvironmentConnectionPhase;
78
readonly connectionError: string | null;
@@ -352,6 +360,7 @@ function useEnvironmentOptions(): ReadonlyArray<EnvironmentOption> {
360
environmentId: connection.environmentId,
361
label: connection.environmentLabel,
362
platform: platformFromOs(config?.environment.platform.os ?? null),
363
+ machine: resolveEnvironmentMachineKind(config ?? null),
364
baseDirectory: config?.settings.addProjectBaseDirectory ?? null,
365
connectionState: runtime?.connectionState ?? "available",
366
connectionError: runtime?.connectionError ?? null,
@@ -490,11 +499,10 @@ export function AddProjectSourceScreen() {
499
})
500
}
501
icon={
493
- <SymbolView
494
- name="server.rack"
502
+ <EnvironmentMachineSymbol
503
+ kind={environment.machine}
504
size={17}
496
- tintColorClassName={"accent-icon"}
497
- type="monochrome"
505
+ tintColorClassName="accent-icon"
506
/>
507
}
508
selected={environment.environmentId === selectedEnvironment?.environmentId}
apps/mobile/src/features/settings/SettingsClientStorageRouteScreen.tsx
+9
-7
@@ -1,4 +1,5 @@
1
import { useAtomSet, useAtomValue } from "@effect/atom-react";
2
+import { type EnvironmentMachineKind, resolveEnvironmentMachineKind } from "@t3tools/contracts";
3
import { AsyncResult } from "effect/unstable/reactivity";
4
import { useMemo } from "react";
5
import { ActivityIndicator, Alert, Pressable, ScrollView, View } from "react-native";
@@ -6,11 +7,13 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
7
8
import { AppText as Text } from "../../components/AppText";
9
import { SymbolView } from "../../components/AppSymbol";
10
+import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
11
import {
12
clearClientCacheAtom,
13
clientCacheSummaryAtom,
14
type EnvironmentClientCacheSummary,
15
} from "../../state/client-cache-state";
16
+import { useServerConfigs } from "../../state/entities";
17
import { useSavedRemoteConnections } from "../../state/use-remote-environment-registry";
18
import { SettingsSection } from "./components/SettingsSection";
19
@@ -20,6 +23,7 @@ export function SettingsClientStorageRouteScreen() {
23
const clearResult = useAtomValue(clearClientCacheAtom);
24
const clearCache = useAtomSet(clearClientCacheAtom);
25
const { savedConnectionsById } = useSavedRemoteConnections();
26
+ const serverConfigs = useServerConfigs();
27
const isClearing = clearResult.waiting;
28
const summary = AsyncResult.isSuccess(summaryResult) ? summaryResult.value : null;
29
const environmentSummaries = useMemo(
@@ -106,6 +110,9 @@ export function SettingsClientStorageRouteScreen() {
110
savedConnectionsById[environment.environmentId]?.environmentLabel ??
111
environment.environmentId
112
}
113
+ machine={resolveEnvironmentMachineKind(
114
+ serverConfigs.get(environment.environmentId) ?? null,
115
+ )}
116
disabled={isClearing}
117
first={index === 0}
118
onClear={() => confirmClearEnvironment(environment)}
@@ -169,6 +176,7 @@ export function SettingsClientStorageRouteScreen() {
176
function CacheEnvironmentRow(props: {
177
readonly environment: EnvironmentClientCacheSummary;
178
readonly environmentLabel: string;
179
+ readonly machine: EnvironmentMachineKind;
180
readonly disabled: boolean;
181
readonly first: boolean;
182
readonly onClear: () => void;
@@ -181,13 +189,7 @@ function CacheEnvironmentRow(props: {
189
: "border-t border-border flex-row items-center gap-3 p-4"
190
}
191
>
184
- <SymbolView
185
- name="desktopcomputer"
186
- size={22}
187
- tintColorClassName={"accent-icon"}
188
- type="monochrome"
189
- weight="regular"
190
- />
192
+ <EnvironmentMachineSymbol kind={props.machine} size={22} tintColorClassName="accent-icon" />
193
<Text className="min-w-0 flex-1 text-base text-foreground" numberOfLines={1}>
194
{props.environmentLabel}
195
</Text>
apps/mobile/src/features/threads/NewTaskContextPickerScreens.tsx
+19
-5
@@ -1,4 +1,5 @@
1
import type { VcsRef } from "@t3tools/client-runtime/state/vcs";
2
+import { resolveEnvironmentMachineKind } from "@t3tools/contracts";
3
import { LegendList } from "@legendapp/list/react-native";
4
import {
5
isAtomCommandInterrupted,
@@ -21,9 +22,11 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
22
import { AndroidScreenHeader } from "../../components/AndroidScreenHeader";
23
import { SymbolView } from "../../components/AppSymbol";
24
import { AppText as Text } from "../../components/AppText";
25
+import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
26
import { ThemedSwitch } from "../../components/ThemedSwitch";
27
import { cn } from "../../lib/cn";
28
import { NativeHeaderToolbar, NativeStackScreenOptions } from "../../native/StackHeader";
29
+import { useServerConfigs } from "../../state/entities";
30
import { useAtomCommand } from "../../state/use-atom-command";
31
import { vcsEnvironment } from "../../state/vcs";
32
import {
@@ -35,7 +38,7 @@ import { branchBadgeLabel, useNewTaskFlow } from "./new-task-flow-provider";
38
import { shouldCheckoutNewTaskBranch } from "./new-task-context-presentation";
39
40
function SelectionRow(props: {
38
- readonly icon?: "arrow.triangle.branch" | "desktopcomputer";
41
+ readonly icon?: "arrow.triangle.branch" | ReactNode;
42
readonly onPress: () => void;
43
readonly disabled?: boolean;
44
readonly selected: boolean;
@@ -56,14 +59,16 @@ function SelectionRow(props: {
59
onPress={props.onPress}
60
style={{ opacity: props.disabled ? 0.45 : 1 }}
61
>
59
- {props.icon ? (
62
+ {props.icon === "arrow.triangle.branch" ? (
63
<SymbolView
61
- name={props.icon}
64
+ name="arrow.triangle.branch"
65
size={17}
66
tintColorClassName={"accent-icon-muted"}
67
type="monochrome"
68
/>
66
- ) : null}
69
+ ) : (
70
+ (props.icon ?? null)
71
+ )}
72
<View className="min-w-0 flex-1 gap-0.5">
73
<Text className="text-base font-t3-medium text-foreground" numberOfLines={1}>
74
{props.title}
@@ -145,6 +150,7 @@ export function NewTaskEnvironmentPickerRouteScreen() {
150
const flow = useNewTaskFlow();
151
const navigation = useNavigation();
152
const insets = useSafeAreaInsets();
153
+ const serverConfigs = useServerConfigs();
154
155
return (
156
<View className="flex-1 bg-sheet" collapsable={false}>
@@ -170,7 +176,15 @@ export function NewTaskEnvironmentPickerRouteScreen() {
176
{flow.environments.map((environment, index) => (
177
<SelectionRow
178
key={String(environment.environmentId)}
173
- icon="desktopcomputer"
179
+ icon={
180
+ <EnvironmentMachineSymbol
181
+ kind={resolveEnvironmentMachineKind(
182
+ serverConfigs.get(environment.environmentId) ?? null,
183
+ )}
184
+ size={17}
185
+ tintColorClassName="accent-icon-muted"
186
+ />
187
+ }
188
isLast={index === flow.environments.length - 1}
189
onPress={() => {
190
void Haptics.selectionAsync();
apps/mobile/src/features/threads/NewTaskDraftScreen.tsx
+12
-2
@@ -24,7 +24,10 @@ import {
24
isAtomCommandInterrupted,
25
squashAtomCommandFailure,
26
} from "@t3tools/client-runtime/state/runtime";
27
-import { PROVIDER_SEND_TURN_MAX_ATTACHMENTS } from "@t3tools/contracts";
27
+import {
28
+ PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
29
+ resolveEnvironmentMachineKind,
30
+} from "@t3tools/contracts";
31
32
import { ComposerEditor, type ComposerEditorHandle } from "../../components/ComposerEditor";
33
import {
@@ -36,6 +39,7 @@ import {
39
import { AndroidScreenHeader } from "../../components/AndroidScreenHeader";
40
import { ComposerAttachmentButton } from "../../components/ComposerAttachmentButton";
41
import { ComposerAttachmentStrip } from "../../components/ComposerAttachmentStrip";
42
+import { EnvironmentMachineSymbol } from "../../components/EnvironmentMachineSymbol";
43
import {
44
composerAttachmentUploadBlockReason,
45
composerAttachmentUploadsAtom,
@@ -1129,7 +1133,13 @@ export function NewTaskDraftScreen(props: {
1133
accessibilityLabel={`Environment: ${selectedEnvironmentLabel}`}
1134
chevronDirection="right"
1135
disabled={isComposerInteractionLocked || voiceInput.isBusy}
1132
- icon="desktopcomputer"
1136
+ iconNode={
1137
+ <EnvironmentMachineSymbol
1138
+ kind={resolveEnvironmentMachineKind(selectedEnvironmentServerConfig)}
1139
+ size={16}
1140
+ tintColorClassName="accent-icon-muted"
1141
+ />
1142
+ }
1143
label={`on ${selectedEnvironmentLabel}`}
1144
maxWidth={260}
1145
onPress={
apps/web/src/components/BranchToolbarEnvironmentSelector.tsx
+10
-16
@@ -1,8 +1,8 @@
1
import type { EnvironmentId } from "@t3tools/contracts";
2
-import { CloudIcon, MonitorIcon } from "lucide-react";
2
import { memo, useMemo } from "react";
3
4
import type { EnvironmentOption } from "./BranchToolbar.logic";
5
+import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon";
6
import {
7
Select,
8
SelectGroup,
@@ -52,11 +52,10 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
52
className="inline-flex h-7 min-w-0 max-w-full items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:h-6 sm:text-xs"
53
data-composer-context-control
54
>
55
- {activeEnvironment?.isPrimary ? (
56
- <MonitorIcon className="size-3 shrink-0" />
57
- ) : (
58
- <CloudIcon className="size-3 shrink-0" />
59
- )}
55
+ <EnvironmentMachineIcon
56
+ kind={activeEnvironment?.machine ?? "server"}
57
+ className="size-3 shrink-0"
58
+ />
59
<span
60
data-composer-label
61
className="min-w-0 max-w-[240px] group-data-[compact]/composer-context:max-w-0"
@@ -86,11 +85,10 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
85
aria-label="Run on"
86
data-composer-context-control
87
>
89
- {activeEnvironment?.isPrimary ? (
90
- <MonitorIcon className="size-3 shrink-0" />
91
- ) : (
92
- <CloudIcon className="size-3 shrink-0" />
93
- )}
88
+ <EnvironmentMachineIcon
89
+ kind={activeEnvironment?.machine ?? "server"}
90
+ className="size-3 shrink-0"
91
+ />
92
<span
93
data-composer-label
94
className="min-w-0 max-w-[240px] group-data-[compact]/composer-context:max-w-0"
@@ -109,11 +107,7 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
107
{availableEnvironments.map((env) => (
108
<SelectItem key={env.environmentId} value={env.environmentId}>
109
<span className="inline-flex items-center gap-1.5">
112
- {env.isPrimary ? (
113
- <MonitorIcon className="size-3" />
114
- ) : (
115
- <CloudIcon className="size-3" />
116
- )}
110
+ <EnvironmentMachineIcon kind={env.machine} className="size-3" />
111
{env.label}
112
</span>
113
</SelectItem>
apps/web/src/components/CommandPalette.tsx
+9
-2
@@ -36,6 +36,7 @@ import {
36
type SourceControlProviderKind,
37
type SourceControlRepositoryInfo,
38
PRIMARY_LOCAL_ENVIRONMENT_ID,
39
+ resolveEnvironmentMachineKind,
40
} from "@t3tools/contracts";
41
import { useLocation, useNavigate, useParams } from "@tanstack/react-router";
42
import * as Option from "effect/Option";
@@ -48,7 +49,6 @@ import {
49
LinkIcon,
50
MessageSquareIcon,
51
PaletteIcon,
51
- ServerIcon,
52
SettingsIcon,
53
SquarePenIcon,
54
TextSearchIcon,
@@ -145,6 +145,7 @@ import { resolveEnvironmentOptionLabel } from "./BranchToolbar.logic";
145
import { CommandPaletteContent } from "./CommandPaletteContent";
146
import { CommandPaletteResults } from "./CommandPaletteResults";
147
import { AzureDevOpsIcon, BitbucketIcon, GitHubIcon, GitLabIcon } from "./Icons";
148
+import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon";
149
import { ProjectFavicon } from "./ProjectFavicon";
150
import { ProjectFilePicker } from "./files/ProjectFilePicker";
151
import { ProjectContentSearchDialog } from "./search/ProjectContentSearchDialog";
@@ -738,6 +739,7 @@ function OpenCommandPaletteDialog(props: {
739
: isLocal
740
? `${environment.label} (Local)`
741
: environment.label,
742
+ machine: resolveEnvironmentMachineKind(environment.serverConfig),
743
},
744
] as const;
745
}),
@@ -1119,12 +1121,17 @@ function OpenCommandPaletteDialog(props: {
1121
const location = projectEnvironmentLocationById.get(project.environmentId) ?? {
1122
kind: "remote",
1123
label: "Remote",
1124
+ machine: "server" as const,
1125
};
1126
return (
1127
<span className="flex min-w-0 items-center gap-1">
1128
<span className="inline-flex min-w-0 items-center gap-1">
1129
{location.kind === "remote" ? (
1127
- <ServerIcon aria-hidden className={COMMAND_PALETTE_META_ICON_CLASS} />
1130
+ <EnvironmentMachineIcon
1131
+ aria-hidden
1132
+ kind={location.machine}
1133
+ className={COMMAND_PALETTE_META_ICON_CLASS}
1134
+ />
1135
) : null}
1136
<span className="truncate">{location.label}</span>
1137
</span>
apps/web/src/components/ThreadStatusIndicators.tsx
+16
-5
@@ -4,12 +4,18 @@ import {
4
scopeThreadRef,
5
} from "@t3tools/client-runtime/environment";
6
import { pullRequestDetailToVcsStatus } from "@t3tools/client-runtime/state/pull-requests";
7
-import type { EnvironmentId, ThreadLinkedPullRequest, VcsStatusResult } from "@t3tools/contracts";
7
+import {
8
+ type EnvironmentId,
9
+ resolveEnvironmentMachineKind,
10
+ type ThreadLinkedPullRequest,
11
+ type VcsStatusResult,
12
+} from "@t3tools/contracts";
13
import { Atom } from "effect/unstable/reactivity";
9
-import { CloudIcon, FolderGit2Icon, GitPullRequestIcon, TerminalIcon } from "lucide-react";
14
+import { FolderGit2Icon, GitPullRequestIcon, TerminalIcon } from "lucide-react";
15
import { useMemo } from "react";
16
import { appAtomRegistry } from "../rpc/atomRegistry";
17
import { useEnvironment, usePrimaryEnvironmentId } from "../state/environments";
18
+import { EnvironmentMachineIcon } from "./EnvironmentMachineIcon";
19
import { useProject } from "../state/entities";
20
import { useEnvironmentQuery } from "../state/query";
21
import { linkedPullRequestDetailAtom, useSharedPullRequestSummary } from "../state/pullRequests";
@@ -602,10 +608,12 @@ export function ThreadRowTrailingStatus({ thread }: { thread: SidebarThreadSumma
608
});
609
const environment = useEnvironment(thread.environmentId);
610
const primaryEnvironmentId = usePrimaryEnvironmentId();
605
- const isRemoteThread =
606
- primaryEnvironmentId !== null && thread.environmentId !== primaryEnvironmentId;
611
+ // No primary (the hosted app) means every thread is remote, and the machine
612
+ // glyph is what tells the environments apart.
613
+ const isRemoteThread = thread.environmentId !== primaryEnvironmentId;
614
const remoteEnvLabel = environment?.label ?? null;
615
const threadEnvironmentLabel = isRemoteThread ? (remoteEnvLabel ?? "Remote") : null;
616
+ const remoteMachine = resolveEnvironmentMachineKind(environment?.serverConfig ?? null);
617
const terminalStatus = terminalStatusFromRunningIds(runningTerminalIds);
618
619
if (!terminalStatus && !isRemoteThread) {
@@ -642,7 +650,10 @@ export function ThreadRowTrailingStatus({ thread }: { thread: SidebarThreadSumma
650
/>
651
}
652
>
645
- <CloudIcon className="size-3 text-muted-foreground/60" />
653
+ <EnvironmentMachineIcon
654
+ kind={remoteMachine}
655
+ className="size-3 text-muted-foreground/60"
656
+ />
657
</TooltipTrigger>
658
<TooltipPopup side="top">{threadEnvironmentLabel}</TooltipPopup>
659
</Tooltip>
apps/web/src/components/settings/ProviderSettingsPanel.tsx
+9
-20
@@ -12,6 +12,7 @@ import {
12
ProviderDriverKind,
13
type ProviderInstanceConfig,
14
type ProviderInstanceId,
15
+ resolveEnvironmentMachineKind,
16
resolveProviderInstanceEnabled,
17
} from "@t3tools/contracts";
18
import { DEFAULT_UNIFIED_SETTINGS } from "@t3tools/contracts/settings";
@@ -23,22 +24,14 @@ import * as Arr from "effect/Array";
24
import * as Duration from "effect/Duration";
25
import * as Equal from "effect/Equal";
26
import * as Result from "effect/Result";
26
-import {
27
- ChevronDownIcon,
28
- CloudIcon,
29
- LaptopIcon,
30
- LoaderIcon,
31
- MonitorIcon,
32
- PlusIcon,
33
- RefreshCwIcon,
34
- TerminalIcon,
35
-} from "lucide-react";
27
+import { ChevronDownIcon, LoaderIcon, PlusIcon, RefreshCwIcon } from "lucide-react";
28
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
29
30
import { isDesktopLocalConnectionTarget } from "../../connection/desktopLocal";
31
import { isElectron } from "../../env";
32
import { usePrimarySessionState } from "../../environments/primary";
33
import { useEnvironmentSettings, useUpdateEnvironmentSettings } from "../../hooks/useSettings";
34
+import { EnvironmentMachineIcon } from "../EnvironmentMachineIcon";
35
import { cn } from "../../lib/utils";
36
import { resolveAppModelSelectionState } from "../../modelSelection";
37
import {
@@ -152,14 +145,6 @@ function ProviderLastChecked({ lastCheckedAt }: { lastCheckedAt: string | null }
145
);
146
}
147
155
-function providerEnvironmentIcon(environment: EnvironmentPresentation) {
156
- if (environment.entry.target._tag === "PrimaryConnectionTarget") return MonitorIcon;
157
- if (environment.entry.target._tag === "RelayConnectionTarget") return CloudIcon;
158
- if (environment.entry.target._tag === "SshConnectionTarget") return TerminalIcon;
159
- if (isDesktopLocalConnectionTarget(environment.entry.target)) return LaptopIcon;
160
- return CloudIcon;
161
-}
162
-
148
function providerEnvironmentDetail(environment: EnvironmentPresentation): string {
149
if (environment.entry.target._tag === "PrimaryConnectionTarget") return "Primary device";
150
if (environment.relayManaged) return "T3 Connect";
@@ -259,7 +244,7 @@ function ProviderSettingsPanelContent() {
244
className="flex h-full w-max min-w-full border-b border-border/70 px-1"
245
>
246
{options.map((environment) => {
262
- const Icon = providerEnvironmentIcon(environment);
247
+ const machine = resolveEnvironmentMachineKind(environment.serverConfig);
248
const selected = environment.environmentId === effectiveEnvironmentId;
249
const detail = providerEnvironmentDetail(environment);
250
const statusText = connectionStatusText(environment.connection);
@@ -273,7 +258,11 @@ function ProviderSettingsPanelContent() {
258
className={cn(providerSettingsTabClassName(selected), "gap-2 text-left")}
259
onClick={() => setSelectedEnvironmentId(environment.environmentId)}
260
>
276
- <Icon className="size-3.5 shrink-0" aria-hidden />
261
+ <EnvironmentMachineIcon
262
+ kind={machine}
263
+ className="size-3.5 shrink-0"
264
+ aria-hidden
265
+ />
266
<span className="max-w-40 truncate">{environment.label}</span>
267
{environment.connection.phase !== "connected" ? (
268
<ConnectionStatusDot
docs/user/thread-sidebar.md
+4
-2
@@ -59,8 +59,10 @@ When you are connected to more than one environment, every thread that lives som
59
the machine you are on wears a small icon for that machine at the end of its row: a server, a cloud
60
VM, a desktop, a laptop, a Mac mini, or a Mac Studio. In the hosted web app and the mobile app,
61
where every environment is remote, each row wears its machine so you can tell them apart at a
62
-glance. The same icon appears in the thread tooltip, the "Run on" picker, the pull request server
63
-filter, and the environment lists under **Settings → Connections**.
62
+glance. The same icon appears wherever an environment is named: the thread tooltip, the command
63
+palette, the "Run on" picker, the pull request server filter, the provider settings device tabs,
64
+and the environment lists under **Settings → Connections**. On mobile it appears in the thread
65
+lists, the archive, the new-task environment picker, and the Environments and storage settings.
66
67
Servers pick the icon themselves from the hardware they run on. A Mac reports its model, a Linux
68
machine reports its chassis type and whether it is a virtual machine, and anything without a usable