The best way to control Claude Code, Codex and more from any computer or phone
fix(web): Load balancing and PR sharing name the route in use (#26441)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Vladyslav Husakov committed
Oct 30, 2026 at 22:19 UTC
4dd2f735f2d31e70f46a52236d8d95a5ee071e09
4 files changed
+41
-12
apps/web/src/components/settings/EnvironmentRow.tsx
+17
@@ -10,6 +10,7 @@ import type { ReactNode } from "react";
10
11
import { cn } from "~/lib/utils";
12
import type { EnvironmentPresentation } from "~/state/environments";
13
+import { usePreparedConnection } from "~/state/session";
14
import { isDesktopLocalConnectionTarget } from "~/connection/desktopLocal";
15
import { EnvironmentMachineIcon } from "../EnvironmentMachineIcon";
16
@@ -48,6 +49,22 @@ export function environmentTransportLabel(
49
return environment.displayUrl ?? "Remote link";
50
}
51
52
+export function useEnvironmentTransportLabel(environment: EnvironmentPresentation): string {
53
+ const prepared = usePreparedConnection(environment.environmentId);
54
+ return environmentTransportLabel(
55
+ environment,
56
+ environment.connection.phase === "connected" && prepared._tag === "Some"
57
+ ? prepared.value.target
58
+ : null,
59
+ );
60
+}
61
+
62
+export function EnvironmentTransportLabel(props: {
63
+ readonly environment: EnvironmentPresentation;
64
+}) {
65
+ return useEnvironmentTransportLabel(props.environment);
66
+}
67
+
68
export function EnvironmentRow({
69
kind,
70
label,
apps/web/src/components/settings/LoadBalancingSettings.tsx
+2
-2
@@ -8,7 +8,7 @@ import {
8
import type { EnvironmentPresentation } from "~/state/environments";
9
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
10
import { Switch } from "../ui/switch";
11
-import { EnvironmentRow, environmentTransportLabel } from "./EnvironmentRow";
11
+import { EnvironmentRow, EnvironmentTransportLabel } from "./EnvironmentRow";
12
import { FoldedSettingsSection } from "./FoldedSettingsSection";
13
import { searchableSetting } from "./settingsSearch";
14
@@ -85,7 +85,7 @@ export function LoadBalancingSettings({
85
key={environment.environmentId}
86
kind={resolveEnvironmentMachineKind(environment.serverConfig)}
87
label={environment.label}
88
- subtitle={environmentTransportLabel(environment)}
88
+ subtitle={<EnvironmentTransportLabel environment={environment} />}
89
>
90
<Select
91
items={preferences}
apps/web/src/components/settings/PullRequestRoutingSettings.tsx
+2
-2
@@ -12,7 +12,7 @@ import type { EnvironmentPresentation } from "~/state/environments";
12
import { useAtomCommand } from "~/state/use-atom-command";
13
import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
14
import { toastManager } from "../ui/toast";
15
-import { EnvironmentRow, environmentTransportLabel } from "./EnvironmentRow";
15
+import { EnvironmentRow, EnvironmentTransportLabel } from "./EnvironmentRow";
16
import { FoldedSettingsSection } from "./FoldedSettingsSection";
17
import { searchableSetting } from "./settingsSearch";
18
@@ -75,7 +75,7 @@ export function PullRequestRoutingSettings({
75
key={environment.environmentId}
76
kind={resolveEnvironmentMachineKind(environment.serverConfig)}
77
label={environment.label}
78
- subtitle={environmentTransportLabel(environment)}
78
+ subtitle={<EnvironmentTransportLabel environment={environment} />}
79
>
80
<Select
81
items={options}
apps/web/src/components/settings/ScheduledTasksSettings.tsx
+20
-8
@@ -70,7 +70,7 @@ import { ConnectionStatusDot, connectionPhaseDotClassName } from "../ConnectionS
70
import { AuthOrchestrationOperateScope } from "@t3tools/contracts";
71
import { readEnvironmentScope } from "~/state/session";
72
import { useSettingsScope } from "./SettingsScopeContext";
73
-import { EnvironmentRow, environmentTransportLabel } from "./EnvironmentRow";
73
+import { EnvironmentRow, useEnvironmentTransportLabel } from "./EnvironmentRow";
74
import { SettingsGroup } from "./SettingsGroup";
75
import { settingsScopeEnvironmentLabel, settingsScopeEnvironmentLabels } from "./settingsScopeAxis";
76
import {
@@ -541,19 +541,13 @@ function ScheduledTaskEnvironmentList({
541
<SettingsGroup>
542
{populated.map(({ environment, tasks }) => {
543
const { primary, secondary } = settingsScopeEnvironmentLabels(environment, environments);
544
- const transport = environmentTransportLabel(environment);
544
return (
545
<div key={environment.environmentId} className="divide-y divide-border/50">
546
<EnvironmentRow
547
kind={resolveEnvironmentMachineKind(environment.serverConfig)}
548
label={primary}
549
subtitle={
551
- <>
552
- {secondary && secondary !== transport ? (
553
- <span className="block truncate">{secondary}</span>
554
- ) : null}
555
- <span className="block truncate">{transport}</span>
556
- </>
550
+ <ScheduledTaskEnvironmentSubtitle environment={environment} secondary={secondary} />
551
}
552
>
553
<ConnectionStatusDot
@@ -611,6 +605,24 @@ function ScheduledTaskEnvironmentList({
605
);
606
}
607
608
+function ScheduledTaskEnvironmentSubtitle({
609
+ environment,
610
+ secondary,
611
+}: {
612
+ readonly environment: EnvironmentPresentation;
613
+ readonly secondary: string;
614
+}) {
615
+ const transport = useEnvironmentTransportLabel(environment);
616
+ return (
617
+ <>
618
+ {secondary && secondary !== transport ? (
619
+ <span className="block truncate">{secondary}</span>
620
+ ) : null}
621
+ <span className="block truncate">{transport}</span>
622
+ </>
623
+ );
624
+}
625
+
626
function ScheduledTaskEnvironmentSection({
627
environment,
628
taskId,