From 32843c2551bd5832d436ef46bff5ab1198cdc39c Mon Sep 17 00:00:00 2001 From: Max Katz Date: Mon, 27 Jul 2026 20:42:33 +0400 Subject: [PATCH] fix(web): constrain branch toolbar context (#4657) --- apps/web/src/components/BranchToolbar.tsx | 2 +- .../BranchToolbarEnvModeSelector.tsx | 9 +++++++-- .../BranchToolbarEnvironmentSelector.tsx | 19 ++++++++++++------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsx index e703427d4b6323795e24e10f57a32f1e40550ff5..2a1d0d1ec05ccee0fe4fe402cba14094cca8f701 100644 --- a/apps/web/src/components/BranchToolbar.tsx +++ b/apps/web/src/components/BranchToolbar.tsx @@ -321,7 +321,7 @@ export const BranchToolbar = memo(function BranchToolbar({ onUsePreviousWorktree={onUsePreviousWorktree} /> ) : ( -
+
{showEnvironmentIndicator && availableEnvironments && ( <> + {activeWorktreePath ? ( <> @@ -79,7 +79,12 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe }} items={envModeItems} > - + {effectiveEnvMode === "worktree" ? ( ) : activeWorktreePath ? ( diff --git a/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx b/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx index dbc742bea5a7bbf7c884dc2b2c713295cc8351cf..e4ed54758ff40e8b34a3e6f290c7ca89ea989135 100644 --- a/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx +++ b/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx @@ -43,13 +43,13 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir if (envLocked || onEnvironmentChange === undefined) { return ( - + {activeEnvironment?.isPrimary ? ( - + ) : ( - + )} - {activeEnvironment?.label ?? "Run on"} + {activeEnvironment?.label ?? "Run on"} ); } @@ -61,11 +61,16 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir onValueChange={(value) => onEnvironmentChange(value as EnvironmentId)} items={environmentItems} > - + {activeEnvironment?.isPrimary ? ( - + ) : ( - + )} -- 2.54.0