From 0bdebf2165248a7d1717eed0fb7ca746f546ee68 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 22 May 2026 17:52:37 +0000 Subject: [PATCH] Simplify cloud environment dropdown when user has only one environment When the user has no custom sandbox environments, show a single 'Cloud' option inline with the other workspace modes instead of a separate 'Cloud environments' section with just the 'Default' entry. The full section with separator, header, and per-environment list is preserved when the user has created custom sandbox environments. --- .../components/WorkspaceModeSelect.tsx | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/apps/code/src/renderer/features/task-detail/components/WorkspaceModeSelect.tsx b/apps/code/src/renderer/features/task-detail/components/WorkspaceModeSelect.tsx index 08c8c8b77..21d8c9380 100644 --- a/apps/code/src/renderer/features/task-detail/components/WorkspaceModeSelect.tsx +++ b/apps/code/src/renderer/features/task-detail/components/WorkspaceModeSelect.tsx @@ -163,21 +163,41 @@ export function WorkspaceModeSelect({ ))} - {showCloud && ( + {showCloud && environments.length === 0 && ( + { + onChange("cloud"); + onCloudEnvironmentChange?.(null); + }} + render={ + + + {CLOUD_ICON} + + + Cloud + + Run in a cloud sandbox + + + + } + /> + )} + + {showCloud && environments.length > 0 && ( <>
Cloud environments - {environments.length > 0 && ( - - )} +