Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/src/components/BranchToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export const BranchToolbar = memo(function BranchToolbar({
onUsePreviousWorktree={onUsePreviousWorktree}
/>
) : (
<div className="flex min-w-0 shrink-0 items-center gap-1">
<div className="flex min-w-0 flex-1 items-center gap-1">
{showEnvironmentIndicator && availableEnvironments && (
<>
<BranchToolbarEnvironmentSelector
Expand Down
9 changes: 7 additions & 2 deletions apps/web/src/components/BranchToolbarEnvModeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe

if (envLocked) {
return (
<span className="inline-flex items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:text-xs">
<span className="inline-flex shrink-0 items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:text-xs">
{activeWorktreePath ? (
<>
<FolderGitIcon className="size-3" />
Expand Down Expand Up @@ -79,7 +79,12 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
}}
items={envModeItems}
>
<SelectTrigger variant="ghost" size="xs" className="font-medium" aria-label="Workspace">
<SelectTrigger
variant="ghost"
size="xs"
className="shrink-0 font-medium"
aria-label="Workspace"
>
{effectiveEnvMode === "worktree" ? (
<FolderGit2Icon className="size-3" />
) : activeWorktreePath ? (
Expand Down
19 changes: 12 additions & 7 deletions apps/web/src/components/BranchToolbarEnvironmentSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir

if (envLocked || onEnvironmentChange === undefined) {
return (
<span className="inline-flex items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:text-xs">
<span className="inline-flex min-w-0 max-w-full items-center gap-1 border border-transparent px-[calc(--spacing(3)-1px)] text-sm font-medium text-muted-foreground/70 sm:text-xs">
{activeEnvironment?.isPrimary ? (
<MonitorIcon className="size-3" />
<MonitorIcon className="size-3 shrink-0" />
) : (
<CloudIcon className="size-3" />
<CloudIcon className="size-3 shrink-0" />
)}
{activeEnvironment?.label ?? "Run on"}
<span className="truncate">{activeEnvironment?.label ?? "Run on"}</span>
</span>
);
}
Expand All @@ -61,11 +61,16 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
onValueChange={(value) => onEnvironmentChange(value as EnvironmentId)}
items={environmentItems}
>
<SelectTrigger variant="ghost" size="xs" className="font-medium" aria-label="Run on">
<SelectTrigger
variant="ghost"
size="xs"
className="min-w-0 max-w-full font-medium"
aria-label="Run on"
>
{activeEnvironment?.isPrimary ? (
<MonitorIcon className="size-3" />
<MonitorIcon className="size-3 shrink-0" />
) : (
<CloudIcon className="size-3" />
<CloudIcon className="size-3 shrink-0" />
)}
<SelectValue />
</SelectTrigger>
Expand Down
Loading