diff --git a/apps/server/src/environment/ServerEnvironment.test.ts b/apps/server/src/environment/ServerEnvironment.test.ts index a7aea90f82..c11ff08154 100644 --- a/apps/server/src/environment/ServerEnvironment.test.ts +++ b/apps/server/src/environment/ServerEnvironment.test.ts @@ -5,6 +5,7 @@ import * as FileSystem from "effect/FileSystem"; import * as Layer from "effect/Layer"; import * as PlatformError from "effect/PlatformError"; import * as Schema from "effect/Schema"; +import { HostProcessEnvironment } from "@t3tools/shared/hostProcess"; import * as ServerConfig from "../config.ts"; import * as ServerEnvironment from "./ServerEnvironment.ts"; @@ -73,6 +74,33 @@ it.layer(NodeServices.layer)("ServerEnvironmentLive", (it) => { }), ); + it.effect("advertises a Render cloud workspace from the host environment", () => + Effect.gen(function* () { + const fileSystem = yield* FileSystem.FileSystem; + const baseDir = yield* fileSystem.makeTempDirectoryScoped({ + prefix: "t3-server-render-environment-test-", + }); + + const descriptor = yield* Effect.gen(function* () { + const serverEnvironment = yield* ServerEnvironment.ServerEnvironment; + return yield* serverEnvironment.getDescriptor; + }).pipe( + Effect.provide(makeServerEnvironmentLayer(baseDir)), + Effect.provideService(HostProcessEnvironment, { + T3CODE_CLOUD_PROVIDER: "render", + T3CODE_ENVIRONMENT_LABEL: "Render cloud environment", + T3CODE_WORKSPACE_DIR: "/data/workspace", + }), + ); + + expect(descriptor.label).toBe("Render cloud environment"); + expect(descriptor.cloud).toEqual({ + provider: "render", + workspaceRoot: "/data/workspace", + }); + }), + ); + it.effect("structures persisted environment id filesystem failures", () => Effect.gen(function* () { const fileSystem = yield* FileSystem.FileSystem; diff --git a/apps/server/src/environment/ServerEnvironment.ts b/apps/server/src/environment/ServerEnvironment.ts index b6eedb87e6..dbb027a0d7 100644 --- a/apps/server/src/environment/ServerEnvironment.ts +++ b/apps/server/src/environment/ServerEnvironment.ts @@ -1,5 +1,9 @@ import { EnvironmentId, type ExecutionEnvironmentDescriptor } from "@t3tools/contracts"; -import { HostProcessArchitecture, HostProcessPlatform } from "@t3tools/shared/hostProcess"; +import { + HostProcessArchitecture, + HostProcessEnvironment, + HostProcessPlatform, +} from "@t3tools/shared/hostProcess"; import * as Context from "effect/Context"; import * as Crypto from "effect/Crypto"; import * as Effect from "effect/Effect"; @@ -69,6 +73,7 @@ export const make = Effect.gen(function* () { const crypto = yield* Crypto.Crypto; const hostPlatform = yield* HostProcessPlatform; const hostArchitecture = yield* HostProcessArchitecture; + const hostEnvironment = yield* HostProcessEnvironment; const readPersistedEnvironmentId = Effect.gen(function* () { const exists = yield* fileSystem.exists(serverConfig.environmentIdPath).pipe( @@ -125,7 +130,16 @@ export const make = Effect.gen(function* () { const environmentId = EnvironmentId.make(environmentIdRaw); const cwdBaseName = path.basename(serverConfig.cwd).trim(); - const label = yield* resolveServerEnvironmentLabel({ cwdBaseName }); + const configuredLabel = hostEnvironment.T3CODE_ENVIRONMENT_LABEL?.trim(); + const label = configuredLabel || (yield* resolveServerEnvironmentLabel({ cwdBaseName })); + const cloudProvider = hostEnvironment.T3CODE_CLOUD_PROVIDER?.trim().toLowerCase(); + const cloud = + cloudProvider === "render" + ? { + provider: "render" as const, + workspaceRoot: hostEnvironment.T3CODE_WORKSPACE_DIR?.trim() || serverConfig.cwd, + } + : undefined; const launcher = yield* resolveServiceLauncherMode(); const serverSelfUpdate = resolveServerSelfUpdateCapability({ desktopManaged: serverConfig.mode === "desktop", @@ -139,6 +153,7 @@ export const make = Effect.gen(function* () { os: platformOs(hostPlatform), arch: platformArch(hostArchitecture), }, + ...(cloud ? { cloud } : {}), serverVersion: packageJson.version, capabilities: { repositoryIdentity: true, diff --git a/apps/web/src/cloud/cloudEnvironment.test.ts b/apps/web/src/cloud/cloudEnvironment.test.ts new file mode 100644 index 0000000000..d1e63b5cd8 --- /dev/null +++ b/apps/web/src/cloud/cloudEnvironment.test.ts @@ -0,0 +1,59 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { cloudCloneDestination, cloudEnvironmentProvider } from "./cloudEnvironment"; + +describe("cloudEnvironmentProvider", () => { + it("uses advertised Render metadata", () => { + expect( + cloudEnvironmentProvider({ + displayUrl: null, + serverConfig: { + environment: { + environmentId: "environment-1", + label: "Render cloud environment", + platform: { os: "linux", arch: "x64" }, + cloud: { provider: "render", workspaceRoot: "/data/workspace" }, + serverVersion: "1.0.0", + capabilities: { repositoryIdentity: true }, + }, + } as never, + }), + ).toBe("render"); + }); + + it("recognizes disconnected onrender.com environments", () => { + expect( + cloudEnvironmentProvider({ + displayUrl: "https://t3code-cloud-demo.onrender.com", + serverConfig: null, + }), + ).toBe("render"); + }); +}); + +describe("cloudCloneDestination", () => { + it("clones provider repositories under the cloud workspace root", () => { + expect( + cloudCloneDestination({ + workspaceRoot: "/data/workspace/", + repository: { + provider: "github", + nameWithOwner: "shivamhwp/render-ad", + url: "https://github.com/shivamhwp/render-ad", + sshUrl: "git@github.com:shivamhwp/render-ad.git", + }, + remoteUrl: "git@github.com:shivamhwp/render-ad.git", + }), + ).toBe("/data/workspace/render-ad"); + }); + + it("derives a directory from arbitrary Git URLs", () => { + expect( + cloudCloneDestination({ + workspaceRoot: "/data/workspace", + repository: null, + remoteUrl: "https://example.com/team/project.git?ref=main", + }), + ).toBe("/data/workspace/project"); + }); +}); diff --git a/apps/web/src/cloud/cloudEnvironment.ts b/apps/web/src/cloud/cloudEnvironment.ts new file mode 100644 index 0000000000..896bdb4fae --- /dev/null +++ b/apps/web/src/cloud/cloudEnvironment.ts @@ -0,0 +1,65 @@ +import type { ServerConfig, SourceControlRepositoryInfo } from "@t3tools/contracts"; + +export type CloudEnvironmentProvider = "render"; + +interface CloudEnvironmentLike { + readonly displayUrl: string | null; + readonly serverConfig: ServerConfig | null; +} + +function isRenderHostname(value: string): boolean { + try { + return new URL(value).hostname.toLowerCase().endsWith(".onrender.com"); + } catch { + return false; + } +} + +export function cloudEnvironmentProvider( + environment: CloudEnvironmentLike, +): CloudEnvironmentProvider | null { + const advertisedProvider = environment.serverConfig?.environment.cloud?.provider; + if (advertisedProvider === "render") { + return advertisedProvider; + } + return environment.displayUrl && isRenderHostname(environment.displayUrl) ? "render" : null; +} + +export function cloudEnvironmentWorkspaceRoot(environment: CloudEnvironmentLike): string | null { + return environment.serverConfig?.environment.cloud?.workspaceRoot ?? null; +} + +export function cloudEnvironmentProviderLabel(provider: CloudEnvironmentProvider): string { + switch (provider) { + case "render": + return "Render"; + } +} + +export function inferRepositoryDirectoryName(input: { + readonly repository: SourceControlRepositoryInfo | null; + readonly remoteUrl: string; +}): string | null { + const candidate = input.repository?.nameWithOwner ?? input.remoteUrl; + const withoutQuery = candidate.split(/[?#]/, 1)[0]?.replace(/[\\/]+$/, "") ?? ""; + const segment = + withoutQuery + .split(/[\\/:]/) + .at(-1) + ?.replace(/\.git$/i, "") + .trim() ?? ""; + return segment.length > 0 && segment !== "." && segment !== ".." ? segment : null; +} + +export function cloudCloneDestination(input: { + readonly workspaceRoot: string; + readonly repository: SourceControlRepositoryInfo | null; + readonly remoteUrl: string; +}): string | null { + const directoryName = inferRepositoryDirectoryName(input); + if (!directoryName) { + return null; + } + const workspaceRoot = input.workspaceRoot.trim().replace(/[\\/]+$/, ""); + return workspaceRoot.length > 0 ? `${workspaceRoot}/${directoryName}` : null; +} diff --git a/apps/web/src/components/CommandPalette.tsx b/apps/web/src/components/CommandPalette.tsx index 853d317655..db1c3d35ae 100644 --- a/apps/web/src/components/CommandPalette.tsx +++ b/apps/web/src/components/CommandPalette.tsx @@ -29,6 +29,7 @@ import { useNavigate, useParams } from "@tanstack/react-router"; import * as Option from "effect/Option"; import { ArrowLeftIcon, + CloudIcon, CornerLeftUpIcon, FileSearchIcon, FolderIcon, @@ -134,6 +135,13 @@ import { ComposerHandleContext, useComposerHandleContext } from "../composerHand import type { ChatComposerHandle } from "./chat/ChatComposer"; import { getProjectOrderKey, selectProjectGroupingSettings } from "../logicalProject"; import { legacyProjectCwdPreferenceKey, useUiStateStore } from "../uiStateStore"; +import { + cloudCloneDestination, + cloudEnvironmentProvider, + cloudEnvironmentProviderLabel, + cloudEnvironmentWorkspaceRoot, + type CloudEnvironmentProvider, +} from "../cloud/cloudEnvironment"; import { buildSidebarProjectPickerEntries, buildSidebarProjectSnapshots, @@ -170,6 +178,7 @@ interface AddProjectEnvironmentOption { readonly isPrimary: boolean; readonly isConnected: boolean; readonly status: string; + readonly cloudProvider: CloudEnvironmentProvider | null; } type AddProjectRemoteProviderKind = Extract< @@ -192,6 +201,7 @@ type AddProjectCloneFlow = readonly repository: SourceControlRepositoryInfo | null; readonly remoteUrl: string; }; +type AddProjectCloneConfirmation = Extract; const REMOTE_PROJECT_SOURCES: ReadonlyArray = [ "url", @@ -540,6 +550,10 @@ function OpenCommandPaletteDialog(props: { const lookupRepository = useAtomQueryRunner(sourceControlEnvironment.repository, { reportFailure: false, }); + const loadSourceControlDiscovery = useAtomQueryRunner(sourceControlEnvironment.discovery, { + reportFailure: false, + reportDefect: false, + }); const loadBrowsePath = useAtomQueryRunner(filesystemEnvironment.browse, { reportFailure: false, reportDefect: false, @@ -695,6 +709,7 @@ function OpenCommandPaletteDialog(props: { isPrimary, isConnected: canCreateProjectInEnvironment(environment.connection.phase), status: connectionStatusText(environment.connection), + cloudProvider: cloudEnvironmentProvider(environment), }; }); @@ -1209,7 +1224,7 @@ function OpenCommandPaletteDialog(props: { ); const startAddProjectSourceSelection = useCallback( - (environmentId: EnvironmentId): void => { + async (environmentId: EnvironmentId): Promise => { const environment = environments.find( (candidate) => candidate.environmentId === environmentId, ); @@ -1225,13 +1240,21 @@ function OpenCommandPaletteDialog(props: { } setAddProjectEnvironmentId(environmentId); setAddProjectCloneFlow(null); + let discovery = browseEnvironmentId === environmentId ? sourceControlDiscovery.data : null; + if (discovery === null) { + const discoveryResult = await loadSourceControlDiscovery({ + environmentId, + input: {}, + }); + if (discoveryResult._tag === "Success") { + discovery = discoveryResult.value; + } + } pushPaletteView({ addonIcon: , groups: buildAddProjectSourceGroups( environmentId, - buildAddProjectRemoteSourceReadiness( - browseEnvironmentId === environmentId ? sourceControlDiscovery.data : null, - ), + buildAddProjectRemoteSourceReadiness(discovery), ), }); }, @@ -1239,44 +1262,79 @@ function OpenCommandPaletteDialog(props: { browseEnvironmentId, buildAddProjectSourceGroups, environments, + loadSourceControlDiscovery, pushPaletteView, sourceControlDiscovery.data, ], ); - const addProjectEnvironmentItems: CommandPaletteActionItem[] = addProjectEnvironmentOptions.map( - (option) => ({ + const addProjectEnvironmentGroups = useMemo(() => { + const toItem = (option: AddProjectEnvironmentOption): CommandPaletteActionItem => ({ kind: "action", value: `action:add-project:environment:${option.environmentId}`, - searchTerms: [option.label, option.environmentId, option.isPrimary ? "this device" : ""], + searchTerms: [ + option.label, + option.environmentId, + option.isPrimary ? "this device" : "", + option.cloudProvider ? "cloud render" : "", + ], title: option.label, description: option.isConnected - ? option.isPrimary - ? "This device" - : option.environmentId + ? option.cloudProvider + ? `Cloud workspace · Powered by ${cloudEnvironmentProviderLabel(option.cloudProvider)}` + : option.isPrimary + ? "This device" + : option.environmentId : option.status, disabled: !option.isConnected, - icon: , + icon: option.cloudProvider ? ( + + ) : ( + + ), keepOpen: true, run: async () => { - startAddProjectSourceSelection(option.environmentId); + await startAddProjectSourceSelection(option.environmentId); }, - }), - ); + }); + const cloudItems = addProjectEnvironmentOptions + .filter((option) => option.cloudProvider !== null) + .map(toItem); + const deviceItems = addProjectEnvironmentOptions + .filter((option) => option.cloudProvider === null) + .map(toItem); - const addProjectEnvironmentGroups = useMemo( - () => [ - { - value: "environments", - label: "Environments", - items: addProjectEnvironmentItems, - }, - ], - [addProjectEnvironmentItems], + return [ + ...(cloudItems.length > 0 + ? [ + { + value: "cloud-environments", + label: "Cloud environments · Powered by Render", + items: cloudItems, + }, + ] + : []), + ...(deviceItems.length > 0 + ? [ + { + value: "device-environments", + label: "Devices", + items: deviceItems, + }, + ] + : []), + ]; + }, [addProjectEnvironmentOptions, startAddProjectSourceSelection]); + const hasCloudAddProjectEnvironment = addProjectEnvironmentOptions.some( + (option) => option.cloudProvider !== null, ); const openAddProjectFlow = useCallback(() => { - if (addProjectEnvironmentOptions.length > 1 || defaultAddProjectEnvironmentId === null) { + if ( + hasCloudAddProjectEnvironment || + addProjectEnvironmentOptions.length > 1 || + defaultAddProjectEnvironmentId === null + ) { pushPaletteView({ addonIcon: , groups: addProjectEnvironmentGroups, @@ -1301,6 +1359,7 @@ function OpenCommandPaletteDialog(props: { addProjectEnvironmentGroups, addProjectEnvironmentOptions.length, defaultAddProjectEnvironmentId, + hasCloudAddProjectEnvironment, pushPaletteView, startAddProjectSourceSelection, ]); @@ -1664,6 +1723,119 @@ function OpenCommandPaletteDialog(props: { return getAddProjectInitialQueryForEnvironment(environmentId); } + function getCloudCloneDestination(flow: AddProjectCloneConfirmation): string | null | undefined { + const environment = environments.find( + (candidate) => candidate.environmentId === flow.environmentId, + ); + if (!environment) { + return undefined; + } + const workspaceRoot = cloudEnvironmentWorkspaceRoot(environment); + if (!workspaceRoot) { + return undefined; + } + return cloudCloneDestination({ + workspaceRoot, + repository: flow.repository, + remoteUrl: flow.remoteUrl, + }); + } + + async function cloneIntoCloudEnvironmentIfConfigured( + flow: AddProjectCloneConfirmation, + ): Promise { + const destination = getCloudCloneDestination(flow); + if (destination === undefined) { + return false; + } + if (destination === null) { + toastManager.add( + stackedThreadToast({ + type: "error", + title: "Unable to name cloud workspace", + description: "Use a repository URL whose final path contains the repository name.", + }), + ); + return true; + } + await cloneAndAddRemoteProject(flow, destination); + return true; + } + + async function cloneAndAddRemoteProject( + flow: AddProjectCloneConfirmation, + destinationPathInput: string, + ): Promise { + const rawDestination = destinationPathInput.trim(); + if (rawDestination.length === 0 || isRemoteProjectCloning) { + return; + } + + const targetEnvironment = environments.find( + (candidate) => candidate.environmentId === flow.environmentId, + ); + const targetPlatform = getEnvironmentBrowsePlatform( + targetEnvironment?.serverConfig?.environment.platform.os, + ); + const targetCurrentProjectCwd = + currentProjectEnvironmentId === flow.environmentId ? currentProjectCwd : null; + + if (isUnsupportedWindowsProjectPath(rawDestination, targetPlatform)) { + toastManager.add( + stackedThreadToast({ + type: "error", + title: "Clone failed", + description: "Windows-style paths are only supported on Windows.", + }), + ); + return; + } + + if (isExplicitRelativeProjectPath(rawDestination) && !targetCurrentProjectCwd) { + toastManager.add( + stackedThreadToast({ + type: "error", + title: "Clone failed", + description: "Relative paths require an active project.", + }), + ); + return; + } + + const destinationPath = resolveProjectPathForDispatch(rawDestination, targetCurrentProjectCwd); + if (destinationPath.length === 0) { + return; + } + + setIsRemoteProjectCloning(true); + const cloneResult = await cloneRepository({ + environmentId: flow.environmentId, + input: { + remoteUrl: flow.remoteUrl, + destinationPath, + }, + }); + setIsRemoteProjectCloning(false); + if (cloneResult._tag === "Failure") { + if (!isAtomCommandInterrupted(cloneResult)) { + toastManager.add( + stackedThreadToast({ + type: "error", + title: "Clone failed", + description: errorMessage(squashAtomCommandFailure(cloneResult)), + }), + ); + } + return; + } + await handleAddProjectForEnvironment({ + environmentId: flow.environmentId, + rawCwd: cloneResult.value.cwd, + platform: targetPlatform, + currentProjectCwd: targetCurrentProjectCwd, + }); + } + async function submitAddProjectCloneFlow(destinationPathInput?: string): Promise { if (!addProjectCloneFlow) { return; @@ -1687,15 +1859,19 @@ function OpenCommandPaletteDialog(props: { const provider = remoteProjectSourceProvider(addProjectCloneFlow.source); if (!provider) { - const destinationPath = getDefaultCloneParentPath(addProjectCloneFlow.environmentId); - setAddProjectCloneFlow({ + const confirmation: AddProjectCloneConfirmation = { step: "confirm", environmentId: addProjectCloneFlow.environmentId, source: addProjectCloneFlow.source, repositoryInput: rawRepository, repository: null, remoteUrl: rawRepository, - }); + }; + if (await cloneIntoCloudEnvironmentIfConfigured(confirmation)) { + return; + } + const destinationPath = getDefaultCloneParentPath(addProjectCloneFlow.environmentId); + setAddProjectCloneFlow(confirmation); setHighlightedItemValue(null); setQuery(destinationPath); setBrowseGeneration((generation) => generation + 1); @@ -1724,78 +1900,32 @@ function OpenCommandPaletteDialog(props: { return; } const repository = lookupResult.value; - const destinationPath = getDefaultCloneParentPath(addProjectCloneFlow.environmentId); - setAddProjectCloneFlow({ + const cloneEnvironment = environments.find( + (environment) => environment.environmentId === addProjectCloneFlow.environmentId, + ); + const confirmation: AddProjectCloneConfirmation = { step: "confirm", environmentId: addProjectCloneFlow.environmentId, source: addProjectCloneFlow.source, repositoryInput: rawRepository, repository, - remoteUrl: repository.sshUrl, - }); + remoteUrl: + cloneEnvironment && cloudEnvironmentWorkspaceRoot(cloneEnvironment) + ? repository.url + : repository.sshUrl, + }; + if (await cloneIntoCloudEnvironmentIfConfigured(confirmation)) { + return; + } + const destinationPath = getDefaultCloneParentPath(addProjectCloneFlow.environmentId); + setAddProjectCloneFlow(confirmation); setHighlightedItemValue(null); setQuery(destinationPath); setBrowseGeneration((generation) => generation + 1); return; } - const rawDestination = (destinationPathInput ?? query).trim(); - if (rawDestination.length === 0 || isRemoteProjectCloning) { - return; - } - - if (isUnsupportedWindowsProjectPath(rawDestination, browseEnvironmentPlatform)) { - toastManager.add( - stackedThreadToast({ - type: "error", - title: "Clone failed", - description: "Windows-style paths are only supported on Windows.", - }), - ); - return; - } - - if (isExplicitRelativeProjectPath(rawDestination) && !currentProjectCwdForBrowse) { - toastManager.add( - stackedThreadToast({ - type: "error", - title: "Clone failed", - description: "Relative paths require an active project.", - }), - ); - return; - } - - const destinationPath = resolveProjectPathForDispatch( - rawDestination, - currentProjectCwdForBrowse, - ); - if (destinationPath.length === 0) { - return; - } - - setIsRemoteProjectCloning(true); - const cloneResult = await cloneRepository({ - environmentId: addProjectCloneFlow.environmentId, - input: { - remoteUrl: addProjectCloneFlow.remoteUrl, - destinationPath, - }, - }); - setIsRemoteProjectCloning(false); - if (cloneResult._tag === "Failure") { - if (!isAtomCommandInterrupted(cloneResult)) { - toastManager.add( - stackedThreadToast({ - type: "error", - title: "Clone failed", - description: errorMessage(squashAtomCommandFailure(cloneResult)), - }), - ); - } - return; - } - await handleAddProject(cloneResult.value.cwd); + await cloneAndAddRemoteProject(addProjectCloneFlow, destinationPathInput ?? query); } const browseTo = useCallback( diff --git a/apps/web/src/components/settings/ConnectionsSettings.tsx b/apps/web/src/components/settings/ConnectionsSettings.tsx index cd3db1a97b..b6180e19c0 100644 --- a/apps/web/src/components/settings/ConnectionsSettings.tsx +++ b/apps/web/src/components/settings/ConnectionsSettings.tsx @@ -1,5 +1,6 @@ import { ChevronsLeftRightEllipsisIcon, + CloudIcon, PlusIcon, QrCodeIcon, RefreshCwIcon, @@ -131,6 +132,7 @@ import { ConnectionStatusDot } from "../ConnectionStatusDot"; import { ServerUpdateAction, ServerUpdateProgress } from "../ServerUpdateAction"; import { CloudEnvironmentConnectRows } from "../cloud/CloudEnvironmentConnectList"; import { ITEM_ROW_CLASSNAME, ITEM_ROW_INNER_CLASSNAME } from "./itemRows"; +import { cloudEnvironmentProvider, cloudEnvironmentProviderLabel } from "~/cloud/cloudEnvironment"; const DEFAULT_TAILSCALE_SERVE_PORT = 443; const EMPTY_ADVERTISED_ENDPOINTS: ReadonlyArray = []; @@ -1394,7 +1396,9 @@ function SavedBackendListRow({ environment.entry.profile.value._tag === "SshConnectionProfile" ? environment.entry.profile.value.target : null; + const cloudProvider = cloudEnvironmentProvider(environment); const metadataBits = [ + cloudProvider ? `Powered by ${cloudEnvironmentProviderLabel(cloudProvider)}` : null, sshTarget ? `SSH ${formatDesktopSshTarget(sshTarget)}` : null, environment.relayManaged ? "T3 Connect" : null, ].filter((value): value is string => value !== null); @@ -1742,6 +1746,15 @@ export function ConnectionsSettings() { .toSorted((left, right) => left.label.localeCompare(right.label)), [environments], ); + const renderCloudEnvironments = useMemo( + () => + savedEnvironments.filter((environment) => cloudEnvironmentProvider(environment) === "render"), + [savedEnvironments], + ); + const savedNonCloudEnvironments = useMemo( + () => savedEnvironments.filter((environment) => cloudEnvironmentProvider(environment) === null), + [savedEnvironments], + ); const savedDesktopSshEnvironmentsByAlias = useMemo( () => savedEnvironments.reduce>( @@ -3344,6 +3357,33 @@ export function ConnectionsSettings() { )} + } + > + + {renderCloudEnvironments.length === 0 ? ( + + ) : ( + renderCloudEnvironments.map((environment) => ( + + )) + )} + + } > - {savedEnvironments.map((environment) => ( + {savedNonCloudEnvironments.map((environment) => (