diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsx
index 7b7ffe626bc8..a6f73580a945 100644
--- a/apps/web/src/components/BranchToolbar.tsx
+++ b/apps/web/src/components/BranchToolbar.tsx
@@ -53,6 +53,7 @@ import {
MenuTrigger,
} from "./ui/menu";
import { Separator } from "./ui/separator";
+import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
import { ComposerSurface } from "./chat/ComposerSurface";
import { composerFloatingLayerProps } from "./chat/composerEventScope";
import { measureRestingComposerControls } from "./chat/restingComposerControlsMeasurement";
@@ -136,22 +137,35 @@ const MobileRunContextSelector = memo(function MobileRunContextSelector({
? resolveEnvModeLabel("worktree")
: resolveCurrentWorkspaceLabel(activeWorktreePath);
const isLocked = envLocked || envModeLocked;
+ const workspaceIcon = (
+
+ }>
+
+
+ {workspaceLabel}
+
+ );
const icon = showEnvironmentIndicator ? (
// Button's base styles apply `-mx-0.5` to descendant SVGs, which eats 4px
// out of whatever gap we set. mx-0! cancels that so gap-0.5 reads as 2px.
- {autoEnvironmentLabel ? (
-
- ) : (
-
- )}
-
+
+ }>
+ {autoEnvironmentLabel ? (
+
+ ) : (
+
+ )}
+
+ {autoEnvironmentLabel ?? activeEnvironment?.label ?? "Run on"}
+
+ {workspaceIcon}
) : (
-
+ workspaceIcon
);
const triggerContent = (
<>
diff --git a/apps/web/src/components/BranchToolbarEnvModeSelector.tsx b/apps/web/src/components/BranchToolbarEnvModeSelector.tsx
index a350931fbf45..cd09c61be603 100644
--- a/apps/web/src/components/BranchToolbarEnvModeSelector.tsx
+++ b/apps/web/src/components/BranchToolbarEnvModeSelector.tsx
@@ -17,6 +17,7 @@ import {
SelectTrigger,
SelectValue,
} from "./ui/select";
+import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
const PREVIOUS_WORKTREE_SELECT_VALUE = "previous-worktree";
@@ -51,27 +52,31 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
if (envLocked) {
return (
-
- {activeWorktreePath ? (
-
- ) : (
-
- )}
-
+ }
+ className="inline-flex h-7 min-w-0 items-center gap-1 border border-transparent px-[calc(--spacing(2)-1px)] font-normal text-muted-foreground/70 text-xs sm:h-6"
+ data-composer-context-control
>
+ {activeWorktreePath ? (
+
+ ) : (
+
+ )}
- {resolveLockedWorkspaceLabel(activeWorktreePath)}
+
+ {resolveLockedWorkspaceLabel(activeWorktreePath)}
+
-
-
+
+ {resolveLockedWorkspaceLabel(activeWorktreePath)}
+
);
}
@@ -88,33 +93,44 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
}}
items={envModeItems}
>
-
- {effectiveEnvMode === "worktree" ? (
-
- ) : activeWorktreePath ? (
-
- ) : (
-
- )}
-
+
+ }
>
+ {effectiveEnvMode === "worktree" ? (
+
+ ) : activeWorktreePath ? (
+
+ ) : (
+
+ )}
-
+
+
+
-
-
+
+
+ {effectiveEnvMode === "worktree"
+ ? resolveEnvModeLabel("worktree")
+ : resolveCurrentWorkspaceLabel(activeWorktreePath)}
+
+
Workspace
diff --git a/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx b/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx
index 0fa879c78a55..4f1ddfd5e09d 100644
--- a/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx
+++ b/apps/web/src/components/BranchToolbarEnvironmentSelector.tsx
@@ -14,6 +14,7 @@ import {
SelectTrigger,
SelectValue,
} from "./ui/select";
+import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
interface BranchToolbarEnvironmentSelectorProps {
autoEnvironmentLabel?: string | undefined;
@@ -58,26 +59,30 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
// only thing in the strip.
if (envLocked || onEnvironmentChange === undefined) {
return (
-
-
-
+ }
+ className="inline-flex h-7 min-w-0 max-w-full items-center gap-1 border border-transparent px-[calc(--spacing(2)-1px)] font-normal text-muted-foreground/70 text-xs sm:h-6"
+ data-composer-context-control
>
+
- {activeEnvironment?.label ?? "Run on"}
+
+ {activeEnvironment?.label ?? "Run on"}
+
-
-
+
+ {activeEnvironment?.label ?? "Run on"}
+
);
}
@@ -90,34 +95,41 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
}
items={environmentItems}
>
-
- {autoEnvironmentLabel ? (
-
- ) : (
-
- )}
-
+
+ }
>
+ {autoEnvironmentLabel ? (
+
+ ) : (
+
+ )}
-
+
+
+
-
-
+
+ {autoEnvironmentLabel ?? activeEnvironment?.label ?? "Run on"}
+
Run on