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";...@@ -9,7 +9,11 @@ import { AlertTriangleIcon, XIcon } from "lucide-react";
99
10import type { DraftId } from "../../composerDraftStore";10import type { DraftId } from "../../composerDraftStore";
11import { useT3ProjectFileScripts } from "../../hooks/useT3ProjectFileScripts";11import { useT3ProjectFileScripts } from "../../hooks/useT3ProjectFileScripts";
12import type { EnvMode, EnvironmentOption } from "../BranchToolbar.logic";12import {
13 shouldShowEnvironmentIndicator,
14 type EnvMode,
15 type EnvironmentOption,
16} from "../BranchToolbar.logic";
13import { BranchToolbar } from "../BranchToolbar";17import { BranchToolbar } from "../BranchToolbar";
14import { BranchToolbarEnvironmentSelector } from "../BranchToolbarEnvironmentSelector";18import { BranchToolbarEnvironmentSelector } from "../BranchToolbarEnvironmentSelector";
15import GitActionsControl from "../GitActionsControl";19import GitActionsControl from "../GitActionsControl";
...@@ -78,6 +82,14 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {...@@ -78,6 +82,14 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
78 props.environmentId,82 props.environmentId,
79 props.activeProjectScripts ? props.gitCwd : null,83 props.activeProjectScripts ? props.gitCwd : null,
80 );84 );
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 });
81 const branchToolbarProps = {93 const branchToolbarProps = {
82 showGitControls: props.isGitRepo,94 showGitControls: props.isGitRepo,
83 environmentId: props.environmentId,95 environmentId: props.environmentId,
...@@ -138,7 +150,7 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {...@@ -138,7 +150,7 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
138 ) : null}150 ) : null}
139151
140 <div className="flex flex-col">152 <div className="flex flex-col">
141 {density === "full" && props.availableEnvironments.length > 1 ? (153 {density === "full" && showEnvironment ? (
142 <BranchToolbarEnvironmentSelector154 <BranchToolbarEnvironmentSelector
143 displayMode="panel"155 displayMode="panel"
144 autoEnvironmentLabel={props.autoEnvironmentLabel}156 autoEnvironmentLabel={props.autoEnvironmentLabel}
...@@ -146,7 +158,9 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {...@@ -146,7 +158,9 @@ export function ThreadDetailsPanel(props: ThreadDetailsPanelProps) {
146 envLocked={props.envLocked}158 envLocked={props.envLocked}
147 environmentId={props.environmentId}159 environmentId={props.environmentId}
148 availableEnvironments={props.availableEnvironments}160 availableEnvironments={props.availableEnvironments}
149 onEnvironmentChange={props.onEnvironmentChange}161 {...(canPickEnvironment
162 ? { onEnvironmentChange: props.onEnvironmentChange }
163 : {})}
150 />164 />
151 ) : null}165 ) : null}
152166