authorgravatar for me@t3.ggTheo Browne <me@t3.gg> 2026-10-02 19:44:14-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-02 19:44:14-07:00
logbb7997709dd5ed91a3aa18c091286f5f5331b0ef
tree359585d01066190cb928c0bb7a333657959d0486
parent8ed276c246b624631e7d39241ebfd22d8314cb68
signature Signed by PGP key B5690EEEBB952194

fix(web): thread panel shows the remote machine a thread runs on (#14972)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

1 files changed, 17 insertions(+), 3 deletions(-)

apps/web/src/components/chat/ThreadDetailsPanel.tsx+17-3
......@@ -9,7 +9,11 @@ import { AlertTriangleIcon, XIcon } from "lucide-react";
99
1010import type { DraftId } from "../../composerDraftStore";
1111import { useT3ProjectFileScripts } from "../../hooks/useT3ProjectFileScripts";
12import type { EnvMode, EnvironmentOption } from "../BranchToolbar.logic";
12import {
13 shouldShowEnvironmentIndicator,
14 type EnvMode,
15 type EnvironmentOption,
16} from "../BranchToolbar.logic";
1317import { BranchToolbar } from "../BranchToolbar";
1418import { BranchToolbarEnvironmentSelector } from "../BranchToolbarEnvironmentSelector";
1519import GitActionsControl from "../GitActionsControl";
......@@ -78,6 +82,14 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
7882 props.environmentId,
7983 props.activeProjectScripts ? props.gitCwd : null,
8084 );
85 // Same rule as the composer strip: a lone remote machine still gets a row,
86 // shown as a static label because there is nothing to pick.
87 const canPickEnvironment = props.availableEnvironments.length > 1;
88 const showEnvironment = shouldShowEnvironmentIndicator({
89 activeEnvironment:
90 props.availableEnvironments.find((env) => env.environmentId === props.environmentId) ?? null,
91 canPickEnvironment,
92 });
8193 const branchToolbarProps = {
8294 showGitControls: props.isGitRepo,
8395 environmentId: props.environmentId,
......@@ -138,7 +150,7 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
138150 ) : null}
139151
140152 <div className="flex flex-col">
141 {density === "full" && props.availableEnvironments.length > 1 ? (
153 {density === "full" && showEnvironment ? (
142154 <BranchToolbarEnvironmentSelector
143155 displayMode="panel"
144156 autoEnvironmentLabel={props.autoEnvironmentLabel}
......@@ -146,7 +158,9 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
146158 envLocked={props.envLocked}
147159 environmentId={props.environmentId}
148160 availableEnvironments={props.availableEnvironments}
149 onEnvironmentChange={props.onEnvironmentChange}
161 {...(canPickEnvironment
162 ? { onEnvironmentChange: props.onEnvironmentChange }
163 : {})}
150164 />
151165 ) : null}
152166