Skip to content

Commit e6ae536

Browse files
chore(code): make branch selector disabled when cloud run (#1587)
1 parent 98e69e7 commit e6ae536

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

apps/code/src/renderer/components/ui/combobox/Combobox.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ function ComboboxTrigger({
173173
style={style}
174174
>
175175
<span className="combobox-trigger-inner">{displayValue}</span>
176-
<span className="combobox-trigger-icon">
177-
<CaretDown weight="bold" />
178-
</span>
176+
{!disabled && (
177+
<span className="combobox-trigger-icon">
178+
<CaretDown weight="bold" />
179+
</span>
180+
)}
179181
</button>
180182
</Popover.Trigger>
181183
);

apps/code/src/renderer/features/message-editor/components/MessageEditor.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ interface ModeAndBranchRowProps {
3333
} | null;
3434
disabled?: boolean;
3535
isBashMode?: boolean;
36+
isCloud?: boolean;
3637
taskId?: string;
3738
}
3839

@@ -44,6 +45,7 @@ function ModeAndBranchRow({
4445
cloudDiffStats,
4546
disabled,
4647
isBashMode,
48+
isCloud,
4749
taskId,
4850
}: ModeAndBranchRowProps) {
4951
const { currentBranch: gitBranch, diffStats } = useGitQueries(
@@ -120,7 +122,7 @@ function ModeAndBranchRow({
120122
<BranchSelector
121123
repoPath={repoPath ?? null}
122124
currentBranch={currentBranch}
123-
disabled={disabled}
125+
disabled={disabled || isCloud}
124126
variant="ghost"
125127
taskId={taskId}
126128
/>
@@ -362,6 +364,7 @@ export const MessageEditor = forwardRef<EditorHandle, MessageEditorProps>(
362364
cloudDiffStats={cloudDiffStats}
363365
disabled={disabled}
364366
isBashMode={isBashMode}
367+
isCloud={isCloud}
365368
taskId={taskId}
366369
/>
367370
</Flex>

0 commit comments

Comments
 (0)