@@ -47,7 +47,6 @@ import {
4747import { BranchToolbarEnvironmentSelector } from "./BranchToolbarEnvironmentSelector" ;
4848import { openAddProjectToMachine } from "./AddProjectToMachineDialog" ;
4949import { type AddProjectTarget , useAddProjectTargets } from "../hooks/useAddProjectTargets" ;
50- import type { PendingServerUpdate } from "./ServerUpdateAction" ;
5150import { BranchToolbarEnvModeSelector } from "./BranchToolbarEnvModeSelector" ;
5251import { PreviousWorktreeItemContent } from "./PreviousWorktreeItemContent" ;
5352import { ThreadDetailsControl } from "./chat/ThreadDetailsControl" ;
@@ -112,7 +111,6 @@ interface BranchToolbarProps {
112111 onEnvironmentChange ?: ( environmentId : EnvironmentId ) => void ;
113112 composerControlsHostRef ?: ( element : HTMLDivElement | null ) => void ;
114113 contextStripVisible ?: boolean ;
115- serverUpdate ?: PendingServerUpdate | null ;
116114}
117115
118116function showWorkspaceContextMenu ( event : ReactMouseEvent , workspacePath : string ) {
@@ -634,7 +632,6 @@ export const BranchToolbar = memo(function BranchToolbar({
634632 onEnvironmentChange,
635633 composerControlsHostRef,
636634 contextStripVisible = true ,
637- serverUpdate = null ,
638635} : BranchToolbarProps ) {
639636 const branchSelectorRef = useRef < BranchToolbarBranchSelectorHandle > ( null ) ;
640637 const threadRef = scopeThreadRef ( environmentId , threadId ) ;
@@ -700,7 +697,6 @@ export const BranchToolbar = memo(function BranchToolbar({
700697 const showEnvironmentIndicator = shouldShowEnvironmentIndicator ( {
701698 activeEnvironment : activeEnvironmentOption ,
702699 canPickEnvironment : hasMultipleEnvironments ,
703- serverUpdateAvailable : serverUpdate !== null ,
704700 } ) ;
705701 const [ stripElement , setStripElement ] = useState < HTMLDivElement | null > ( null ) ;
706702 const labelsOverflow = useLabelsOverflow ( stripElement ) ;
@@ -767,18 +763,6 @@ export const BranchToolbar = memo(function BranchToolbar({
767763 ! contextStripVisible && "pointer-events-none invisible absolute inset-x-0 top-full" ,
768764 ) }
769765 >
770- { serverUpdate && availableEnvironments ? (
771- < BranchToolbarEnvironmentSelector
772- autoEnvironmentLabel = { autoEnvironmentLabel }
773- onAutoEnvironment = { onAutoEnvironment }
774- envLocked = { envLocked }
775- environmentId = { environmentId }
776- availableEnvironments = { availableEnvironments }
777- { ...( showEnvironmentPicker ? { onEnvironmentChange } : { } ) }
778- { ...( addTargets . length > 0 ? { onAddToMachine : ( ) => onAddToMachine ( null ) } : { } ) }
779- serverUpdate = { serverUpdate }
780- />
781- ) : null }
782766 { showGitControls ? (
783767 < div className = "contents @3xl/composer-surface:hidden" >
784768 < RunContextSelector
@@ -789,8 +773,8 @@ export const BranchToolbar = memo(function BranchToolbar({
789773 envModeLocked = { envModeLocked }
790774 environmentId = { environmentId }
791775 availableEnvironments = { availableEnvironments }
792- showEnvironmentPicker = { showEnvironmentPicker && serverUpdate === null }
793- showEnvironmentIndicator = { showEnvironmentIndicator && serverUpdate === null }
776+ showEnvironmentPicker = { showEnvironmentPicker }
777+ showEnvironmentIndicator = { showEnvironmentIndicator }
794778 onEnvironmentChange = { onEnvironmentChange }
795779 effectiveEnvMode = { effectiveEnvMode }
796780 activeWorktreePath = { activeWorktreePath }
@@ -803,7 +787,7 @@ export const BranchToolbar = memo(function BranchToolbar({
803787 />
804788 </ div >
805789 ) : null }
806- { showGitControls || ( showEnvironmentIndicator && serverUpdate === null ) ? (
790+ { showGitControls || showEnvironmentIndicator ? (
807791 < div
808792 className = { cn (
809793 "min-h-7 min-w-10 items-center gap-1 sm:min-h-6" ,
@@ -813,17 +797,15 @@ export const BranchToolbar = memo(function BranchToolbar({
813797 >
814798 { showEnvironmentIndicator && availableEnvironments && (
815799 < >
816- { serverUpdate === null ? (
817- < BranchToolbarEnvironmentSelector
818- autoEnvironmentLabel = { autoEnvironmentLabel }
819- onAutoEnvironment = { onAutoEnvironment }
820- envLocked = { envLocked }
821- environmentId = { environmentId }
822- availableEnvironments = { availableEnvironments }
823- { ...( showEnvironmentPicker ? { onEnvironmentChange } : { } ) }
824- { ...( addTargets . length > 0 ? { onAddToMachine : ( ) => onAddToMachine ( null ) } : { } ) }
825- />
826- ) : null }
800+ < BranchToolbarEnvironmentSelector
801+ autoEnvironmentLabel = { autoEnvironmentLabel }
802+ onAutoEnvironment = { onAutoEnvironment }
803+ envLocked = { envLocked }
804+ environmentId = { environmentId }
805+ availableEnvironments = { availableEnvironments }
806+ { ...( showEnvironmentPicker ? { onEnvironmentChange } : { } ) }
807+ { ...( addTargets . length > 0 ? { onAddToMachine : ( ) => onAddToMachine ( null ) } : { } ) }
808+ />
827809 { showGitControls ? (
828810 < Separator
829811 orientation = "vertical"
0 commit comments