@devries-cameron20 / t3code Mirror · read-only / commits / 32843c2551
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 19:00 UTC

fix(web): constrain branch toolbar context (#4657)

Max Katz committed Jul 27, 2026 at 20:42 UTC 32843c2551bd5832d436ef46bff5ab1198cdc39c
3 files changed +20 -10
apps/web/src/components/BranchToolbar.tsx
+1 -1
@@ -321,7 +321,7 @@ export const BranchToolbar = memo(function BranchToolbar({
321 onUsePreviousWorktree={onUsePreviousWorktree}
322 />
323 ) : (
324 - <div className="flex min-w-0 shrink-0 items-center gap-1">
324 + <div className="flex min-w-0 flex-1 items-center gap-1">
325 {showEnvironmentIndicator && availableEnvironments && (
326 <>
327 <BranchToolbarEnvironmentSelector
apps/web/src/components/BranchToolbarEnvModeSelector.tsx
+7 -2
@@ -50,7 +50,7 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
50
51 if (envLocked) {
52 return (
53 - <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">
53 + <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">
54 {activeWorktreePath ? (
55 <>
56 <FolderGitIcon className="size-3" />
@@ -79,7 +79,12 @@ export const BranchToolbarEnvModeSelector = memo(function BranchToolbarEnvModeSe
79 }}
80 items={envModeItems}
81 >
82 - <SelectTrigger variant="ghost" size="xs" className="font-medium" aria-label="Workspace">
82 + <SelectTrigger
83 + variant="ghost"
84 + size="xs"
85 + className="shrink-0 font-medium"
86 + aria-label="Workspace"
87 + >
88 {effectiveEnvMode === "worktree" ? (
89 <FolderGit2Icon className="size-3" />
90 ) : activeWorktreePath ? (
apps/web/src/components/BranchToolbarEnvironmentSelector.tsx
+12 -7
@@ -43,13 +43,13 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
43
44 if (envLocked || onEnvironmentChange === undefined) {
45 return (
46 - <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">
46 + <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">
47 {activeEnvironment?.isPrimary ? (
48 - <MonitorIcon className="size-3" />
48 + <MonitorIcon className="size-3 shrink-0" />
49 ) : (
50 - <CloudIcon className="size-3" />
50 + <CloudIcon className="size-3 shrink-0" />
51 )}
52 - {activeEnvironment?.label ?? "Run on"}
52 + <span className="truncate">{activeEnvironment?.label ?? "Run on"}</span>
53 </span>
54 );
55 }
@@ -61,11 +61,16 @@ export const BranchToolbarEnvironmentSelector = memo(function BranchToolbarEnvir
61 onValueChange={(value) => onEnvironmentChange(value as EnvironmentId)}
62 items={environmentItems}
63 >
64 - <SelectTrigger variant="ghost" size="xs" className="font-medium" aria-label="Run on">
64 + <SelectTrigger
65 + variant="ghost"
66 + size="xs"
67 + className="min-w-0 max-w-full font-medium"
68 + aria-label="Run on"
69 + >
70 {activeEnvironment?.isPrimary ? (
66 - <MonitorIcon className="size-3" />
71 + <MonitorIcon className="size-3 shrink-0" />
72 ) : (
68 - <CloudIcon className="size-3" />
73 + <CloudIcon className="size-3 shrink-0" />
74 )}
75 <SelectValue />
76 </SelectTrigger>