Skip to content

🙌 OpenHands: AI-Driven Development

feat(backends): compact Cloud vs Agent-server add-backend chooser (#16211)

FraterCCCLXIII932edbf81252
diff --git a/__tests__/components/backends/add-backend-modal.test.tsx b/__tests__/components/backends/add-backend-modal.test.tsx
index 5f8f8b89fa..f8d1ebe6a6 100644
--- a/__tests__/components/backends/add-backend-modal.test.tsx
+++ b/__tests__/components/backends/add-backend-modal.test.tsx
@@ -1,6 +1,6 @@
import React from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
-import { render, screen, waitFor } from "@testing-library/react";
+import { render, screen, waitFor, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { MockInstance } from "vitest";
@@ -15,6 +15,23 @@ import * as telemetry from "#/services/telemetry";
const getServerInfoMock = vi.hoisted(() => vi.fn());
+const deviceFlowMocks = vi.hoisted(() => ({
+ startDeviceFlow: vi.fn(),
+ pollForToken: vi.fn(),
+}));
+
+// Partial mock: only the network calls are stubbed so the rest of the module
+// (host classification) keeps its production behavior.
+vi.mock("#/api/device-flow-client", async (importOriginal) => {
+ const actual =
+ await importOriginal<typeof import("#/api/device-flow-client")>();
+ return {
+ ...actual,
+ startDeviceFlow: deviceFlowMocks.startDeviceFlow,
+ pollForToken: deviceFlowMocks.pollForToken,
+ };
+});
+
vi.mock("@openhands/typescript-client/clients", () => ({
ServerClient: vi.fn(function ServerClientMock() {
return {
@@ -51,11 +68,28 @@ function renderWithProviders(
);
}
+async function selectAgentServer(user = userEvent.setup()) {
+ await user.click(screen.getByTestId("add-backend-option-agent-server"));
+ return user;
+}
+
beforeEach(() => {
captureMock = vi.spyOn(telemetry, "trackEvent").mockResolvedValue(undefined);
window.localStorage.clear();
getServerInfoMock.mockReset();
getServerInfoMock.mockResolvedValue({ version: "1.28.0" });
+ deviceFlowMocks.startDeviceFlow.mockReset();
+ deviceFlowMocks.startDeviceFlow.mockResolvedValue({
+ device_code: "device-code",
+ user_code: "ABCD-EFGH",
+ verification_uri: "https://app.all-hands.dev/device",
+ verification_uri_complete:
+ "https://app.all-hands.dev/device?user_code=ABCD-EFGH",
+ expires_in: 600,
+ interval: 5,
+ });
+ deviceFlowMocks.pollForToken.mockReset();
+ deviceFlowMocks.pollForToken.mockImplementation(() => new Promise(() => {}));
__resetActiveStoreForTests();
});
@@ -65,42 +99,162 @@ afterEach(() => {
__resetActiveStoreForTests();
});
-describe("AddBackendModal – two-column layout", () => {
- it("renders a two-column layout with manual and cloud sections", () => {
+describe("AddBackendModal – connection chooser", () => {
+ it("renders OpenHands Cloud first with its brand mark", () => {
renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+ const tabs = screen.getAllByRole("tab");
+ expect(tabs).toHaveLength(2);
+ expect(tabs[0]).toHaveAttribute("data-testid", "add-backend-option-cloud");
+ expect(tabs[0]).toHaveAttribute("aria-selected", "true");
+ expect(tabs[1]).toHaveAttribute(
+ "data-testid",
+ "add-backend-option-agent-server",
+ );
+ expect(tabs[1]).toHaveAttribute("aria-selected", "false");
+ expect(
+ within(tabs[0]).getByTestId("add-backend-option-cloud-logo"),
+ ).toBeInTheDocument();
+ expect(tabs[0]).toHaveTextContent("BACKEND$CLOUD_OPTION_DESCRIPTION");
+ expect(tabs[1]).toHaveTextContent(
+ "BACKEND$AGENT_SERVER_OPTION_DESCRIPTION",
+ );
+
+ expect(screen.getByTestId("add-backend-cloud-panel")).toBeInTheDocument();
+ expect(screen.getByTestId("add-backend-login-button")).toBeInTheDocument();
+ expect(screen.getByTestId("add-backend-description")).toHaveTextContent(
+ "BACKEND$CHOOSER_DESCRIPTION",
+ );
+ expect(
+ screen.getByTestId("add-backend-deployment-options-link"),
+ ).toHaveAttribute(
+ "href",
+ "https://docs.openhands.dev/overview/introduction",
+ );
+ // Short inline link so the description reads as one flowing sentence.
+ expect(
+ screen.getByTestId("add-backend-deployment-options-link"),
+ ).toHaveTextContent("CTA$LEARN_MORE");
+ });
+
+ it("hides the Advanced host disclosure while authorization is pending", async () => {
+ const user = userEvent.setup();
+ vi.spyOn(window, "open").mockReturnValue({
+ closed: false,
+ close: vi.fn(),
+ location: { href: "" },
+ } as unknown as Window);
+ renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+
+ expect(screen.getByTestId("add-backend-advanced-toggle")).toBeVisible();
+
+ await user.click(screen.getByTestId("add-backend-login-button"));
+
+ expect(
+ await screen.findByTestId("add-backend-auth-awaiting"),
+ ).toBeInTheDocument();
+ expect(
+ screen.queryByTestId("add-backend-advanced-toggle"),
+ ).not.toBeInTheDocument();
+ });
+
+ it("shows Local and Remote inside the Agent-server tab", async () => {
+ renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+
+ await selectAgentServer();
+
+ expect(
+ screen.getByTestId("add-backend-agent-server-panel"),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByTestId("add-backend-location-option-local"),
+ ).toHaveAttribute("aria-checked", "true");
+ expect(
+ screen.getByTestId("add-backend-location-option-remote"),
+ ).toHaveAttribute("aria-checked", "false");
+ expect(
+ screen
+ .getByTestId("add-backend-location-option-local")
+ .querySelector("svg"),
+ ).not.toBeNull();
+ expect(
+ screen
+ .getByTestId("add-backend-location-option-remote")
+ .querySelector("svg"),
+ ).not.toBeNull();
+ expect(
+ screen.getByTestId("add-backend-local-guidance"),
+ ).toBeInTheDocument();
+ expect(screen.getByTestId("add-backend-local-docs-link")).toHaveAttribute(
+ "href",
+ expect.stringContaining("docs/DEVELOPMENT.md"),
+ );
expect(screen.getByTestId("add-backend-name")).toBeInTheDocument();
expect(screen.getByTestId("add-backend-host")).toBeInTheDocument();
- expect(screen.getByTestId("add-backend-host-helper")).toBeInTheDocument();
expect(screen.getByTestId("add-backend-api-key")).toBeInTheDocument();
expect(screen.getByTestId("add-backend-submit")).toBeInTheDocument();
+ });
+
+ it("keeps the full setup guidance in a collapsible note", async () => {
+ renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+ const user = await selectAgentServer();
- expect(screen.getByTestId("add-backend-cloud-title")).toBeInTheDocument();
- expect(screen.getByTestId("add-backend-login-button")).toBeInTheDocument();
expect(
- screen.getByTestId("add-backend-advanced-toggle"),
- ).toBeInTheDocument();
+ screen.getByTestId("add-backend-local-guidance-toggle"),
+ ).toHaveAttribute("aria-expanded", "false");
+ expect(
+ screen.getByTestId("add-backend-local-guidance-body"),
+ ).toHaveAttribute("aria-hidden", "true");
+
+ await user.click(screen.getByTestId("add-backend-local-guidance-toggle"));
+ expect(
+ screen.getByTestId("add-backend-local-guidance-toggle"),
+ ).toHaveAttribute("aria-expanded", "true");
+ const localGuidance = screen.getByTestId("add-backend-local-guidance");
+ expect(localGuidance).toHaveTextContent("BACKEND$LOCAL_SETUP_DESCRIPTION");
+ expect(localGuidance).toHaveTextContent(
+ "agent-canvas --backend-only --port 8001",
+ );
+
+ await user.click(screen.getByTestId("add-backend-location-option-remote"));
+ expect(
+ screen.getByTestId("add-backend-remote-guidance-toggle"),
+ ).toHaveAttribute("aria-expanded", "false");
+ expect(
+ screen.getByTestId("add-backend-remote-guidance-body"),
+ ).toHaveAttribute("aria-hidden", "true");
+
+ await user.click(screen.getByTestId("add-backend-remote-guidance-toggle"));
+ const remoteGuidance = screen.getByTestId("add-backend-remote-guidance");
+ expect(remoteGuidance).toHaveTextContent(
+ "BACKEND$REMOTE_SETUP_DESCRIPTION",
+ );
+ expect(remoteGuidance).toHaveTextContent(
+ "BACKEND$REMOTE_CONNECTION_DESCRIPTION",
+ );
});
- it("starts with an empty host field (no prefilled value)", () => {
+ it("starts the Agent-server form with an empty host field", async () => {
renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+ await selectAgentServer();
+
expect(screen.getByTestId("add-backend-host")).toHaveValue("");
});
it("disables Connect until name and host are filled (local backend)", async () => {
renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+ const user = await selectAgentServer();
const submit = screen.getByTestId(
"add-backend-submit",
) as HTMLButtonElement;
expect(submit).toBeDisabled();
- const user = userEvent.setup();
await user.type(screen.getByTestId("add-backend-name"), "My Server");
expect(submit).toBeDisabled();
- // A localhost host infers "local" kind → no API key required
+ // Local agent-server connections do not require an API key.
await user.type(
screen.getByTestId("add-backend-host"),
"http://localhost:8000",
@@ -112,7 +266,7 @@ describe("AddBackendModal – two-column layout", () => {
const onClose = vi.fn();
renderWithProviders(<AddBackendModal onClose={onClose} />);
- const user = userEvent.setup();
+ const user = await selectAgentServer();
await user.type(screen.getByTestId("add-backend-name"), "Local Extra");
await user.type(
screen.getByTestId("add-backend-host"),
@@ -137,31 +291,54 @@ describe("AddBackendModal – two-column layout", () => {
});
});
- it("requires API key when host infers cloud kind", async () => {
- renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
+ it("requires an API key for a Remote agent-server", async () => {
+ const onClose = vi.fn();
+ renderWithProviders(<AddBackendModal onClose={onClose} />);
+ const user = await selectAgentServer();
+ await user.click(screen.getByTestId("add-backend-location-option-remote"));
const submit = screen.getByTestId(
"add-backend-submit",
) as HTMLButtonElement;
- const user = userEvent.setup();
- await user.type(screen.getByTestId("add-backend-name"), "Cloud");
+ expect(
+ screen.getByTestId("add-backend-remote-guidance"),
+ ).toBeInTheDocument();
+ expect(screen.getByTestId("add-backend-remote-docs-link")).toHaveAttribute(
+ "href",
+ expect.stringContaining("docs/SELF_HOSTING.md"),
+ );
+
+ await user.type(screen.getByTestId("add-backend-name"), "Remote GPU");
await user.type(
screen.getByTestId("add-backend-host"),
- "https://app.openhands.dev",
+ "https://agent.example.com",
);
- // Cloud host without API key → submit should be disabled
expect(submit).toBeDisabled();
await user.type(screen.getByTestId("add-backend-api-key"), "token");
expect(submit).not.toBeDisabled();
+
+ await user.click(submit);
+ await waitFor(() => expect(onClose).toHaveBeenCalled());
+
+ const stored = JSON.parse(
+ window.localStorage.getItem("openhands-backends") ?? "[]",
+ );
+ expect(
+ stored.find((backend: { name: string }) => backend.name === "Remote GPU"),
+ ).toMatchObject({
+ host: "https://agent.example.com",
+ apiKey: "token",
+ kind: "local",
+ });
});
it("saves the backend, switches to it, and closes", async () => {
const onClose = vi.fn();
renderWithProviders(<AddBackendModal onClose={onClose} />);
- const user = userEvent.setup();
+ const user = await selectAgentServer();
await user.type(screen.getByTestId("add-backend-name"), "Local 1");
await user.type(
screen.getByTestId("add-backend-host"),
@@ -197,7 +374,7 @@ describe("AddBackendModal – two-column layout", () => {
const onClose = vi.fn();
renderWithProviders(<AddBackendModal onClose={onClose} />);
- const user = userEvent.setup();
+ const user = await selectAgentServer();
await user.type(screen.getByTestId("add-backend-name"), "GPU Tunnel");
await user.type(
screen.getByTestId("add-backend-host"),
@@ -220,7 +397,7 @@ describe("AddBackendModal – two-column layout", () => {
const onClose = vi.fn();
renderWithProviders(<AddBackendModal onClose={onClose} />);
- const user = userEvent.setup();
+ const user = await selectAgentServer();
await user.type(screen.getByTestId("add-backend-name"), "Old Tunnel");
await user.type(
screen.getByTestId("add-backend-host"),
@@ -245,21 +422,43 @@ describe("AddBackendModal – two-column layout", () => {
expect(onClose).toHaveBeenCalledTimes(1);
});
- it("keeps advanced host settings in the layout when collapsed", async () => {
+ it("hides advanced host settings until expanded while preserving what was typed", async () => {
const user = userEvent.setup();
renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
- expect(screen.getByTestId("add-backend-cloud-host")).toBeInTheDocument();
+ // Collapsed: mounted so state survives, but collapsed to zero height and
+ // kept out of the tab order.
+ expect(screen.getByTestId("add-backend-advanced-panel")).toHaveAttribute(
+ "aria-hidden",
+ "true",
+ );
await user.click(screen.getByTestId("add-backend-advanced-toggle"));
+ expect(screen.getByTestId("add-backend-advanced-toggle")).toHaveAttribute(
+ "aria-expanded",
+ "true",
+ );
+ expect(
+ screen.getByTestId("add-backend-advanced-panel"),
+ ).not.toHaveAttribute("aria-hidden", "true");
- expect(screen.getByTestId("add-backend-cloud-host")).toBeInTheDocument();
+ await user.type(
+ screen.getByTestId("add-backend-cloud-host"),
+ "https://cloud.example.com",
+ );
+ await user.click(screen.getByTestId("add-backend-advanced-toggle"));
+ await user.click(screen.getByTestId("add-backend-advanced-toggle"));
+
+ expect(screen.getByTestId("add-backend-cloud-host")).toHaveValue(
+ "https://cloud.example.com",
+ );
});
it("renders the cloud login button without a key icon prefix", () => {
renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
const loginButton = screen.getByTestId("add-backend-login-button");
+ expect(loginButton).not.toHaveClass("w-full");
expect(loginButton.textContent?.trim()).not.toMatch(/^🔑/);
expect(loginButton.textContent).not.toContain("🔑");
});
@@ -282,7 +481,7 @@ describe("AddBackendModal – redirect after adding a backend", () => {
}
async function addLocalBackend() {
- const user = userEvent.setup();
+ const user = await selectAgentServer();
await user.type(screen.getByTestId("add-backend-name"), "Local Extra");
await user.type(
screen.getByTestId("add-backend-host"),
@@ -332,7 +531,7 @@ describe("AddBackendModal – analytics", () => {
it("captures backend_added once with manual connection metadata", async () => {
// Arrange
renderWithProviders(<AddBackendModal onClose={vi.fn()} />);
- const user = userEvent.setup();
+ const user = await selectAgentServer();
// Act — connect a local backend through the manual form
await user.type(screen.getByTestId("add-backend-name"), "Local Extra");
diff --git a/__tests__/components/backends/manage-backends-modal.test.tsx b/__tests__/components/backends/manage-backends-modal.test.tsx
index 18be777f02..e22ae2005c 100644
--- a/__tests__/components/backends/manage-backends-modal.test.tsx
+++ b/__tests__/components/backends/manage-backends-modal.test.tsx
@@ -502,6 +502,7 @@ describe("ManageBackendsModal", () => {
await user.click(await screen.findByTestId("manage-backends-add"));
await screen.findByTestId("add-backend-modal");
+ await user.click(screen.getByTestId("add-backend-option-agent-server"));
await user.type(screen.getByTestId("add-backend-name"), "Local Extra");
await user.type(
diff --git a/src/components/features/backends/backend-form-modal.tsx b/src/components/features/backends/backend-form-modal.tsx
index 4591b30818..652db065e8 100644
--- a/src/components/features/backends/backend-form-modal.tsx
+++ b/src/components/features/backends/backend-form-modal.tsx
@@ -1,6 +1,7 @@
import React from "react";
import { useQuery } from "@tanstack/react-query";
import { useTranslation } from "react-i18next";
+import { ChevronDown, Globe, Info, Monitor } from "lucide-react";
import { ServerClient } from "@openhands/typescript-client/clients";
import OpenHandsLogoWhite from "#/assets/branding/openhands-logo-white.svg?react";
import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop";
@@ -33,6 +34,8 @@ import {
modalTitleLgClassName,
modalTitleLgMediumClassName,
} from "#/utils/modal-classes";
+import ExternalLinkIcon from "#/icons/external-link.svg?react";
+import ServerIcon from "#/icons/server.svg?react";
import { getBackendStatusLabel } from "./backend-status-label";
import { BackendStatusDot } from "./backend-status-dot";
import { DeviceFlowAuth } from "./device-flow-auth";
@@ -142,10 +145,18 @@ function isValidHostUrl(host: string): boolean {
}
const DEFAULT_OPENHANDS_CLOUD_HOST = "https://app.all-hands.dev";
-
+const LOCAL_BACKEND_COMMAND = "agent-canvas --backend-only --port 8001";
+const LOCAL_AGENT_SERVER_DOCS_URL =
+ "https://github.com/OpenHands/OpenHands/blob/main/docs/DEVELOPMENT.md#alternative-development-workflows";
+const REMOTE_AGENT_SERVER_DOCS_URL =
+ "https://github.com/OpenHands/OpenHands/blob/main/docs/SELF_HOSTING.md";
+const DEPLOYMENT_OPTIONS_URL =
+ "https://docs.openhands.dev/overview/introduction";
export type BackendConnectionMethod = "manual" | "cloud_login";
export type BackendAddedSource = CloudConnectionSource;
+type AddBackendOption = "cloud" | "agent-server";
+type AgentServerLocation = "local" | "remote";
function getConnectionTestFailedTitle(
t: ReturnType<typeof useTranslation>["t"],
@@ -308,6 +319,8 @@ interface UseBackendFormOptions {
* success side effects. Should throw on failure.
*/
onSubmitOverride?: (payload: BackendFormSubmitPayload) => Promise<void>;
+ /** Fix the persisted backend kind instead of inferring it from the host. */
+ fixedKind?: BackendKind;
}
/**
@@ -324,6 +337,7 @@ function useBackendForm({
onSuccess,
requireApiKey = false,
onSubmitOverride,
+ fixedKind,
}: UseBackendFormOptions) {
const { t } = useTranslation("openhands");
@@ -342,7 +356,7 @@ function useBackendForm({
// respects that choice. A custom-domain OHE can't be distinguished from a
// custom-domain local agent-server by host alone, so ManualConnectionColumn
// exposes `setKind` (a Type selector) to let the user declare it.
- const kind = kindOverride ?? inferKindFromHost(host);
+ const kind = fixedKind ?? kindOverride ?? inferKindFromHost(host);
const needsApiKey = requireApiKey || kind !== "local";
const canSubmit =
name.trim().length > 0 &&
@@ -395,6 +409,7 @@ function useBackendForm({
onSuccess,
requireApiKey,
onSubmitOverride,
+ fixedKind,
t,
],
);
@@ -793,6 +808,8 @@ interface ManualConnectionColumnProps {
submitLabel: React.ReactNode;
submittingLabel: React.ReactNode;
submitTestId?: string;
+ fixedKind?: BackendKind;
+ showKindSelector?: boolean;
}
/**
@@ -807,6 +824,8 @@ function ManualConnectionColumn({
submitLabel,
submittingLabel,
submitTestId,
+ fixedKind,
+ showKindSelector = true,
}: ManualConnectionColumnProps) {
const { t } = useTranslation("openhands");
@@ -842,6 +861,7 @@ function ManualConnectionColumn({
);
},
requireApiKey,
+ fixedKind,
});
return (
@@ -850,62 +870,53 @@ function ManualConnectionColumn({
onSubmit={handleSubmit}
className="flex flex-col gap-4 flex-1 min-w-0"
>
- <div className="flex flex-col gap-1">
- <SettingsInput
- testId={`${testIdRoot}-name`}
- name={`${testIdRoot}-name`}
- type="text"
- label={t(I18nKey.BACKEND$NAME_LABEL)}
- value={name}
- onChange={(value) => {
- setName(value);
- setConnectionError(null);
- }}
- // eslint-disable-next-line i18next/no-literal-string -- example placeholder, not user-facing copy
- placeholder="e.g. My Server"
- className="w-full"
- />
- <p className="text-xs text-[var(--oh-muted)]">
- {t(I18nKey.BACKEND$NAME_HELPER)}
- </p>
- </div>
+ <SettingsInput
+ testId={`${testIdRoot}-name`}
+ name={`${testIdRoot}-name`}
+ type="text"
+ label={t(I18nKey.BACKEND$NAME_LABEL)}
+ hint={t(I18nKey.BACKEND$NAME_HELPER)}
+ value={name}
+ onChange={(value) => {
+ setName(value);
+ setConnectionError(null);
+ }}
+ // eslint-disable-next-line i18next/no-literal-string -- example placeholder, not user-facing copy
+ placeholder="e.g. My Server"
+ className="w-full"
+ />
- <div className="flex flex-col gap-1">
- <SettingsInput
- testId={`${testIdRoot}-host`}
- name={`${testIdRoot}-host`}
- type="text"
- label={t(I18nKey.BACKEND$HOST_LABEL)}
- value={host}
- onChange={(value) => {
- setHost(value);
- setConnectionError(null);
- }}
- // eslint-disable-next-line i18next/no-literal-string -- example value, not translatable
- placeholder="http://localhost:8000"
- className="w-full"
- />
- <p
- className="text-xs text-[var(--oh-muted)]"
- data-testid={`${testIdRoot}-host-helper`}
- >
- {t(I18nKey.BACKEND$HOST_HELPER)}
- </p>
- </div>
+ <SettingsInput
+ testId={`${testIdRoot}-host`}
+ name={`${testIdRoot}-host`}
+ type="text"
+ label={t(I18nKey.BACKEND$HOST_LABEL)}
+ hint={t(I18nKey.BACKEND$HOST_HELPER)}
+ value={host}
+ onChange={(value) => {
+ setHost(value);
+ setConnectionError(null);
+ }}
+ // eslint-disable-next-line i18next/no-literal-string -- example value, not translatable
+ placeholder="http://localhost:8000"
+ className="w-full"
+ />
- <div className="flex flex-col items-start gap-2.5">
- <span className="text-sm">{t(I18nKey.BACKEND$KIND_LABEL)}</span>
- <SegmentedToggle<BackendKind>
- value={kind}
- options={[
- { value: "local", label: t(I18nKey.BACKEND$KIND_LOCAL) },
- { value: "cloud", label: t(I18nKey.BACKEND$KIND_CLOUD) },
- ]}
- onChange={(value) => setKind(value)}
- ariaLabel={t(I18nKey.BACKEND$KIND_LABEL)}
- testId={`${testIdRoot}-kind`}
- />
- </div>
+ {showKindSelector ? (
+ <div className="flex flex-col items-start gap-2.5">
+ <span className="text-sm">{t(I18nKey.BACKEND$KIND_LABEL)}</span>
+ <SegmentedToggle<BackendKind>
+ value={kind}
+ options={[
+ { value: "local", label: t(I18nKey.BACKEND$KIND_LOCAL) },
+ { value: "cloud", label: t(I18nKey.BACKEND$KIND_CLOUD) },
+ ]}
+ onChange={(value) => setKind(value)}
+ ariaLabel={t(I18nKey.BACKEND$KIND_LABEL)}
+ testId={`${testIdRoot}-kind`}
+ />
+ </div>
+ ) : null}
<SettingsInput
testId={`${testIdRoot}-api-key`}
@@ -954,6 +965,8 @@ interface CloudLoginColumnProps {
testIdRoot: string;
lockedHost?: string;
analyticsSource?: CloudConnectionSource;
+ /** Omit repeated branding when a surrounding chooser already names Cloud. */
+ showBranding?: boolean;
}
/**
@@ -966,11 +979,13 @@ function CloudLoginColumn({
testIdRoot,
lockedHost,
analyticsSource,
+ showBranding = true,
}: CloudLoginColumnProps) {
const { t } = useTranslation("openhands");
const [advancedOpen, setAdvancedOpen] = React.useState(false);
const [customHost, setCustomHost] = React.useState("");
+ const advancedPanelId = `${testIdRoot}-advanced-panel`;
const effectiveHost =
lockedHost ?? (customHost.trim() || DEFAULT_OPENHANDS_CLOUD_HOST);
@@ -988,70 +1003,487 @@ function CloudLoginColumn({
};
return (
- <div className="flex flex-1 min-w-0 flex-col items-center gap-3 pb-8">
- <div className="flex flex-col items-center gap-1">
- <OpenHandsLogoWhite width={56} height={56} aria-hidden />
-
- <h4
- className={modalTitleLgMediumClassName}
- data-testid={`${testIdRoot}-cloud-title`}
- >
- {t(I18nKey.BACKEND$CLOUD_TITLE)}
- </h4>
- </div>
-
- <p className="text-center text-sm leading-relaxed text-[var(--oh-muted)]">
- {t(I18nKey.BACKEND$CLOUD_DESCRIPTION)}
- </p>
+ <div className="flex w-full min-w-0 flex-col items-center gap-3">
+ {showBranding ? (
+ <div className="flex flex-col items-center gap-1">
+ <OpenHandsLogoWhite width={56} height={56} aria-hidden />
+
+ <h4
+ className={modalTitleLgMediumClassName}
+ data-testid={`${testIdRoot}-cloud-title`}
+ >
+ {t(I18nKey.BACKEND$CLOUD_TITLE)}
+ </h4>
+ </div>
+ ) : null}
<DeviceFlowAuth
host={effectiveHost}
onSuccess={handleLoginSuccess}
testIdRoot={testIdRoot}
analyticsSource={analyticsSource}
+ className="w-full items-center"
+ idleDescription={
+ <p
+ className="text-center text-sm leading-relaxed text-[var(--oh-muted)]"
+ data-testid={`${testIdRoot}-cloud-description`}
+ >
+ {t(I18nKey.BACKEND$CLOUD_DESCRIPTION)}
+ </p>
+ }
+ // Host overriding only matters before the flow starts, so it rides the
+ // same idle-only slot as the description instead of sitting under the
+ // authorization status.
+ idleFooter={
+ lockedHost ? null : (
+ // Keep the Advanced disclosure at the original compact width even
+ // though the surrounding cloud panel spans the full chooser.
+ <div className="mx-auto w-full max-w-md">
+ <button
+ type="button"
+ onClick={() => setAdvancedOpen((open) => !open)}
+ aria-expanded={advancedOpen}
+ aria-controls={advancedPanelId}
+ data-testid={`${testIdRoot}-advanced-toggle`}
+ className="flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2"
+ >
+ <span>{t(I18nKey.BACKEND$ADVANCED)}</span>
+ <ChevronDownSmallIcon
+ className={cn(
+ "h-4 w-4 shrink-0 text-muted transition-transform duration-200 ease-out",
+ advancedOpen && "rotate-180",
+ )}
+ aria-hidden
+ />
+ </button>
+ {/* Height animates through `grid-template-rows` (0fr ↔ 1fr) so no
+ max-height guess is needed; the inner clip is what makes `0fr`
+ collapse. Content stays mounted so a typed host survives, and
+ `inert` keeps the collapsed field out of the tab order. */}
+ <div
+ className={cn(
+ "grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
+ advancedOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]",
+ )}
+ >
+ <div className="overflow-hidden">
+ <div
+ id={advancedPanelId}
+ data-testid={`${testIdRoot}-advanced-panel`}
+ aria-hidden={!advancedOpen}
+ inert={!advancedOpen ? true : undefined}
+ className={cn(
+ "pt-3 transition-opacity duration-200 ease-out motion-reduce:transition-none",
+ advancedOpen ? "opacity-100" : "opacity-0",
+ )}
+ >
+ <SettingsInput
+ testId={`${testIdRoot}-cloud-host`}
+ name={`${testIdRoot}-cloud-host`}
+ type="text"
+ label={t(I18nKey.BACKEND$HOST_LABEL)}
+ value={customHost}
+ onChange={setCustomHost}
+ placeholder={DEFAULT_OPENHANDS_CLOUD_HOST}
+ className="w-full"
+ />
+ <p className="mt-1 text-xs text-[var(--oh-muted)]">
+ {t(I18nKey.BACKEND$LOGIN_CLOUD_HINT)}
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ )
+ }
/>
+ </div>
+ );
+}
- {lockedHost ? null : (
- <div className="w-full">
- <button
- type="button"
- onClick={() => setAdvancedOpen((open) => !open)}
- aria-expanded={advancedOpen}
- data-testid={`${testIdRoot}-advanced-toggle`}
- className="flex w-full cursor-pointer items-center justify-center gap-1 text-center text-xs text-[var(--oh-muted)] transition-colors hover:text-content-2"
- >
- <span>{t(I18nKey.BACKEND$ADVANCED)}</span>
- <ChevronDownSmallIcon
- className={cn(
- "h-4 w-4 shrink-0 text-muted transition-transform",
- advancedOpen && "rotate-180",
- )}
+interface BackendOptionTabProps {
+ value: AddBackendOption;
+ selectedValue: AddBackendOption;
+ title: string;
+ description: string;
+ icon: React.ReactNode;
+ onSelect: (value: AddBackendOption) => void;
+ panelId: string;
+ testId: string;
+}
+
+/**
+ * Presents a connection-method tab: icon, title, and a one-line subtitle.
+ *
+ * The shared tablist owns the outer border, so these buttons meet cleanly at
+ * the center. Selection uses a bottom bar instead of recoloring the full
+ * outline, preserving the group as one visual control.
+ */
+function BackendOptionTab({
+ value,
+ selectedValue,
+ title,
+ description,
+ icon,
+ onSelect,
+ panelId,
+ testId,
+}: BackendOptionTabProps) {
+ const isSelected = value === selectedValue;
+ const tabId = `${testId}-tab`;
+
+ return (
+ <button
+ id={tabId}
+ type="button"
+ role="tab"
+ aria-selected={isSelected}
+ aria-controls={panelId}
+ data-testid={testId}
+ onClick={() => onSelect(value)}
+ className={cn(
+ "relative flex min-h-16 w-full cursor-pointer items-center gap-3 px-3 py-3 text-left transition-colors",
+ "first:border-r first:border-r-[var(--oh-border)]",
+ "focus-visible:z-10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-300",
+ isSelected
+ ? "bg-[var(--oh-surface-raised)] text-white after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-primary"
+ : "text-[var(--oh-muted)] hover:bg-[var(--oh-surface-raised)] hover:text-white",
+ )}
+ >
+ <span
+ className="flex size-8 shrink-0 items-center justify-center"
+ aria-hidden
+ >
+ {icon}
+ </span>
+ <span className="min-w-0 flex-1">
+ <span className="block truncate text-sm font-medium">{title}</span>
+ <span className="mt-0.5 block text-xs leading-tight text-[var(--oh-muted)]">
+ {description}
+ </span>
+ </span>
+ </button>
+ );
+}
+
+interface AnimatedPanelHeightProps {
+ children: React.ReactNode;
+}
+
+/**
+ * Animates a panel between content-driven heights.
+ *
+ * A ResizeObserver keeps the wrapper synchronized as tabs or nested
+ * disclosures change. The transition class remains mounted before the
+ * observer publishes a new height; adding it in the same render as the height
+ * would give the browser no previous painted value to interpolate from.
+ */
+function AnimatedPanelHeight({ children }: AnimatedPanelHeightProps) {
+ const contentRef = React.useRef<HTMLDivElement>(null);
+ const [height, setHeight] = React.useState<number>();
+
+ React.useLayoutEffect(() => {
+ const content = contentRef.current;
+ if (!content) return undefined;
+
+ const measure = () => {
+ const nextHeight = content.getBoundingClientRect().height;
+ // jsdom reports zero-sized layout boxes; leaving height automatic there
+ // keeps component tests representative without changing browser behavior.
+ setHeight(nextHeight > 0 ? nextHeight : undefined);
+ };
+
+ measure();
+ if (typeof ResizeObserver === "undefined") return undefined;
+
+ const observer = new ResizeObserver(measure);
+ observer.observe(content);
+ return () => observer.disconnect();
+ }, []);
+
+ return (
+ <div
+ data-testid="add-backend-panel-height"
+ style={height === undefined ? undefined : { height }}
+ className="overflow-hidden transition-[height] duration-300 ease-in-out motion-reduce:transition-none"
+ >
+ <div ref={contentRef}>{children}</div>
+ </div>
+ );
+}
+
+/**
+ * Collects every setup instruction for the selected location into one
+ * collapsible note.
+ *
+ * All of the guidance lives here — the intro, the example command (local) or
+ * the host formats to use with a tunnel (remote), and the docs link — so users
+ * never have to leave the modal to find out what belongs in the host field.
+ * It starts collapsed so the connection form remains compact; users can
+ * reveal the complete instructions without leaving the modal.
+ *
+ * Open/close uses a `grid-template-rows` transition (`0fr` ↔ `1fr`) so the
+ * height animates without a fixed `max-height` guess. Content stays mounted
+ * so the toggle does not remount the docs link on every expand.
+ */
+function AgentServerGuidance({ location }: { location: AgentServerLocation }) {
+ const { t } = useTranslation("openhands");
+ const [isExpanded, setIsExpanded] = React.useState(false);
+ const isRemote = location === "remote";
+ const title = isRemote
+ ? t(I18nKey.BACKEND$REMOTE_SETUP_TITLE)
+ : t(I18nKey.BACKEND$BEFORE_CONNECT_TITLE);
+ const description = isRemote
+ ? t(I18nKey.BACKEND$REMOTE_SETUP_DESCRIPTION)
+ : t(I18nKey.BACKEND$LOCAL_SETUP_DESCRIPTION);
+ const docsHref = isRemote
+ ? REMOTE_AGENT_SERVER_DOCS_URL
+ : LOCAL_AGENT_SERVER_DOCS_URL;
+ const docsLabel = isRemote
+ ? t(I18nKey.BACKEND$REMOTE_SETUP_DOCS)
+ : t(I18nKey.BACKEND$LOCAL_SETUP_DOCS);
+ const testIdRoot = isRemote ? "add-backend-remote" : "add-backend-local";
+ const toggleId = `${testIdRoot}-guidance-toggle`;
+ const bodyId = `${testIdRoot}-guidance-body`;
+
+ return (
+ <aside
+ data-testid={`${testIdRoot}-guidance`}
+ className="rounded-lg bg-[var(--oh-surface-raised)] text-sm text-[var(--oh-muted)]"
+ >
+ {/* Heading wraps the button so the accordion keeps a real heading in the
+ document outline while the whole row stays clickable. */}
+ <h4 className="text-white">
+ <button
+ id={toggleId}
+ type="button"
+ onClick={() => setIsExpanded((expanded) => !expanded)}
+ aria-expanded={isExpanded}
+ aria-controls={bodyId}
+ data-testid={toggleId}
+ className={cn(
+ // Padding lives on the button rather than the card so the hover
+ // fill spans the full row.
+ "flex w-full cursor-pointer items-center justify-between gap-2 rounded-lg px-3 py-2 text-left font-medium",
+ "transition-colors hover:bg-[var(--oh-interactive-hover)]",
+ "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-300",
+ )}
+ >
+ <span className="flex min-w-0 items-center gap-2">
+ <Info
+ className="size-4 shrink-0 text-[var(--oh-muted)]"
aria-hidden
/>
- </button>
+ <span className="truncate">{title}</span>
+ </span>
+ <ChevronDown
+ className={cn(
+ "size-5 shrink-0 text-[var(--oh-muted)] transition-transform duration-200 ease-out",
+ isExpanded && "rotate-180",
+ )}
+ aria-hidden
+ />
+ </button>
+ </h4>
+
+ {/* Outer grid owns the height animation; the inner overflow clip is
+ required so `1fr` measures the content while `0fr` fully collapses. */}
+ <div
+ className={cn(
+ "grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",
+ isExpanded ? "grid-rows-[1fr]" : "grid-rows-[0fr]",
+ )}
+ >
+ <div className="overflow-hidden">
<div
+ id={bodyId}
+ data-testid={bodyId}
+ role="region"
+ aria-labelledby={toggleId}
+ aria-hidden={!isExpanded}
+ inert={!isExpanded ? true : undefined}
className={cn(
- "pt-2",
- !advancedOpen && "pointer-events-none invisible",
+ "flex flex-col gap-2 px-3 pb-3 transition-opacity duration-200 ease-out motion-reduce:transition-none",
+ isExpanded ? "opacity-100" : "opacity-0",
)}
- aria-hidden={!advancedOpen}
>
- <SettingsInput
- testId={`${testIdRoot}-cloud-host`}
- name={`${testIdRoot}-cloud-host`}
- type="text"
- label={t(I18nKey.BACKEND$HOST_LABEL)}
- value={customHost}
- onChange={setCustomHost}
- placeholder={DEFAULT_OPENHANDS_CLOUD_HOST}
- className="w-full"
- />
- <p className="mt-1 text-xs text-[var(--oh-muted)]">
- {t(I18nKey.BACKEND$LOGIN_CLOUD_HINT)}
- </p>
+ <p className="leading-5">{description}</p>
+
+ {isRemote ? (
+ <div>
+ <h5 className="font-medium text-white">
+ {t(I18nKey.BACKEND$REMOTE_CONNECTION_TITLE)}
+ </h5>
+ <p className="mt-1 leading-5">
+ {t(I18nKey.BACKEND$REMOTE_CONNECTION_DESCRIPTION)}
+ </p>
+ </div>
+ ) : (
+ <code className="block break-words font-mono text-xs text-white">
+ {LOCAL_BACKEND_COMMAND}
+ </code>
+ )}
+
+ <a
+ href={docsHref}
+ target="_blank"
+ rel="noopener noreferrer"
+ data-testid={`${testIdRoot}-docs-link`}
+ tabIndex={isExpanded ? undefined : -1}
+ className="inline-flex w-fit items-center gap-1.5 text-primary hover:underline"
+ >
+ <span>{docsLabel}</span>
+ <ExternalLinkIcon className="size-4 shrink-0" aria-hidden />
+ </a>
</div>
</div>
- )}
+ </div>
+ </aside>
+ );
+}
+
+function AddBackendChooser({
+ onConnected,
+ source,
+}: {
+ onConnected: (
+ payload: BackendFormSubmitPayload,
+ connectionMethod: BackendConnectionMethod,
+ metadata?: BackendConnectionTestMetadata,
+ ) => void;
+ source: BackendAddedSource;
+}) {
+ const { t } = useTranslation("openhands");
+ const [selectedOption, setSelectedOption] =
+ React.useState<AddBackendOption>("cloud");
+ const [agentServerLocation, setAgentServerLocation] =
+ React.useState<AgentServerLocation>("local");
+ const panelId = "add-backend-selected-panel";
+ const selectedTabId = `add-backend-option-${selectedOption}-tab`;
+ const isCloudSelected = selectedOption === "cloud";
+
+ return (
+ <div data-testid="add-backend-chooser" className="flex flex-col">
+ <div
+ role="tablist"
+ aria-label={t(I18nKey.BACKEND$CHOOSER_TITLE)}
+ className="grid grid-cols-2 overflow-hidden rounded-lg border border-[var(--oh-border)]"
+ >
+ <BackendOptionTab
+ value="cloud"
+ selectedValue={selectedOption}
+ title={t(I18nKey.BACKEND$CLOUD_TITLE)}
+ description={t(I18nKey.BACKEND$CLOUD_OPTION_DESCRIPTION)}
+ icon={
+ <OpenHandsLogoWhite
+ width={32}
+ height={32}
+ data-testid="add-backend-option-cloud-logo"
+ />
+ }
+ onSelect={setSelectedOption}
+ panelId={panelId}
+ testId="add-backend-option-cloud"
+ />
+ <BackendOptionTab
+ value="agent-server"
+ selectedValue={selectedOption}
+ title={t(I18nKey.BACKEND$AGENT_SERVER_TITLE)}
+ description={t(I18nKey.BACKEND$AGENT_SERVER_OPTION_DESCRIPTION)}
+ icon={<ServerIcon className="size-6" />}
+ onSelect={setSelectedOption}
+ panelId={panelId}
+ testId="add-backend-option-agent-server"
+ />
+ </div>
+
+ <div className="mt-6">
+ <AnimatedPanelHeight>
+ <section
+ id={panelId}
+ role="tabpanel"
+ aria-labelledby={selectedTabId}
+ className="min-w-0"
+ >
+ {isCloudSelected ? (
+ /* Padding keeps the CTA and Advanced host field from hugging the
+ border; when Advanced expands the panel grows with the content
+ instead of squeezing it into the reserved min-height. */
+ <div
+ data-testid="add-backend-cloud-panel"
+ className={cn(
+ "relative isolate flex min-h-[13.5rem] w-full items-center justify-center rounded-xl border border-[var(--oh-border)] px-5 py-6",
+ // A soft greyscale halo sits behind the CTA; -z-10 keeps it under the
+ // content rather than washing over it.
+ "before:pointer-events-none before:absolute before:inset-0 before:-z-10 before:rounded-xl",
+ "before:bg-[radial-gradient(75%_75%_at_50%_50%,rgba(255,255,255,0.1)_0%,rgba(255,255,255,0)_70%)]",
+ )}
+ >
+ <CloudLoginColumn
+ onConnected={onConnected}
+ testIdRoot="add-backend"
+ analyticsSource={source}
+ showBranding={false}
+ />
+ </div>
+ ) : (
+ <div
+ data-testid="add-backend-agent-server-panel"
+ className="mx-auto w-full max-w-xl"
+ >
+ {/* Rules on either side center the toggle and read as a
+ divider between the chooser and the connection form. */}
+ <div className="flex items-center gap-3">
+ <span
+ className="h-px flex-1 bg-[var(--oh-border)]"
+ aria-hidden
+ />
+ <SegmentedToggle<AgentServerLocation>
+ value={agentServerLocation}
+ options={[
+ {
+ value: "local",
+ label: t(I18nKey.BACKEND$KIND_LOCAL),
+ icon: <Monitor aria-hidden />,
+ },
+ {
+ value: "remote",
+ label: t(I18nKey.BACKEND$KIND_REMOTE),
+ icon: <Globe aria-hidden />,
+ },
+ ]}
+ onChange={setAgentServerLocation}
+ ariaLabel={t(I18nKey.BACKEND$AGENT_SERVER_LOCATION)}
+ testId="add-backend-location"
+ />
+ <span
+ className="h-px flex-1 bg-[var(--oh-border)]"
+ aria-hidden
+ />
+ </div>
+
+ <div className="mt-4 flex flex-col gap-4">
+ <AgentServerGuidance
+ key={agentServerLocation}
+ location={agentServerLocation}
+ />
+ <ManualConnectionColumn
+ onConnected={onConnected}
+ testIdRoot="add-backend"
+ requireApiKey={agentServerLocation === "remote"}
+ submitLabel={t(I18nKey.BACKEND$CONNECT)}
+ submittingLabel={t(
+ I18nKey.ONBOARDING$BACKEND_STATUS_CHECKING,
+ )}
+ fixedKind="local"
+ showKindSelector={false}
+ />
+ </div>
+ </div>
+ )}
+ </section>
+ </AnimatedPanelHeight>
+ </div>
</div>
);
}
@@ -1066,6 +1498,7 @@ function AddBackendConnectionOptions({
const { addBackend } = useActiveBackendContext();
const redirectAfterAdd = useRedirectAfterAddBackend();
const { trackBackendAdded } = useTracking();
+ const lockedCloudHost = getLockedCloudHost();
const handleConnected = React.useCallback(
(
@@ -1087,12 +1520,18 @@ function AddBackendConnectionOptions({
[addBackend, redirectAfterAdd, onClose, trackBackendAdded, source],
);
- return (
- <BackendConnectionOptions
- onConnected={handleConnected}
- analyticsSource={source}
- />
- );
+ if (lockedCloudHost) {
+ return (
+ <CloudLoginColumn
+ onConnected={handleConnected}
+ testIdRoot="add-backend"
+ lockedHost={lockedCloudHost}
+ analyticsSource={source}
+ />
+ );
+ }
+
+ return <AddBackendChooser onConnected={handleConnected} source={source} />;
}
// ── Modal wrappers ──────────────────────────────────────────────────
@@ -1124,24 +1563,42 @@ export function BackendFormModal({
hideCloseButton ? "onboarding-modal" : "add-backend-modal"
}
className={cn(
- "relative rounded-xl border border-[var(--oh-border)] bg-base-secondary",
- modalWidthClassName("xl"),
+ "relative max-h-[92vh] w-[720px] overflow-y-auto rounded-xl border border-[var(--oh-border)] bg-base-secondary p-6",
MODAL_MAX_WIDTH_VIEWPORT,
)}
>
{hideCloseButton ? null : (
<ModalCloseButton onClose={onClose} testId="add-backend-close" />
)}
- {/* Header - hide in locked Cloud first-run mode for cleaner UX */}
{hideCloseButton ? null : (
- <div className="px-6 pt-6 pb-2 pr-12">
+ <div className="pr-8">
<h2 className={modalTitleLgClassName}>
- {t(I18nKey.BACKEND$ADD_TITLE)}
+ {t(I18nKey.BACKEND$CHOOSER_TITLE)}
</h2>
+ <p
+ className="mt-2 text-sm leading-6 text-[var(--oh-muted)]"
+ data-testid="add-backend-description"
+ >
+ {t(I18nKey.BACKEND$CHOOSER_DESCRIPTION)}{" "}
+ <a
+ href={DEPLOYMENT_OPTIONS_URL}
+ target="_blank"
+ rel="noopener noreferrer"
+ aria-label={t(I18nKey.BACKEND$DEPLOYMENT_OPTIONS)}
+ data-testid="add-backend-deployment-options-link"
+ className="text-primary hover:underline"
+ >
+ {t(I18nKey.CTA$LEARN_MORE)}
+ <ExternalLinkIcon
+ className="ml-1 inline size-3.5 align-[-0.125em]"
+ aria-hidden
+ />
+ </a>
+ </p>
</div>
)}
- <div className={cn("px-6 pb-6", hideCloseButton ? "pt-6" : "pt-2")}>
+ <div className={hideCloseButton ? undefined : "mt-5"}>
<AddBackendConnectionOptions onClose={onClose} source={source} />
</div>
</div>
diff --git a/src/components/features/backends/device-flow-auth.tsx b/src/components/features/backends/device-flow-auth.tsx
index 6398a942fd..eb79588969 100644
--- a/src/components/features/backends/device-flow-auth.tsx
+++ b/src/components/features/backends/device-flow-auth.tsx
@@ -28,6 +28,14 @@ interface DeviceFlowAuthProps {
idleButtonLabel?: string;
/** Optional visible content for the idle button. Defaults to the idle label. */
idleButtonContent?: React.ReactNode;
+ /** Optional content shown only before authentication starts. */
+ idleDescription?: React.ReactNode;
+ /**
+ * Optional content rendered under the idle button and, like
+ * `idleDescription`, only before authentication starts — so secondary
+ * controls step aside once the flow takes over the surface.
+ */
+ idleFooter?: React.ReactNode;
/** Optional classes for the root wrapper. */
className?: string;
/** Optional classes for the idle button. */
@@ -43,7 +51,7 @@ interface DeviceFlowAuthProps {
/**
* Device Flow authentication UI component.
*
- * Shows a "Login with OpenHands Cloud" button that initiates OAuth 2.0 Device Flow
+ * Shows a "Connect to OpenHands" button that initiates OAuth 2.0 Device Flow
* authentication. Displays status during the auth process and auto-opens
* the browser for user authorization.
*/
@@ -67,6 +75,8 @@ export function DeviceFlowAuth({
isDisabled = false,
idleButtonLabel,
idleButtonContent,
+ idleDescription,
+ idleFooter,
className,
buttonClassName,
buttonVariant = "primary",
@@ -180,6 +190,8 @@ export function DeviceFlowAuth({
data-testid={`${testIdRoot}-device-flow`}
className={cn("flex flex-col gap-3", className)}
>
+ {deviceFlow.status === "idle" ? idleDescription : null}
+
{deviceFlow.status === "idle" && buttonVariant === "unstyled" && (
<button
type="button"
@@ -199,7 +211,7 @@ export function DeviceFlowAuth({
variant={buttonVariant}
onClick={handleStartAuth}
testId={`${testIdRoot}-login-button`}
- className={cn("w-full", buttonClassName)}
+ className={buttonClassName}
isDisabled={isDisabled}
ariaLabel={idleButtonContent ? idleLabel : undefined}
>
@@ -207,6 +219,8 @@ export function DeviceFlowAuth({
</BrandButton>
)}
+ {deviceFlow.status === "idle" ? idleFooter : null}
+
{statusDisplay === "inline" ? statusContent : null}
{showStatusModal ? (
@@ -252,7 +266,7 @@ function DeviceFlowStatusContent({
if (status === "starting") {
return (
<div
- className="flex items-center gap-2 rounded-lg bg-base-tertiary p-3"
+ className="flex items-center justify-center gap-2"
data-testid={`${testIdRoot}-auth-starting`}
role="status"
aria-live="polite"
@@ -273,33 +287,34 @@ function DeviceFlowStatusContent({
return (
<div
- className="flex flex-col gap-4 rounded-lg bg-base-tertiary p-4"
+ className="flex flex-col gap-4"
data-testid={`${testIdRoot}-auth-awaiting`}
role="status"
aria-live="polite"
>
- <div className="flex items-center gap-2">
+ <div className="flex items-center justify-center gap-2">
<LoadingSpinner />
<span className="text-sm font-medium text-white">
{t(I18nKey.BACKEND$AUTH_AWAITING)}
</span>
</div>
- <p className="text-sm leading-5 text-[var(--oh-text-tertiary)]">
- {t(I18nKey.BACKEND$AUTH_BROWSER_OPENED)}
- </p>
- {validVerificationUrl ? (
- <div className="flex flex-col gap-1 rounded-md border border-[var(--oh-border)] bg-[var(--oh-surface)] p-3 text-xs text-[var(--oh-muted)]">
- <p>{t(I18nKey.BACKEND$AUTH_OPEN_MANUALLY)}</p>
+ <div className="flex flex-col gap-1">
+ <p className="text-center text-sm leading-5 text-[var(--oh-text-tertiary)]">
+ {validVerificationUrl
+ ? `${t(I18nKey.BACKEND$AUTH_BROWSER_OPENED)} ${t(I18nKey.BACKEND$AUTH_OPEN_MANUALLY)}`
+ : t(I18nKey.BACKEND$AUTH_BROWSER_OPENED)}
+ </p>
+ {validVerificationUrl ? (
<a
href={validVerificationUrl}
target="_blank"
rel="noopener noreferrer"
- className="max-h-16 overflow-auto break-all text-blue-400 hover:underline"
+ className="max-h-16 overflow-auto break-all text-center text-xs text-blue-400 hover:underline"
>
{validVerificationUrl}
</a>
- </div>
- ) : null}
+ ) : null}
+ </div>
<BrandButton
type="button"
variant="secondary"
diff --git a/src/components/features/backends/manage-backends-modal.tsx b/src/components/features/backends/manage-backends-modal.tsx
index 4a230026ba..91a9703320 100644
--- a/src/components/features/backends/manage-backends-modal.tsx
+++ b/src/components/features/backends/manage-backends-modal.tsx
@@ -194,7 +194,7 @@ export function ManageBackendsModal({
testIdRoot="manage-backends-reconnect-cloud"
idleButtonLabel={t(I18nKey.BACKEND$RECONNECT_CLOUD)}
className="w-full sm:w-auto"
- buttonClassName="sm:w-auto"
+ buttonClassName="w-full sm:w-auto"
statusDisplay="modal"
/>
) : null
diff --git a/src/components/features/files-tab/segmented-toggle.tsx b/src/components/features/files-tab/segmented-toggle.tsx
index ec2fa4459d..5b871447f7 100644
--- a/src/components/features/files-tab/segmented-toggle.tsx
+++ b/src/components/features/files-tab/segmented-toggle.tsx
@@ -1,8 +1,10 @@
+import type { ReactNode } from "react";
import { cn } from "#/utils/utils";
interface SegmentedToggleOption<T extends string> {
value: T;
label: string;
+ icon?: ReactNode;
}
interface SegmentedToggleProps<T extends string> {
@@ -45,12 +47,17 @@ export function SegmentedToggle<T extends string>({
}
onClick={() => onChange(option.value)}
className={cn(
- "px-2 py-0.5 rounded cursor-pointer transition-colors",
+ "inline-flex items-center gap-1.5 px-2.5 py-1 rounded cursor-pointer transition-colors",
isActive
? "bg-[var(--oh-interactive-hover)] text-white"
: "text-[var(--oh-muted)] hover:text-white",
)}
>
+ {option.icon ? (
+ <span className="inline-flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5">
+ {option.icon}
+ </span>
+ ) : null}
{option.label}
</button>
);
diff --git a/src/components/features/settings/settings-input.tsx b/src/components/features/settings/settings-input.tsx
index 1d35bcb9bc..7c60252a91 100644
--- a/src/components/features/settings/settings-input.tsx
+++ b/src/components/features/settings/settings-input.tsx
@@ -36,6 +36,12 @@ interface SettingsInputProps {
error?: string;
/** Renders a red asterisk next to the label to mark the field as required. */
showRequiredTag?: boolean;
+ /**
+ * Short guidance rendered next to the label, above the input. It sits inside
+ * the `<label>`, so it is announced as part of the field's accessible name —
+ * keep it to a phrase that reads well after the label text.
+ */
+ hint?: string;
onBlur?: () => void;
/** Extra classes merged onto the `<input>` element. */
inputClassName?: string;
@@ -68,6 +74,7 @@ export const SettingsInput = forwardRef<HTMLInputElement, SettingsInputProps>(
ariaInvalid,
error,
showRequiredTag,
+ hint,
onBlur,
inputClassName,
},
@@ -85,6 +92,14 @@ export const SettingsInput = forwardRef<HTMLInputElement, SettingsInputProps>(
</span>
)}
{showOptionalTag && <OptionalTag />}
+ {hint && (
+ <span
+ data-testid={testId ? `${testId}-hint` : undefined}
+ className="min-w-0 text-xs text-[var(--oh-muted)]"
+ >
+ {hint}
+ </span>
+ )}
</div>
<input
ref={ref}
diff --git a/src/i18n/translation.json b/src/i18n/translation.json
index d81aec7a69..a9284a3566 100644
--- a/src/i18n/translation.json
+++ b/src/i18n/translation.json
@@ -29018,6 +29018,278 @@
"uk": "Підключіть цей застосунок до іншого agent-сервера. Після додавання ви зможете перемикатися між бекендами через меню вище.",
"ca": "Connecta aquesta aplicació a un altre servidor agent. Un cop afegit, pots canviar entre backends des del menú superior."
},
+ "BACKEND$CHOOSER_TITLE": {
+ "en": "Choose how you want to connect",
+ "ja": "接続方法を選択",
+ "zh-CN": "选择连接方式",
+ "zh-TW": "選擇連線方式",
+ "ko-KR": "연결 방법 선택",
+ "no": "Velg hvordan du vil koble til",
+ "it": "Scegli come connetterti",
+ "pt": "Escolha como deseja se conectar",
+ "es": "Elige cómo quieres conectarte",
+ "ar": "اختر طريقة الاتصال",
+ "fr": "Choisissez votre mode de connexion",
+ "tr": "Nasıl bağlanmak istediğinizi seçin",
+ "de": "Wählen Sie aus, wie Sie eine Verbindung herstellen möchten",
+ "uk": "Виберіть спосіб підключення",
+ "ca": "Tria com et vols connectar"
+ },
+ "BACKEND$CHOOSER_DESCRIPTION": {
+ "en": "Connect to an agent-server you control or use the hosted OpenHands experience.",
+ "ja": "管理しているエージェントサーバーに接続するか、ホスト型 OpenHands を利用します。",
+ "zh-CN": "连接到您控制的 agent-server,或使用托管的 OpenHands 体验。",
+ "zh-TW": "連線至您控制的 agent-server,或使用託管的 OpenHands 體驗。",
+ "ko-KR": "직접 관리하는 agent-server에 연결하거나 호스팅된 OpenHands를 사용하세요.",
+ "no": "Koble til en agent-server du kontrollerer, eller bruk den driftede OpenHands-opplevelsen.",
+ "it": "Connettiti a un agent-server che controlli oppure usa l'esperienza OpenHands in hosting.",
+ "pt": "Conecte-se a um agent-server sob seu controle ou use a experiência hospedada do OpenHands.",
+ "es": "Conéctate a un agent-server que controles o usa la experiencia alojada de OpenHands.",
+ "ar": "اتصل بخادم agent-server تتحكم فيه أو استخدم تجربة OpenHands المستضافة.",
+ "fr": "Connectez-vous à un agent-server que vous contrôlez ou utilisez l'expérience OpenHands hébergée.",
+ "tr": "Kontrol ettiğiniz bir agent-server'a bağlanın veya barındırılan OpenHands deneyimini kullanın.",
+ "de": "Verbinden Sie sich mit einem selbst verwalteten Agent-Server oder nutzen Sie die gehostete OpenHands-Umgebung.",
+ "uk": "Підключіться до agent-server під вашим керуванням або скористайтеся хостинговим OpenHands.",
+ "ca": "Connecta't a un agent-server que controlis o utilitza l'experiència OpenHands allotjada."
+ },
+ "BACKEND$CLOUD_OPTION_DESCRIPTION": {
+ "en": "Use the hosted OpenHands experience.",
+ "ja": "ホスト型 OpenHands を利用します。",
+ "zh-CN": "使用托管的 OpenHands 体验。",
+ "zh-TW": "使用託管的 OpenHands 體驗。",
+ "ko-KR": "호스팅된 OpenHands를 사용합니다.",
+ "no": "Bruk den driftede OpenHands-opplevelsen.",
+ "it": "Usa l'esperienza OpenHands in hosting.",
+ "pt": "Use a experiência hospedada do OpenHands.",
+ "es": "Usa la experiencia alojada de OpenHands.",
+ "ar": "استخدم تجربة OpenHands المستضافة.",
+ "fr": "Utilisez l'expérience OpenHands hébergée.",
+ "tr": "Barındırılan OpenHands deneyimini kullanın.",
+ "de": "Nutzen Sie die gehostete OpenHands-Umgebung.",
+ "uk": "Скористайтеся хостинговим OpenHands.",
+ "ca": "Utilitza l'experiència OpenHands allotjada."
+ },
+ "BACKEND$AGENT_SERVER_TITLE": {
+ "en": "Agent-server",
+ "ja": "エージェントサーバー",
+ "zh-CN": "Agent 服务器",
+ "zh-TW": "Agent 伺服器",
+ "ko-KR": "에이전트 서버",
+ "no": "Agent-server",
+ "it": "Agent-server",
+ "pt": "Servidor de agente",
+ "es": "Servidor de agente",
+ "ar": "خادم الوكيل",
+ "fr": "Serveur d'agent",
+ "tr": "Ajan sunucusu",
+ "de": "Agent-Server",
+ "uk": "Сервер агента",
+ "ca": "Servidor d'agent"
+ },
+ "BACKEND$AGENT_SERVER_OPTION_DESCRIPTION": {
+ "en": "Connect to a local or remote agent-server.",
+ "ja": "ローカルまたはリモートのエージェントサーバーに接続します。",
+ "zh-CN": "连接到本地或远程 agent-server。",
+ "zh-TW": "連線至本機或遠端 agent-server。",
+ "ko-KR": "로컬 또는 원격 agent-server에 연결합니다.",
+ "no": "Koble til en lokal eller ekstern agent-server.",
+ "it": "Connettiti a un agent-server locale o remoto.",
+ "pt": "Conecte-se a um agent-server local ou remoto.",
+ "es": "Conéctate a un agent-server local o remoto.",
+ "ar": "اتصل بخادم agent-server محلي أو بعيد.",
+ "fr": "Connectez-vous à un agent-server local ou distant.",
+ "tr": "Yerel veya uzak bir agent-server'a bağlanın.",
+ "de": "Verbinden Sie sich mit einem lokalen oder entfernten Agent-Server.",
+ "uk": "Підключіться до локального або віддаленого agent-server.",
+ "ca": "Connecta't a un agent-server local o remot."
+ },
+ "BACKEND$AGENT_SERVER_DESCRIPTION": {
+ "en": "Connect to an agent-server running locally or on another machine.",
+ "ja": "ローカルまたは別のマシンで実行中のエージェントサーバーに接続します。",
+ "zh-CN": "连接到本地或另一台计算机上运行的 agent-server。",
+ "zh-TW": "連線至本機或另一台電腦上執行的 agent-server。",
+ "ko-KR": "로컬 또는 다른 컴퓨터에서 실행 중인 agent-server에 연결합니다.",
+ "no": "Koble til en agent-server som kjører lokalt eller på en annen maskin.",
+ "it": "Connettiti a un agent-server in esecuzione localmente o su un'altra macchina.",
+ "pt": "Conecte-se a um agent-server em execução localmente ou em outra máquina.",
+ "es": "Conéctate a un agent-server que se ejecute localmente o en otra máquina.",
+ "ar": "اتصل بخادم agent-server يعمل محليًا أو على جهاز آخر.",
+ "fr": "Connectez-vous à un agent-server exécuté localement ou sur une autre machine.",
+ "tr": "Yerelde veya başka bir makinede çalışan bir agent-server'a bağlanın.",
+ "de": "Verbinden Sie sich mit einem Agent-Server, der lokal oder auf einem anderen Rechner läuft.",
+ "uk": "Підключіться до agent-server, що працює локально або на іншому комп'ютері.",
+ "ca": "Connecta't a un agent-server que s'executi localment o en una altra màquina."
+ },
+ "BACKEND$AGENT_SERVER_LOCATION": {
+ "en": "Agent-server location",
+ "ja": "エージェントサーバーの場所",
+ "zh-CN": "Agent 服务器位置",
+ "zh-TW": "Agent 伺服器位置",
+ "ko-KR": "에이전트 서버 위치",
+ "no": "Plassering av agent-server",
+ "it": "Posizione dell'agent-server",
+ "pt": "Localização do servidor de agente",
+ "es": "Ubicación del servidor de agente",
+ "ar": "موقع خادم الوكيل",
+ "fr": "Emplacement du serveur d'agent",
+ "tr": "Ajan sunucusu konumu",
+ "de": "Standort des Agent-Servers",
+ "uk": "Розташування сервера агента",
+ "ca": "Ubicació del servidor d'agent"
+ },
+ "BACKEND$BEFORE_CONNECT_TITLE": {
+ "en": "Before you connect",
+ "ja": "接続する前に",
+ "zh-CN": "连接之前",
+ "zh-TW": "連線之前",
+ "ko-KR": "연결하기 전에",
+ "no": "Før du kobler til",
+ "it": "Prima di connetterti",
+ "pt": "Antes de conectar",
+ "es": "Antes de conectarte",
+ "ar": "قبل الاتصال",
+ "fr": "Avant de vous connecter",
+ "tr": "Bağlanmadan önce",
+ "de": "Vor dem Verbinden",
+ "uk": "Перед підключенням",
+ "ca": "Abans de connectar-te"
+ },
+ "BACKEND$LOCAL_SETUP_DESCRIPTION": {
+ "en": "Run the backend-only instance on a different port from this frontend, then enter that host below. For example, start it with",
+ "ja": "バックエンド専用インスタンスをこのフロントエンドとは別のポートで実行し、そのホストを下に入力します。たとえば、次のコマンドで起動します。",
+ "zh-CN": "在与此前端不同的端口上运行仅后端实例,然后在下方输入该主机。例如,使用以下命令启动:",
+ "zh-TW": "在與此前端不同的連接埠上執行僅後端執行個體,然後在下方輸入該主機。例如,使用以下命令啟動:",
+ "ko-KR": "이 프런트엔드와 다른 포트에서 백엔드 전용 인스턴스를 실행한 다음 아래에 해당 호스트를 입력하세요. 예를 들어 다음 명령으로 시작합니다.",
+ "no": "Kjør instansen med bare backend på en annen port enn denne frontend-en, og skriv deretter inn verten nedenfor. Start den for eksempel med",
+ "it": "Esegui l'istanza solo backend su una porta diversa da questo frontend, quindi inserisci l'host qui sotto. Ad esempio, avviala con",
+ "pt": "Execute a instância somente de backend em uma porta diferente deste frontend e insira o host abaixo. Por exemplo, inicie-a com",
+ "es": "Ejecuta la instancia solo de backend en un puerto distinto al de este frontend e introduce el host abajo. Por ejemplo, iníciala con",
+ "ar": "شغّل نسخة الواجهة الخلفية فقط على منفذ مختلف عن هذه الواجهة، ثم أدخل المضيف أدناه. على سبيل المثال، ابدأ تشغيلها باستخدام",
+ "fr": "Exécutez l'instance backend seule sur un port différent de celui de cette interface, puis saisissez cet hôte ci-dessous. Par exemple, démarrez-la avec",
+ "tr": "Yalnızca backend örneğini bu ön yüzden farklı bir bağlantı noktasında çalıştırın ve ardından aşağıya bu ana bilgisayarı girin. Örneğin şu komutla başlatın:",
+ "de": "Führen Sie die reine Backend-Instanz auf einem anderen Port als dieses Frontend aus und geben Sie den Host unten ein. Starten Sie sie zum Beispiel mit",
+ "uk": "Запустіть лише бекенд на порту, відмінному від порту цього фронтенду, а потім введіть хост нижче. Наприклад, запустіть його командою",
+ "ca": "Executa la instància només de backend en un port diferent del d'aquest frontend i introdueix l'amfitrió a continuació. Per exemple, inicia-la amb"
+ },
+ "BACKEND$LOCAL_SETUP_DOCS": {
+ "en": "Read the local backend setup guide",
+ "ja": "ローカルバックエンドのセットアップガイドを読む",
+ "zh-CN": "阅读本地后端设置指南",
+ "zh-TW": "閱讀本機後端設定指南",
+ "ko-KR": "로컬 백엔드 설정 가이드 읽기",
+ "no": "Les oppsettsveiledningen for lokal backend",
+ "it": "Leggi la guida alla configurazione del backend locale",
+ "pt": "Leia o guia de configuração do backend local",
+ "es": "Lee la guía de configuración del backend local",
+ "ar": "اقرأ دليل إعداد الواجهة الخلفية المحلية",
+ "fr": "Lire le guide de configuration du backend local",
+ "tr": "Yerel backend kurulum kılavuzunu okuyun",
+ "de": "Einrichtungsanleitung für das lokale Backend lesen",
+ "uk": "Прочитати посібник із налаштування локального бекенду",
+ "ca": "Llegeix la guia de configuració del backend local"
+ },
+ "BACKEND$REMOTE_SETUP_TITLE": {
+ "en": "Recommended setup",
+ "ja": "推奨設定",
+ "zh-CN": "推荐设置",
+ "zh-TW": "建議設定",
+ "ko-KR": "권장 설정",
+ "no": "Anbefalt oppsett",
+ "it": "Configurazione consigliata",
+ "pt": "Configuração recomendada",
+ "es": "Configuración recomendada",
+ "ar": "الإعداد الموصى به",
+ "fr": "Configuration recommandée",
+ "tr": "Önerilen kurulum",
+ "de": "Empfohlene Einrichtung",
+ "uk": "Рекомендоване налаштування",
+ "ca": "Configuració recomanada"
+ },
+ "BACKEND$REMOTE_SETUP_DESCRIPTION": {
+ "en": "Run the remote backend with --public, set a strong LOCAL_BACKEND_API_KEY, and expose it through an SSH tunnel, ngrok, or a TLS reverse proxy.",
+ "ja": "リモートバックエンドを --public で実行し、強力な LOCAL_BACKEND_API_KEY を設定して、SSH トンネル、ngrok、または TLS リバースプロキシ経由で公開します。",
+ "zh-CN": "使用 --public 运行远程后端,设置一个强 LOCAL_BACKEND_API_KEY,并通过 SSH 隧道、ngrok 或 TLS 反向代理将其公开。",
+ "zh-TW": "使用 --public 執行遠端後端,設定強式 LOCAL_BACKEND_API_KEY,並透過 SSH 通道、ngrok 或 TLS 反向代理公開。",
+ "ko-KR": "--public으로 원격 백엔드를 실행하고 강력한 LOCAL_BACKEND_API_KEY를 설정한 다음 SSH 터널, ngrok 또는 TLS 리버스 프록시를 통해 노출하세요.",
+ "no": "Kjør den eksterne backenden med --public, angi en sterk LOCAL_BACKEND_API_KEY, og eksponer den gjennom en SSH-tunnel, ngrok eller en TLS-reversproxy.",
+ "it": "Esegui il backend remoto con --public, imposta una LOCAL_BACKEND_API_KEY robusta ed esponilo tramite un tunnel SSH, ngrok o un reverse proxy TLS.",
+ "pt": "Execute o backend remoto com --public, defina uma LOCAL_BACKEND_API_KEY forte e exponha-o por um túnel SSH, ngrok ou proxy reverso TLS.",
+ "es": "Ejecuta el backend remoto con --public, configura una LOCAL_BACKEND_API_KEY segura y exponlo mediante un túnel SSH, ngrok o un proxy inverso TLS.",
+ "ar": "شغّل الواجهة الخلفية البعيدة باستخدام --public، واضبط LOCAL_BACKEND_API_KEY قوية، ثم اعرضها عبر نفق SSH أو ngrok أو وكيل TLS عكسي.",
+ "fr": "Exécutez le backend distant avec --public, définissez une LOCAL_BACKEND_API_KEY robuste et exposez-le via un tunnel SSH, ngrok ou un proxy inverse TLS.",
+ "tr": "Uzak backend'i --public ile çalıştırın, güçlü bir LOCAL_BACKEND_API_KEY ayarlayın ve bir SSH tüneli, ngrok veya TLS ters proxy üzerinden erişime açın.",
+ "de": "Starten Sie das entfernte Backend mit --public, legen Sie einen sicheren LOCAL_BACKEND_API_KEY fest und stellen Sie es über einen SSH-Tunnel, ngrok oder einen TLS-Reverse-Proxy bereit.",
+ "uk": "Запустіть віддалений бекенд із --public, задайте надійний LOCAL_BACKEND_API_KEY і надайте доступ через SSH-тунель, ngrok або зворотний TLS-проксі.",
+ "ca": "Executa el backend remot amb --public, defineix una LOCAL_BACKEND_API_KEY segura i exposa'l mitjançant un túnel SSH, ngrok o un servidor intermediari invers TLS."
+ },
+ "BACKEND$REMOTE_CONNECTION_TITLE": {
+ "en": "Connection details",
+ "ja": "接続の詳細",
+ "zh-CN": "连接详情",
+ "zh-TW": "連線詳細資料",
+ "ko-KR": "연결 세부 정보",
+ "no": "Tilkoblingsdetaljer",
+ "it": "Dettagli della connessione",
+ "pt": "Detalhes da conexão",
+ "es": "Detalles de conexión",
+ "ar": "تفاصيل الاتصال",
+ "fr": "Détails de connexion",
+ "tr": "Bağlantı ayrıntıları",
+ "de": "Verbindungsdetails",
+ "uk": "Відомості про підключення",
+ "ca": "Detalls de la connexió"
+ },
+ "BACKEND$REMOTE_CONNECTION_DESCRIPTION": {
+ "en": "Use http://localhost:8000 for an SSH tunnel, your ngrok domain for an ngrok setup, or your HTTPS reverse proxy URL.",
+ "ja": "SSH トンネルには http://localhost:8000、ngrok 設定には ngrok ドメイン、または HTTPS リバースプロキシ URL を使用します。",
+ "zh-CN": "对于 SSH 隧道,请使用 http://localhost:8000;对于 ngrok 设置,请使用您的 ngrok 域名;或者使用 HTTPS 反向代理 URL。",
+ "zh-TW": "SSH 通道請使用 http://localhost:8000;ngrok 設定請使用您的 ngrok 網域;或使用 HTTPS 反向代理 URL。",
+ "ko-KR": "SSH 터널에는 http://localhost:8000을, ngrok 설정에는 ngrok 도메인을 사용하거나 HTTPS 리버스 프록시 URL을 사용하세요.",
+ "no": "Bruk http://localhost:8000 for en SSH-tunnel, ngrok-domenet ditt for et ngrok-oppsett, eller URL-en til HTTPS-reversproxyen.",
+ "it": "Usa http://localhost:8000 per un tunnel SSH, il tuo dominio ngrok per una configurazione ngrok oppure l'URL del reverse proxy HTTPS.",
+ "pt": "Use http://localhost:8000 para um túnel SSH, seu domínio ngrok para uma configuração ngrok ou a URL do proxy reverso HTTPS.",
+ "es": "Usa http://localhost:8000 para un túnel SSH, tu dominio ngrok para una configuración de ngrok o la URL de tu proxy inverso HTTPS.",
+ "ar": "استخدم http://localhost:8000 لنفق SSH، أو نطاق ngrok لإعداد ngrok، أو عنوان URL لوكيل HTTPS العكسي.",
+ "fr": "Utilisez http://localhost:8000 pour un tunnel SSH, votre domaine ngrok pour une configuration ngrok ou l'URL de votre proxy inverse HTTPS.",
+ "tr": "SSH tüneli için http://localhost:8000, ngrok kurulumu için ngrok alan adınızı veya HTTPS ters proxy URL'nizi kullanın.",
+ "de": "Verwenden Sie http://localhost:8000 für einen SSH-Tunnel, Ihre ngrok-Domain für eine ngrok-Einrichtung oder die URL Ihres HTTPS-Reverse-Proxys.",
+ "uk": "Використовуйте http://localhost:8000 для SSH-тунелю, свій домен ngrok для налаштування ngrok або URL-адресу зворотного HTTPS-проксі.",
+ "ca": "Utilitza http://localhost:8000 per a un túnel SSH, el teu domini ngrok per a una configuració ngrok o l'URL del servidor intermediari invers HTTPS."
+ },
+ "BACKEND$REMOTE_SETUP_DOCS": {
+ "en": "Read the remote backend setup guide",
+ "ja": "リモートバックエンドのセットアップガイドを読む",
+ "zh-CN": "阅读远程后端设置指南",
+ "zh-TW": "閱讀遠端後端設定指南",
+ "ko-KR": "원격 백엔드 설정 가이드 읽기",
+ "no": "Les oppsettsveiledningen for ekstern backend",
+ "it": "Leggi la guida alla configurazione del backend remoto",
+ "pt": "Leia o guia de configuração do backend remoto",
+ "es": "Lee la guía de configuración del backend remoto",
+ "ar": "اقرأ دليل إعداد الواجهة الخلفية البعيدة",
+ "fr": "Lire le guide de configuration du backend distant",
+ "tr": "Uzak backend kurulum kılavuzunu okuyun",
+ "de": "Einrichtungsanleitung für das entfernte Backend lesen",
+ "uk": "Прочитати посібник із налаштування віддаленого бекенду",
+ "ca": "Llegeix la guia de configuració del backend remot"
+ },
+ "BACKEND$DEPLOYMENT_OPTIONS": {
+ "en": "Compare Cloud, self-hosted, and Enterprise deployment options",
+ "ja": "Cloud、セルフホスト、Enterprise のデプロイオプションを比較",
+ "zh-CN": "比较云端、自托管和企业版部署选项",
+ "zh-TW": "比較雲端、自託管和企業版部署選項",
+ "ko-KR": "Cloud, 자체 호스팅 및 Enterprise 배포 옵션 비교",
+ "no": "Sammenlign Cloud, selvdriftede og Enterprise-distribusjonsalternativer",
+ "it": "Confronta le opzioni di distribuzione Cloud, self-hosted ed Enterprise",
+ "pt": "Compare as opções de implantação Cloud, auto-hospedada e Enterprise",
+ "es": "Compara las opciones de despliegue Cloud, autoalojado y Enterprise",
+ "ar": "قارن خيارات النشر السحابي والمستضاف ذاتيًا وEnterprise",
+ "fr": "Comparer les options de déploiement Cloud, auto-hébergé et Enterprise",
+ "tr": "Cloud, kendi kendine barındırılan ve Enterprise dağıtım seçeneklerini karşılaştırın",
+ "de": "Cloud-, Self-Hosting- und Enterprise-Bereitstellungsoptionen vergleichen",
+ "uk": "Порівняти варіанти розгортання Cloud, самостійного хостингу та Enterprise",
+ "ca": "Compara les opcions de desplegament Cloud, autoallotjat i Enterprise"
+ },
"BACKEND$NAME_LABEL": {
"en": "Host Name",
"ja": "ホスト名",
@@ -29546,21 +29818,21 @@
"ca": "Canviant a {{environment}}"
},
"BACKEND$LOGIN_WITH_OPENHANDS": {
- "en": "Login with OpenHands Cloud",
- "ja": "OpenHands Cloudでログイン",
- "zh-CN": "使用 OpenHands Cloud 登录",
- "zh-TW": "使用 OpenHands Cloud 登入",
- "ko-KR": "OpenHands Cloud로 로그인",
- "no": "Logg inn med OpenHands Cloud",
- "it": "Accedi con OpenHands Cloud",
- "pt": "Entrar com OpenHands Cloud",
- "es": "Iniciar sesión con OpenHands Cloud",
- "ar": "تسجيل الدخول باستخدام OpenHands Cloud",
- "fr": "Se connecter avec OpenHands Cloud",
- "tr": "OpenHands Cloud ile giriş yap",
- "de": "Mit OpenHands Cloud anmelden",
- "uk": "Увійти через OpenHands Cloud",
- "ca": "Inicia sessió amb OpenHands Cloud"
+ "en": "Connect to OpenHands",
+ "ja": "OpenHands に接続",
+ "zh-CN": "连接到 OpenHands",
+ "zh-TW": "連線至 OpenHands",
+ "ko-KR": "OpenHands에 연결",
+ "no": "Koble til OpenHands",
+ "it": "Connetti a OpenHands",
+ "pt": "Conectar ao OpenHands",
+ "es": "Conectar con OpenHands",
+ "ar": "الاتصال بـ OpenHands",
+ "fr": "Se connecter à OpenHands",
+ "tr": "OpenHands'e bağlan",
+ "de": "Mit OpenHands verbinden",
+ "uk": "Підключитися до OpenHands",
+ "ca": "Connecta't a OpenHands"
},
"BACKEND$LOG_BACK_IN": {
"en": "Log back in",
@@ -29631,7 +29903,7 @@
"ca": "OpenHands Cloud"
},
"BACKEND$CLOUD_DESCRIPTION": {
- "en": "Connect instantly to OpenHands Cloud to try out Agent Canvas",
+ "en": "Connect instantly to OpenHands Cloud to use Agent Canvas",
"ja": "セットアップをスキップ — OpenHands Cloud アカウントですぐに接続できます。",
"zh-CN": "跳过设置 — 使用您的 OpenHands Cloud 帐户即时连接。",
"zh-TW": "跳過設定 — 使用您的 OpenHands Cloud 帳戶即時連線。",
diff --git a/tests/e2e/mock-llm/backends/mock-llm-cross-connect.spec.ts b/tests/e2e/mock-llm/backends/mock-llm-cross-connect.spec.ts
index 74bd5eb809..f151d76cdc 100644
--- a/tests/e2e/mock-llm/backends/mock-llm-cross-connect.spec.ts
+++ b/tests/e2e/mock-llm/backends/mock-llm-cross-connect.spec.ts
@@ -451,6 +451,13 @@ test.describe("cross-connect: frontend-only → multiple backends", () => {
timeout: 5_000,
});
+ // The modal defaults to the Cloud tab; switch to Agent-server to access
+ // the manual connection form.
+ await page.getByTestId("add-backend-option-agent-server").click();
+ await expect(
+ page.getByTestId("add-backend-agent-server-panel"),
+ ).toBeVisible({ timeout: 5_000 });
+
// Fill in Backend B details
const nameInput = page.getByTestId("add-backend-name");
await nameInput.click();