Skip to content

🙌 OpenHands: AI-Driven Development

feat(automations): show templates on cloud backends and offer native git integrations (#17830)

Hiep Le2414d6ee5e31
diff --git a/__tests__/components/automations/recommended-automations.test.tsx b/__tests__/components/automations/recommended-automations.test.tsx
index 218184af1e..e2e141b6a4 100644
--- a/__tests__/components/automations/recommended-automations.test.tsx
+++ b/__tests__/components/automations/recommended-automations.test.tsx
@@ -8,6 +8,8 @@ import {
within,
} from "@testing-library/react";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { http, HttpResponse } from "msw";
+import { server } from "#/mocks/node";
import SettingsService from "#/api/settings-service/settings-service.api";
import McpService from "#/api/mcp-service/mcp-service.api";
import { SecretsService } from "#/api/secrets-service";
@@ -24,6 +26,7 @@ import {
type NavigationContextValue,
} from "#/context/navigation-context";
import type { Backend } from "#/api/backend-registry/types";
+import type { Settings } from "#/types/settings";
import AutomationService from "#/api/automation-service/automation-service.api";
import { RecommendedAutomationsLauncher } from "#/components/features/automations/recommended-automations-launcher";
import {
@@ -152,6 +155,34 @@ function settingsWithGithubMcp() {
});
}
+/**
+ * Activates the cloud backend with the given native git providers enabled and
+ * serves `settings` through the real settings hook (the local cases mock the
+ * hook), so these cases exercise the services the hooks rely on instead.
+ */
+async function activateCloudBackend({
+ providersConfigured = [],
+ settings = {},
+}: {
+ providersConfigured?: string[];
+ settings?: object;
+} = {}) {
+ setRegisteredBackends([cloudBackend]);
+ setActiveSelection({ backendId: cloudBackend.id });
+ server.use(
+ http.get("*/api/v1/web-client/config", () =>
+ HttpResponse.json({ providers_configured: providersConfigured }),
+ ),
+ );
+ vi.spyOn(SettingsService, "getSettings").mockResolvedValue(
+ settings as Settings,
+ );
+ const { useSettings } = await vi.importActual<
+ typeof import("#/hooks/query/use-settings")
+ >("#/hooks/query/use-settings");
+ mockUseSettings.mockImplementation(useSettings);
+}
+
function continueGithubResponderLocally() {
fireEvent.click(
screen.getByTestId("recommended-automation-card-github-repo-monitor"),
@@ -893,15 +924,117 @@ describe("recommended automations", () => {
await waitFor(() => expect(mockNavigate).toHaveBeenCalledTimes(1));
});
- it("hides the recommended automations section on cloud backends", () => {
+ it("shows the recommended automations section on cloud backends", async () => {
setRegisteredBackends([cloudBackend]);
setActiveSelection({ backendId: cloudBackend.id });
renderLauncher({ withBackendProvider: true });
+ // The section waits for the instance's native providers to be known.
expect(
- screen.queryByTestId("recommended-automations-section"),
+ await screen.findByTestId("recommended-automations-section"),
+ ).toBeInTheDocument();
+ });
+
+ it("launches a responder on cloud backends without the deployment choice", async () => {
+ // Arrange
+ await activateCloudBackend({ settings: settingsWithGithubMcp() });
+ renderLauncher({ withBackendProvider: true });
+ await within(
+ await screen.findByTestId(
+ "recommended-automation-pills-github-repo-monitor-wrap",
+ ),
+ ).findByText("RECOMMENDED_AUTOMATIONS$CONNECTED");
+
+ // Act
+ fireEvent.click(
+ screen.getByTestId("recommended-automation-card-github-repo-monitor"),
+ );
+
+ // Assert
+ await waitFor(() =>
+ expect(mockNavigate).toHaveBeenCalledWith(
+ "/automations/new/github-repo-monitor",
+ ),
+ );
+ expect(
+ screen.queryByTestId("responder-deployment-modal"),
).not.toBeInTheDocument();
+ expect(mockCreateSecret).not.toHaveBeenCalled();
+ });
+
+ it("does not ask for the GitHub MCP when native GitHub is connected on cloud", async () => {
+ // Arrange
+ await activateCloudBackend({
+ providersConfigured: ["github"],
+ settings: { provider_tokens_set: { github: null } },
+ });
+ renderLauncher({ withBackendProvider: true });
+ await within(
+ await screen.findByTestId(
+ "recommended-automation-pills-github-repo-monitor-wrap",
+ ),
+ ).findByText("RECOMMENDED_AUTOMATIONS$CONNECTED");
+
+ // Act
+ fireEvent.click(
+ screen.getByTestId("recommended-automation-card-github-repo-monitor"),
+ );
+
+ // Assert
+ await waitFor(() =>
+ expect(mockNavigate).toHaveBeenCalledWith(
+ "/automations/new/github-repo-monitor",
+ ),
+ );
+ expect(screen.queryByTestId("mcp-install-modal")).not.toBeInTheDocument();
+ });
+
+ it("asks to connect native Bitbucket on cloud when the instance enables it", async () => {
+ // Arrange
+ await activateCloudBackend({ providersConfigured: ["bitbucket"] });
+ renderLauncher({ withBackendProvider: true });
+ await within(
+ await screen.findByTestId(
+ "recommended-automation-pills-jira-issue-to-bitbucket-pr-wrap",
+ ),
+ ).findByText("RECOMMENDED_AUTOMATIONS$MISSING_CONNECT:1");
+
+ // Act
+ fireEvent.click(
+ screen.getByTestId(
+ "recommended-automation-card-jira-issue-to-bitbucket-pr",
+ ),
+ );
+
+ // Assert
+ const modal = await screen.findByTestId("mcp-install-modal");
+ expect(modal).toHaveAttribute("data-marketplace-id", "bitbucket");
+ expect(within(modal).getByTestId("mcp-native-panel")).toBeInTheDocument();
+ expect(mockCreateConversationMutate).not.toHaveBeenCalled();
+ });
+
+ it("shows a natively connected integration as connected on its card", () => {
+ // Arrange & Act
+ render(
+ <RecommendedAutomationsSection
+ backendKind="cloud"
+ installedServers={[]}
+ getNativeIntegration={(id) =>
+ id === "github" ? { provider: "github", isConnected: true } : null
+ }
+ onSelect={vi.fn()}
+ />,
+ );
+
+ // Assert
+ const pills = screen.getByTestId(
+ "recommended-automation-pills-github-repo-monitor-wrap",
+ );
+ expect(pills).toHaveTextContent("RECOMMENDED_AUTOMATIONS$CONNECTED");
+ expect(pills).not.toHaveTextContent(
+ "RECOMMENDED_AUTOMATIONS$MISSING_CONNECT",
+ );
});
it("renders the compact rail instead of the catalog section", async () => {
diff --git a/__tests__/components/features/mcp-page/install-server-modal.test.tsx b/__tests__/components/features/mcp-page/install-server-modal.test.tsx
index 1d394d4c2c..3bb525f155 100644
--- a/__tests__/components/features/mcp-page/install-server-modal.test.tsx
+++ b/__tests__/components/features/mcp-page/install-server-modal.test.tsx
@@ -1,6 +1,8 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
+import { http, HttpResponse } from "msw";
+import { server } from "#/mocks/node";
import SettingsService from "#/api/settings-service/settings-service.api";
import McpService from "#/api/mcp-service/mcp-service.api";
import {
@@ -1151,4 +1153,230 @@ describe("InstallServerModal", () => {
).not.toBeInTheDocument();
});
});
+
+ describe("InstallServerModal — native integration on cloud", () => {
+ const github = MCP_MARKETPLACE.find((e) => e.id === "github")!;
+
+ /**
+ * Activates a cloud backend whose instance enables `providersConfigured`
+ * natively, with `connected` as the user's connected providers.
+ */
+ function activateCloudBackend({
+ providersConfigured,
+ connected = {},
+ }: {
+ providersConfigured: string[];
+ connected?: Record<string, string | null>;
+ }) {
+ const instance = { configServed: false };
+ setRegisteredBackends([
+ {
+ id: "cloud-1",
+ name: "Cloud",
+ host: "https://app.all-hands.dev",
+ apiKey: "k",
+ kind: "cloud",
+ },
+ ]);
+ setActiveSelection({ backendId: "cloud-1" });
+ server.use(
+ http.get("*/api/v1/web-client/config", () => {
+ instance.configServed = true;
+ return HttpResponse.json({
+ providers_configured: providersConfigured,
+ });
+ }),
+ );
+ const getSettings = vi
+ .spyOn(SettingsService, "getSettings")
+ .mockResolvedValue({
+ ...MOCK_DEFAULT_USER_SETTINGS,
+ provider_tokens_set: connected,
+ });
+ return { instance, getSettings };
+ }
+
+ it("recommends the native integration by default next to the MCP server", async () => {
+ // Arrange
+ activateCloudBackend({ providersConfigured: ["github"] });
+
+ // Act
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ />,
+ );
+
+ // Assert
+ expect(await screen.findByTestId("mcp-native-panel")).toBeInTheDocument();
+ expect(screen.getByTestId("mcp-install-tab-mcp")).toBeInTheDocument();
+ expect(screen.queryByTestId("mcp-install-field-api_key")).toBeNull();
+ });
+
+ it("waits for the instance's providers instead of showing the MCP form first", async () => {
+ // Arrange
+ activateCloudBackend({ providersConfigured: ["github"] });
+
+ // Act
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ />,
+ );
+
+ // Assert — nothing to type into until it is known which option leads,
+ // so the form is not swapped out from under the user.
+ expect(screen.getByTestId("mcp-install-resolving")).toBeInTheDocument();
+ expect(screen.queryByTestId("mcp-install-field-api_key")).toBeNull();
+ expect(await screen.findByTestId("mcp-native-panel")).toBeInTheDocument();
+ expect(screen.queryByTestId("mcp-install-resolving")).toBeNull();
+ });
+
+ it("opens the instance's integrations page to connect natively", async () => {
+ // Arrange
+ activateCloudBackend({ providersConfigured: ["github"] });
+ const openSpy = vi.spyOn(window, "open").mockReturnValue(null);
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ />,
+ );
+
+ // Act
+ fireEvent.click(await screen.findByTestId("mcp-native-install"));
+
+ // Assert
+ expect(openSpy).toHaveBeenCalledWith(
+ "https://app.all-hands.dev/settings/integrations",
+ "_blank",
+ "noopener,noreferrer",
+ );
+ });
+
+ it("shows the MCP form under the MCP tab", async () => {
+ // Arrange
+ activateCloudBackend({ providersConfigured: ["github"] });
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ />,
+ );
+
+ // Act
+ fireEvent.click(await screen.findByTestId("mcp-install-tab-mcp"));
+
+ // Assert
+ expect(
+ screen.getByTestId("mcp-install-field-api_key"),
+ ).toBeInTheDocument();
+ expect(screen.queryByTestId("mcp-native-panel")).toBeNull();
+ });
+
+ it("keeps the MCP server's documentation with the MCP option", async () => {
+ // Arrange
+ activateCloudBackend({ providersConfigured: ["github"] });
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ />,
+ );
+ await screen.findByTestId("mcp-native-panel");
+
+ // Assert — it describes the MCP server, so the native option omits it.
+ expect(screen.queryByText("MCP$VIEW_DOCS")).toBeNull();
+
+ // Act
+ fireEvent.click(screen.getByTestId("mcp-install-tab-mcp"));
+
+ // Assert
+ expect(screen.getByText("MCP$VIEW_DOCS")).toBeInTheDocument();
+ });
+
+ it("says the native integration is not connected yet when continuing too early", async () => {
+ // Arrange
+ activateCloudBackend({ providersConfigured: ["github"] });
+ vi.spyOn(window, "open").mockReturnValue(null);
+ const onSuccess = vi.fn();
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ onSuccess={onSuccess}
+ />,
+ );
+ fireEvent.click(await screen.findByTestId("mcp-native-install"));
+
+ // Act
+ fireEvent.click(screen.getByTestId("mcp-native-continue"));
+
+ // Assert
+ expect(await screen.findByTestId("mcp-native-error")).toHaveTextContent(
+ "MCP$NATIVE_NOT_CONNECTED_YET",
+ );
+ expect(onSuccess).not.toHaveBeenCalled();
+ });
+
+ it("continues once the native integration is connected", async () => {
+ // Arrange
+ const { getSettings } = activateCloudBackend({
+ providersConfigured: ["github"],
+ });
+ vi.spyOn(window, "open").mockReturnValue(null);
+ const onSuccess = vi.fn();
+ const onClose = vi.fn();
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={onClose}
+ onSuccess={onSuccess}
+ />,
+ );
+ fireEvent.click(await screen.findByTestId("mcp-native-install"));
+ getSettings.mockResolvedValue({
+ ...MOCK_DEFAULT_USER_SETTINGS,
+ provider_tokens_set: { github: null },
+ });
+
+ // Act
+ fireEvent.click(screen.getByTestId("mcp-native-continue"));
+
+ // Assert
+ await waitFor(() => expect(onSuccess).toHaveBeenCalledWith(github));
+ expect(onClose).toHaveBeenCalled();
+ });
+
+ it("offers only the MCP server when the instance has not enabled the native integration", async () => {
+ // Arrange
+ const { instance } = activateCloudBackend({ providersConfigured: [] });
+
+ // Act
+ renderWith(
+ <InstallServerModal
+ existingServers={[]}
+ entry={github}
+ onClose={vi.fn()}
+ />,
+ );
+
+ // Assert
+ await waitFor(() => expect(instance.configServed).toBe(true));
+ expect(
+ screen.getByTestId("mcp-install-field-api_key"),
+ ).toBeInTheDocument();
+ expect(screen.queryByTestId("mcp-install-tab-native")).toBeNull();
+ expect(screen.queryByTestId("mcp-native-panel")).toBeNull();
+ });
+ });
});
diff --git a/__tests__/components/manifest/manifest-form-field.test.tsx b/__tests__/components/manifest/manifest-form-field.test.tsx
index 01bb5061b1..49314aff6d 100644
--- a/__tests__/components/manifest/manifest-form-field.test.tsx
+++ b/__tests__/components/manifest/manifest-form-field.test.tsx
@@ -11,6 +11,8 @@ import {
import { SetupFormField } from "#/components/features/manifest/manifest-form-field";
import { ActiveBackendProvider } from "#/contexts/active-backend-context";
import type { Backend } from "#/api/backend-registry/types";
+import SettingsService from "#/api/settings-service/settings-service.api";
+import { MOCK_DEFAULT_USER_SETTINGS } from "#/mocks/handlers";
import type {
SetupFormField as SetupFormFieldDefinition,
SetupFormValue,
@@ -104,8 +106,17 @@ const REPOSITORIES_FIELD: SetupFormFieldDefinition = {
multiple: true,
};
+/** The git providers the user has connected natively on the active backend. */
+function connectNatively(...providers: string[]) {
+ vi.spyOn(SettingsService, "getSettings").mockResolvedValue({
+ ...MOCK_DEFAULT_USER_SETTINGS,
+ provider_tokens_set: Object.fromEntries(providers.map((p) => [p, null])),
+ });
+}
+
beforeEach(() => {
__resetActiveStoreForTests();
+ connectNatively();
});
afterEach(() => {
@@ -267,13 +278,36 @@ describe("SetupFormField repo-picker", () => {
]);
});
- it("browses the account's repositories on a cloud backend", () => {
- // Arrange / Act
+ it("browses the account's repositories on a cloud backend with the provider connected", async () => {
+ // Arrange
+ connectNatively("github");
+
+ // Act
renderRepositoryField(CLOUD_BACKEND);
// Assert — the picker stays the way a repository is chosen wherever it can
// actually answer, so there is nothing to type into.
- expect(screen.getByTestId("git-repo-dropdown")).toBeInTheDocument();
+ expect(await screen.findByTestId("git-repo-dropdown")).toBeInTheDocument();
expect(screen.queryByTestId("setup-field-repository")).toBeNull();
});
+
+ it("lets a repository be typed on a cloud backend when its provider is not connected natively", async () => {
+ // Arrange — GitLab reached through an MCP server: the instance has no
+ // native GitLab token to list repositories with, only a GitHub one.
+ connectNatively("github");
+ const { onValueChange, user } = renderRepositoryField(CLOUD_BACKEND, {
+ field: { ...REPOSITORY_FIELD, provider: "gitlab" },
+ });
+
+ // Act
+ await user.type(
+ screen.getByTestId("setup-field-repository"),
+ "group/project",
+ );
+
+ // Assert — the required field stays answerable instead of offering a list
+ // that cannot load.
+ expect(screen.queryByTestId("git-repo-dropdown")).toBeNull();
+ expect(onValueChange).toHaveBeenLastCalledWith("group/project");
+ });
});
diff --git a/__tests__/components/onboarding/onboarding-modal.test.tsx b/__tests__/components/onboarding/onboarding-modal.test.tsx
index 19424b2b06..6ced238f38 100644
--- a/__tests__/components/onboarding/onboarding-modal.test.tsx
+++ b/__tests__/components/onboarding/onboarding-modal.test.tsx
@@ -860,15 +860,17 @@ describe("OnboardingModal", () => {
expect(settings.contains(next)).toBe(false);
});
- it("hides the Say Hello OR separator when recommended automations are unavailable on Cloud", () => {
+ it("shows the Say Hello OR separator and recommended automations on Cloud", () => {
seedCloudBackend();
renderModal();
- expect(screen.queryByTestId("onboarding-hello-or-separator")).toBeNull();
expect(
- screen.queryByTestId("onboarding-recommended-automations"),
- ).toBeNull();
+ screen.getByTestId("onboarding-hello-or-separator"),
+ ).toBeInTheDocument();
+ expect(
+ screen.getByTestId("onboarding-recommended-automations"),
+ ).toBeInTheDocument();
});
it("shows the setup slide with Gemini's credential fields", async () => {
diff --git a/__tests__/hooks/query/use-manifest-prerequisites.test.tsx b/__tests__/hooks/query/use-manifest-prerequisites.test.tsx
index ef7f296d45..1b3650da63 100644
--- a/__tests__/hooks/query/use-manifest-prerequisites.test.tsx
+++ b/__tests__/hooks/query/use-manifest-prerequisites.test.tsx
@@ -2,8 +2,17 @@ import React from "react";
import { describe, expect, it, vi, beforeEach } from "vitest";
import { renderHook, waitFor } from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { http, HttpResponse } from "msw";
import { useSetupPrerequisites } from "#/hooks/query/use-manifest-prerequisites";
import SettingsService from "#/api/settings-service/settings-service.api";
+import {
+ __resetActiveStoreForTests,
+ setActiveSelection,
+ setRegisteredBackends,
+} from "#/api/backend-registry/active-store";
+import type { Backend } from "#/api/backend-registry/types";
+import { ActiveBackendProvider } from "#/contexts/active-backend-context";
+import { server } from "#/mocks/node";
import { createSetupEntry } from "../../manifests/manifest-test-data";
import type { SetupEntry } from "#/manifests/types";
@@ -11,12 +20,21 @@ vi.mock("#/api/settings-service/settings-service.api", () => ({
default: { getSettings: vi.fn() },
}));
-vi.mock("#/contexts/active-backend-context", () => ({
- useActiveBackend: () => ({
- backend: { id: "test-backend", kind: "local" },
- orgId: null,
- }),
-}));
+const localBackend: Backend = {
+ id: "test-backend",
+ name: "Local",
+ host: "http://localhost:8000",
+ apiKey: "",
+ kind: "local",
+};
+
+const cloudBackend: Backend = {
+ id: "cloud-backend",
+ name: "Cloud",
+ host: "https://app.all-hands.dev",
+ apiKey: "cloud-key",
+ kind: "cloud",
+};
/** The endpoint the packaged GitHub integration is installed against. */
const GITHUB_MCP_URL = "https://api.githubcopilot.com/mcp/";
@@ -26,7 +44,9 @@ function createWrapper() {
defaultOptions: { queries: { retry: false } },
});
return ({ children }: { children: React.ReactNode }) => (
- <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
+ <QueryClientProvider client={queryClient}>
+ <ActiveBackendProvider>{children}</ActiveBackendProvider>
+ </QueryClientProvider>
);
}
@@ -45,6 +65,10 @@ function renderPrerequisites(entry: SetupEntry) {
describe("useSetupPrerequisites", () => {
beforeEach(() => {
vi.clearAllMocks();
+ window.localStorage.clear();
+ __resetActiveStoreForTests();
+ setRegisteredBackends([localBackend]);
+ setActiveSelection({ backendId: localBackend.id });
// Nothing connected, unless a test says otherwise.
vi.mocked(SettingsService.getSettings).mockResolvedValue({} as never);
});
@@ -101,4 +125,27 @@ describe("useSetupPrerequisites", () => {
blocking: result.current.blockingIntegrations,
}).toEqual({ isBlocked: false, blocking: [] });
});
+
+ it("has nothing to block on when the integration is connected natively on cloud", async () => {
+ // Arrange
+ setRegisteredBackends([cloudBackend]);
+ setActiveSelection({ backendId: cloudBackend.id });
+ server.use(
+ http.get("*/api/v1/web-client/config", () =>
+ HttpResponse.json({ providers_configured: ["github"] }),
+ ),
+ );
+ vi.mocked(SettingsService.getSettings).mockResolvedValue({
+ provider_tokens_set: { github: null },
+ } as never);
+ const entry = withIntegrations({
+ github: { message: "Reads pull requests." },
+ });
+
+ // Act
+ const { result } = renderPrerequisites(entry);
+
+ // Assert
+ await waitFor(() => expect(result.current.isBlocked).toBe(false));
+ });
});
diff --git a/__tests__/routes/automations-dashboard.test.tsx b/__tests__/routes/automations-dashboard.test.tsx
index d192b72803..4152414154 100644
--- a/__tests__/routes/automations-dashboard.test.tsx
+++ b/__tests__/routes/automations-dashboard.test.tsx
@@ -57,6 +57,14 @@ const localBackend: Backend = {
kind: "local",
};
+const cloudBackend: Backend = {
+ id: "cloud-1",
+ name: "Cloud 1",
+ host: "https://app.all-hands.dev",
+ apiKey: "cloud-key",
+ kind: "cloud",
+};
+
function createAutomation(overrides: Partial<Automation>): Automation {
return {
id: "a-ok",
@@ -369,4 +377,17 @@ describe("AutomationTemplates — manifest-declared templates page", () => {
launcher: await screen.findByTestId("recommended-automations-section"),
}).toBeTruthy();
});
+
+ it("shows the templates navigation item on cloud backends", async () => {
+ // Arrange
+ setRegisteredBackends([cloudBackend]);
+ setActiveSelection({ backendId: cloudBackend.id });
+
+ // Act
+ renderAt("/automations/templates", <AutomationTemplates />);
+
+ // Assert
+ const nav = await screen.findByTestId("automations-navbar-desktop");
+ expect(within(nav).getByText("Widget templates")).toBeInTheDocument();
+ });
});
diff --git a/scripts/check-translation-completeness.cjs b/scripts/check-translation-completeness.cjs
index 52cbc4a2b0..d13df111e6 100755
--- a/scripts/check-translation-completeness.cjs
+++ b/scripts/check-translation-completeness.cjs
@@ -35,6 +35,7 @@ const IDENTICAL_VALUE_ALLOWLIST = new Set([
'GITHUB$AUTH_SCOPE',
'LAUNCH$PLUGIN_PATH',
'LAUNCH$PLUGIN_REF',
+ 'MCP$MCP_TAB',
'SCHEMA$LLM$SECTION_LABEL',
'SCHEMA$LLM$TOP_K$LABEL',
'SCHEMA$LLM$TOP_P$LABEL',
diff --git a/src/api/cloud/settings-service.api.ts b/src/api/cloud/settings-service.api.ts
index d2ba31cc8a..127dd56feb 100644
--- a/src/api/cloud/settings-service.api.ts
+++ b/src/api/cloud/settings-service.api.ts
@@ -228,3 +228,17 @@ export async function fetchCloudConversationSettingsSchema(): Promise<unknown> {
path: "/api/v1/settings/conversation-schema",
});
}
+
+/**
+ * The git providers whose native (OAuth) integration this cloud instance has
+ * enabled — what its Settings > Integrations page offers to connect.
+ */
+export async function fetchCloudProvidersConfigured(): Promise<Provider[]> {
+ const backend = getActiveCloudBackend();
+ const config = await callCloudProxy<{ providers_configured?: Provider[] }>({
+ backend,
+ method: "GET",
+ path: "/api/v1/web-client/config",
+ });
+ return config.providers_configured ?? [];
+}
diff --git a/src/components/features/automations/dashboard/use-automation-sub-page-nav.ts b/src/components/features/automations/dashboard/use-automation-sub-page-nav.ts
index 7b5cda2e54..0e4a31ec2a 100644
--- a/src/components/features/automations/dashboard/use-automation-sub-page-nav.ts
+++ b/src/components/features/automations/dashboard/use-automation-sub-page-nav.ts
@@ -1,6 +1,5 @@
import { MANIFEST_ICON_BY_SLUG } from "#/components/features/manifest/manifest-icons";
import type { SubPageNavItem } from "#/components/features/manifest/manifest-subpage-layout";
-import { useActiveBackend } from "#/contexts/active-backend-context";
import {
getInterfaceCopy,
getSubPagesSpec,
@@ -13,30 +12,24 @@ export interface AutomationSubPageNav {
/**
* The manifest's sub-page navigation resolved for rendering, or null when the
- * manifest declares none. The templates item is hidden on cloud backends: the
- * catalog launcher it hosts is a local-backend feature and renders nothing
- * there.
+ * manifest declares none.
*/
export function useAutomationSubPageNav(): AutomationSubPageNav | null {
- const active = useActiveBackend();
const spec = getSubPagesSpec();
if (!spec) return null;
- const isCloudBackend = active.backend.kind === "cloud";
return {
heading: getInterfaceCopy().sidebarLabel,
- items: spec
- .filter((item) => !(item.page === "templates" && isCloudBackend))
- .map((item) => ({
- to: item.to,
- label: item.label,
- // Templates is a catalog, so the host always shows the library icon
- // even while the published manifest still names sparkles.
- Icon:
- item.page === "templates"
- ? MANIFEST_ICON_BY_SLUG.library
- : MANIFEST_ICON_BY_SLUG[item.icon],
- testId: `automations-navigation-${item.page}`,
- })),
+ items: spec.map((item) => ({
+ to: item.to,
+ label: item.label,
+ // Templates is a catalog, so the host always shows the library icon
+ // even while the published manifest still names sparkles.
+ Icon:
+ item.page === "templates"
+ ? MANIFEST_ICON_BY_SLUG.library
+ : MANIFEST_ICON_BY_SLUG[item.icon],
+ testId: `automations-navigation-${item.page}`,
+ })),
};
}
diff --git a/src/components/features/automations/recommended-automations-launcher.tsx b/src/components/features/automations/recommended-automations-launcher.tsx
index c5e75dc1cc..e345dff868 100644
--- a/src/components/features/automations/recommended-automations-launcher.tsx
+++ b/src/components/features/automations/recommended-automations-launcher.tsx
@@ -35,6 +35,7 @@ import {
} from "#/utils/automation-catalog";
import { isResponderAutomation } from "#/utils/responder-deployment";
import { useAutomations } from "#/hooks/query/use-automations";
+import { useNativeGitIntegrations } from "#/hooks/query/use-native-git-integrations";
import { RecommendedAutomationsRail } from "./recommended-automations-rail";
import { RecommendedAutomationsSection } from "./recommended-automations-section";
import { ResponderDeploymentModal } from "./responder-deployment-modal";
@@ -53,20 +54,14 @@ interface RecommendedAutomationsLauncherProps {
}
/**
- * The marketplace entries a launch waits on. An integration the automation is
- * willing to start without is deliberately absent, so it never queues an
+ * The marketplace entries a launch may wait on. An integration the automation
+ * is willing to start without is deliberately absent, so it never queues an
* install modal the user has to dismiss.
- *
- * A required integration this backend cannot install as MCP (e.g. Jira's
- * HTTP-only option) is also excluded here — the install queue can't do
- * anything with it — but it is not silently dropped from the product: the
- * automation card keeps it visible and labels it as needing external setup.
*/
function getRequiredEntries(automation: RecommendedAutomation) {
return getRequiredIntegrationIds(automation)
.map((id) => getMarketplaceEntryById(id, MCP_MARKETPLACE))
- .filter((entry): entry is MarketplaceEntry => !!entry)
- .filter(isMcpInstallableEntry);
+ .filter((entry): entry is MarketplaceEntry => !!entry);
}
export function RecommendedAutomationsLauncher({
@@ -98,9 +93,9 @@ export function RecommendedAutomationsLauncher({
useState(false);
const isRail = variant === "rail";
const { data: automationsData, isLoading: isAutomationsLoading } =
- useAutomations({
- enabled: isRail && activeBackend.backend.kind === "local",
- });
+ useAutomations({ enabled: isRail });
+ const { getNativeIntegration, isLoading: isNativeIntegrationsLoading } =
+ useNativeGitIntegrations();
const installedMcpConfig = useMemo(
() =>
@@ -172,12 +167,20 @@ export function RecommendedAutomationsLauncher({
],
);
+ // A required integration is satisfied by an installed MCP server or a
+ // connected native integration. One this backend can connect neither way
+ // (e.g. Jira's HTTP-only option) is excluded — the install queue can't do
+ // anything with it — but the automation card keeps it visible and labels it
+ // as needing external setup.
const getMissingEntries = useCallback(
(automation: RecommendedAutomation) =>
- getRequiredEntries(automation).filter(
- (entry) => !findInstalledEntryMatch(entry, installedMcpConfig),
- ),
- [installedMcpConfig],
+ getRequiredEntries(automation).filter((entry) => {
+ if (findInstalledEntryMatch(entry, installedMcpConfig)) return false;
+ const native = getNativeIntegration(entry.id);
+ if (native) return !native.isConnected;
+ return isMcpInstallableEntry(entry);
+ }),
+ [getNativeIntegration, installedMcpConfig],
);
const proceedWithLocalLaunch = (automation: RecommendedAutomation) => {
@@ -203,8 +206,12 @@ export function RecommendedAutomationsLauncher({
}
// GitHub/Slack responders poll continuously; let the user choose where the
- // responder runs before committing to the local setup flow.
- if (isResponderAutomation(automation)) {
+ // responder runs before committing to the local setup flow. On a cloud
+ // backend the responder already runs in the cloud, so there is no choice.
+ if (
+ activeBackend.backend.kind === "local" &&
+ isResponderAutomation(automation)
+ ) {
setDeploymentChoiceAutomation(automation);
return;
}
@@ -273,12 +280,13 @@ export function RecommendedAutomationsLauncher({
// interface-manifest gate; New Chat mounts it outside the gated routes.
if (!hasAutomationInterface()) return null;
- // Recommended automations are a local-backend-only feature; cloud
- // automations are managed elsewhere.
- if (activeBackend.backend.kind === "cloud") return null;
-
if (isRail && isAutomationsLoading) return null;
+ // Which integrations a card still needs depends on what the cloud instance
+ // connects natively; a card shown before that is known could be launched
+ // with the wrong install queue.
+ if (isNativeIntegrationsLoading) return null;
+
return (
<>
{isRail ? (
@@ -291,6 +299,7 @@ export function RecommendedAutomationsLauncher({
<RecommendedAutomationsSection
backendKind={activeBackend.backend.kind}
installedServers={installedMcpConfig}
+ getNativeIntegration={getNativeIntegration}
query={query}
onSelect={handleSelectAutomation}
scrollableGrid={scrollableGrid}
diff --git a/src/components/features/automations/recommended-automations-section.tsx b/src/components/features/automations/recommended-automations-section.tsx
index 5f291d77b9..5f0cb8a553 100644
--- a/src/components/features/automations/recommended-automations-section.tsx
+++ b/src/components/features/automations/recommended-automations-section.tsx
@@ -18,6 +18,7 @@ import {
} from "#/components/features/skills/skill-card-pill-row";
import { CirclePlusBadge } from "#/components/shared/buttons/circle-plus-check-toggle";
import { MCPServerConfig } from "#/types/mcp-server";
+import type { NativeGitIntegration } from "#/hooks/query/use-native-git-integrations";
import {
findInstalledEntryMatch,
getMarketplaceEntryById,
@@ -40,9 +41,13 @@ import {
} from "#/utils/extension-module-card-classes";
import { StatusBadge } from "./status-badge";
+type GetNativeIntegration = (entryId: string) => NativeGitIntegration | null;
+
interface RecommendedAutomationsSectionProps {
backendKind: "local" | "cloud";
installedServers: MCPServerConfig[];
+ /** Resolves an integration's native (cloud) connection; none by default. */
+ getNativeIntegration?: GetNativeIntegration;
query?: string;
onSelect: (automation: RecommendedAutomation) => void;
/** When true, title, description, and cards share one scroll area. */
@@ -114,13 +119,16 @@ function automationMatchesQuery(
function buildRecommendedAutomationPills(
integrations: AutomationIntegration[],
installedServers: MCPServerConfig[],
+ getNativeIntegration: GetNativeIntegration,
missingCount: number,
translate: TFunction,
): SkillCardPill[] {
const pills: SkillCardPill[] = integrations.map(
({ id, entry, mcpInstallable }) => {
+ const native = getNativeIntegration(id);
const installed =
- !!entry && findInstalledEntryMatch(entry, installedServers);
+ !!native?.isConnected ||
+ (!!entry && findInstalledEntryMatch(entry, installedServers));
const name = entry?.name ?? id;
return {
@@ -140,7 +148,7 @@ function buildRecommendedAutomationPills(
>
{translate(I18nKey.RECOMMENDED_AUTOMATIONS$UNKNOWN_SETUP)}
</span>
- ) : !mcpInstallable ? (
+ ) : !mcpInstallable && !native ? (
<span
className="text-tertiary-alt"
data-testid={`automation-integration-external-${id}`}
@@ -211,6 +219,7 @@ function AutomationCardIcon({
interface AutomationCardGridProps {
automations: RecommendedAutomation[];
installedServers: MCPServerConfig[];
+ getNativeIntegration: GetNativeIntegration;
onSelect: (automation: RecommendedAutomation) => void;
translate: TFunction;
}
@@ -218,6 +227,7 @@ interface AutomationCardGridProps {
function AutomationCardGrid({
automations,
installedServers,
+ getNativeIntegration,
onSelect,
translate,
}: AutomationCardGridProps) {
@@ -226,13 +236,16 @@ function AutomationCardGrid({
{automations.map((automation) => {
const integrations = getIntegrationEntries(automation);
// "N MCPs to connect" only counts entries the install flow can
- // actually connect; an external-setup integration is surfaced on its
- // own pill instead.
+ // actually connect (as MCP or natively); an external-setup
+ // integration is surfaced on its own pill instead.
const missingCount = integrations.filter(
- ({ entry, mcpInstallable }) =>
- !!entry &&
- mcpInstallable &&
- !findInstalledEntryMatch(entry, installedServers),
+ ({ id, entry, mcpInstallable }) => {
+ if (!entry || findInstalledEntryMatch(entry, installedServers)) {
+ return false;
+ }
+ const native = getNativeIntegration(id);
+ return native ? !native.isConnected : mcpInstallable;
+ },
).length;
return (
@@ -276,6 +289,7 @@ function AutomationCardGrid({
pills={buildRecommendedAutomationPills(
integrations,
installedServers,
+ getNativeIntegration,
missingCount,
translate,
)}
@@ -293,6 +307,7 @@ function AutomationCardGrid({
export function RecommendedAutomationsSection({
backendKind: _backendKind,
installedServers,
+ getNativeIntegration = () => null,
query = "",
onSelect,
scrollableGrid = false,
@@ -349,6 +364,7 @@ export function RecommendedAutomationsSection({
<AutomationCardGrid
automations={provenAutomations}
installedServers={installedServers}
+ getNativeIntegration={getNativeIntegration}
onSelect={onSelect}
translate={t}
/>
@@ -373,6 +389,7 @@ export function RecommendedAutomationsSection({
<AutomationCardGrid
automations={betaAutomations}
installedServers={installedServers}
+ getNativeIntegration={getNativeIntegration}
onSelect={onSelect}
translate={t}
/>
diff --git a/src/components/features/manifest/manifest-form-field.tsx b/src/components/features/manifest/manifest-form-field.tsx
index 97169ece3b..76f22c1c58 100644
--- a/src/components/features/manifest/manifest-form-field.tsx
+++ b/src/components/features/manifest/manifest-form-field.tsx
@@ -3,6 +3,7 @@ import { SettingsInput } from "#/components/features/settings/settings-input";
import { SettingsDropdownInput } from "#/components/features/settings/settings-dropdown-input";
import { GitRepoDropdown } from "#/components/features/home/git-repo-dropdown";
import { useActiveBackend } from "#/contexts/active-backend-context";
+import { useUserProviders } from "#/hooks/use-user-providers";
import { I18nKey } from "#/i18n/declaration";
import {
formControlMultilineFieldClassName,
@@ -61,14 +62,18 @@ export function SetupFormField({
}: SetupFormFieldProps) {
const { t } = useTranslation("openhands");
const { backend } = useActiveBackend();
+ const { providers: connectedProviders } = useUserProviders();
const testId = `setup-field-${name}`;
const help = <p className="text-xs text-muted">{field.help}</p>;
// Listing a user's repositories is a cloud-backend capability: `GitService`
// answers with an empty page on any other backend, so the picker would offer
- // a source that can never respond. Recommended automations are themselves
- // local-only, which makes that the common case rather than the edge one.
- const canListRepositories = backend.kind === "cloud";
+ // a source that can never respond. On a cloud backend it lists through the
+ // instance's native integration for the field's provider, which a user who
+ // connected that provider through an MCP server instead does not have.
+ const canListRepositories =
+ backend.kind === "cloud" &&
+ connectedProviders.includes(field.provider ?? "github");
// The format hint is host copy: a manifest states the format of everything it
// declares except a repository, whose shape the host derives.
diff --git a/src/components/features/mcp-page/install-server-modal.tsx b/src/components/features/mcp-page/install-server-modal.tsx
index c2f2a957d9..6f9b596ee0 100644
--- a/src/components/features/mcp-page/install-server-modal.tsx
+++ b/src/components/features/mcp-page/install-server-modal.tsx
@@ -6,6 +6,9 @@ import { ModalCloseButton } from "#/components/shared/modals/modal-close-button"
import { BrandButton } from "#/components/features/settings/brand-button";
import { SettingsInput } from "#/components/features/settings/settings-input";
import { SaveAsSecretToggle } from "#/components/features/mcp-page/save-as-secret-toggle";
+import { NativeIntegrationPanel } from "#/components/features/mcp-page/native-integration-panel";
+import { TabButton } from "#/components/features/conversation-panel/system-message-modal/tab-button";
+import { BrandBadge } from "#/components/shared/badge";
import { I18nKey } from "#/i18n/declaration";
import type {
IntegrationCatalogEntry as MarketplaceEntry,
@@ -17,6 +20,10 @@ import type { MCPAuthCredential } from "#/types/mcp-auth";
import { seedMcpServerHealth } from "#/api/mcp-health/probe-mcp-server-health";
import { useActiveBackend } from "#/contexts/active-backend-context";
import { useAddMcpServer } from "#/hooks/mutation/use-add-mcp-server";
+import {
+ isNativeGitCandidate,
+ useNativeGitIntegrations,
+} from "#/hooks/query/use-native-git-integrations";
import { useTestMcpServer } from "#/hooks/mutation/use-test-mcp-server";
import { displaySuccessToast } from "#/utils/custom-toast-handlers";
import {
@@ -176,6 +183,24 @@ export function InstallServerModal({
// run inside the sandbox); never seed card health from it.
const isSyntheticTest = isCloudBackend && template?.kind === "stdio";
+ // A git entry the cloud instance can also connect natively offers that as
+ // the recommended option next to the MCP server; an entry with no MCP
+ // option (Bitbucket) offers only the native one.
+ const { getNativeIntegration, isLoading: isNativeIntegrationsLoading } =
+ useNativeGitIntegrations();
+ const native = getNativeIntegration(entry.id);
+ // Until the instance's providers are known, a git entry cannot say whether
+ // it leads with the native option; showing the MCP form meanwhile would swap
+ // it out from under the user once the answer arrives.
+ const isResolvingNative =
+ isNativeIntegrationsLoading && isNativeGitCandidate(entry.id);
+ const [selectedConnection, setSelectedConnection] = React.useState<
+ "native" | "mcp"
+ >("native");
+ const showConnectionTabs = !!native && !!option;
+ const isNativeSelected =
+ !!native && (!option || selectedConnection === "native");
+
const isPending =
isTesting || isAuthorizingOAuth || isAdding || isFinalizingInstall;
@@ -681,55 +706,119 @@ export function InstallServerModal({
</div>
</div>
- {entry.installHint && (
- <p className="text-xs text-tertiary-light">{entry.installHint}</p>
+ {isResolvingNative && (
+ <p
+ data-testid="mcp-install-resolving"
+ className="text-xs text-tertiary-light"
+ >
+ {t(I18nKey.HOME$LOADING)}
+ </p>
)}
- {entry.docsUrl && (
- <a
- href={entry.docsUrl}
- target="_blank"
- rel="noreferrer"
- className="text-xs text-muted hover:text-contrast hover:underline self-start transition-colors"
- >
- {t(I18nKey.MCP$VIEW_DOCS)}
- </a>
+ {showConnectionTabs && (
+ <div role="tablist" className="flex border-b border-border">
+ <TabButton
+ isActive={selectedConnection === "native"}
+ onClick={() => setSelectedConnection("native")}
+ disabled={isPending}
+ className="flex items-center gap-2"
+ >
+ <span data-testid="mcp-install-tab-native">
+ {t(I18nKey.MCP$NATIVE_TAB, { name: entry.name })}
+ </span>
+ <BrandBadge className="shrink-0 whitespace-nowrap px-2.5 py-1 text-xs">
+ {t(I18nKey.SETTINGS$SKILLS_RECOMMENDED)}
+ </BrandBadge>
+ </TabButton>
+ <TabButton
+ isActive={selectedConnection === "mcp"}
+ onClick={() => setSelectedConnection("mcp")}
+ >
+ <span data-testid="mcp-install-tab-mcp">
+ {t(I18nKey.MCP$MCP_TAB, { name: entry.name })}
+ </span>
+ </TabButton>
+ </div>
)}
- <div className="flex flex-col gap-3">{renderFields()}</div>
+ {!isResolvingNative &&
+ (isNativeSelected && native ? (
+ <NativeIntegrationPanel
+ entry={entry}
+ native={native}
+ onConnected={() => {
+ onSuccess?.(entry);
+ onClose();
+ }}
+ />
+ ) : (
+ <>
+ {showConnectionTabs && (
+ <div className="flex flex-col gap-1">
+ <h3 className="text-sm font-semibold text-contrast">
+ {t(I18nKey.MCP$MCP_TAB, { name: entry.name })}
+ </h3>
+ <p className="text-xs text-tertiary-light">
+ {t(I18nKey.MCP$MCP_DESCRIPTION, { name: entry.name })}
+ </p>
+ </div>
+ )}
- {globalError && (
- <p
- data-testid="mcp-install-modal-error"
- className="text-sm text-red-500 whitespace-pre-wrap"
- >
- {globalError}
- </p>
- )}
+ {/* The entry's hint and documentation describe its MCP server, so
+ they belong to the MCP option rather than above both. */}
+ {entry.installHint && (
+ <p className="text-xs text-tertiary-light">
+ {entry.installHint}
+ </p>
+ )}
- <div className="flex justify-end gap-2 mt-2">
- <BrandButton
- type="button"
- variant="secondary"
- onClick={onClose}
- testId="mcp-install-cancel"
- isDisabled={isPending}
- >
- {t(I18nKey.BUTTON$CANCEL)}
- </BrandButton>
- <BrandButton
- type="submit"
- variant="primary"
- isDisabled={isPending}
- testId="mcp-install-submit"
- >
- {isTesting || isAuthorizingOAuth
- ? t(I18nKey.MCP$VERIFYING)
- : isAdding || isFinalizingInstall
- ? t(I18nKey.SETTINGS$SAVING)
- : t(I18nKey.MCP$INSTALL_BUTTON)}
- </BrandButton>
- </div>
+ {entry.docsUrl && (
+ <a
+ href={entry.docsUrl}
+ target="_blank"
+ rel="noreferrer"
+ className="text-xs text-muted hover:text-contrast hover:underline self-start transition-colors"
+ >
+ {t(I18nKey.MCP$VIEW_DOCS)}
+ </a>
+ )}
+
+ <div className="flex flex-col gap-3">{renderFields()}</div>
+
+ {globalError && (
+ <p
+ data-testid="mcp-install-modal-error"
+ className="text-sm text-red-500 whitespace-pre-wrap"
+ >
+ {globalError}
+ </p>
+ )}
+
+ <div className="flex justify-end gap-2 mt-2">
+ <BrandButton
+ type="button"
+ variant="secondary"
+ onClick={onClose}
+ testId="mcp-install-cancel"
+ isDisabled={isPending}
+ >
+ {t(I18nKey.BUTTON$CANCEL)}
+ </BrandButton>
+ <BrandButton
+ type="submit"
+ variant="primary"
+ isDisabled={isPending}
+ testId="mcp-install-submit"
+ >
+ {isTesting || isAuthorizingOAuth
+ ? t(I18nKey.MCP$VERIFYING)
+ : isAdding || isFinalizingInstall
+ ? t(I18nKey.SETTINGS$SAVING)
+ : t(I18nKey.MCP$INSTALL_BUTTON)}
+ </BrandButton>
+ </div>
+ </>
+ ))}
</form>
</ModalBackdrop>
);
diff --git a/src/components/features/mcp-page/native-integration-panel.tsx b/src/components/features/mcp-page/native-integration-panel.tsx
new file mode 100644
index 0000000000..16858ba4df
--- /dev/null
+++ b/src/components/features/mcp-page/native-integration-panel.tsx
@@ -0,0 +1,141 @@
+import React from "react";
+import { useTranslation } from "react-i18next";
+import { CircleCheck } from "lucide-react";
+import type { IntegrationCatalogEntry as MarketplaceEntry } from "@openhands/extensions/integrations";
+import { BrandButton } from "#/components/features/settings/brand-button";
+import { BrandBadge } from "#/components/shared/badge";
+import { useActiveBackend } from "#/contexts/active-backend-context";
+import { useSettings } from "#/hooks/query/use-settings";
+import type { NativeGitIntegration } from "#/hooks/query/use-native-git-integrations";
+import { I18nKey } from "#/i18n/declaration";
+import { cloudIntegrationsUrl } from "#/utils/cloud-integrations-url";
+import { convertRawProvidersToList } from "#/utils/convert-raw-providers-to-list";
+
+interface NativeIntegrationPanelProps {
+ entry: MarketplaceEntry;
+ native: NativeGitIntegration;
+ /** Fired once the native integration is connected and the user continues. */
+ onConnected: () => void;
+}
+
+/**
+ * The "Native" option for a git integration on a cloud backend. Connecting
+ * happens on the instance's Settings > Integrations page (an OAuth flow the
+ * canvas cannot host), so Install opens it in a new tab and Continue re-reads
+ * the user's connected providers.
+ */
+export function NativeIntegrationPanel({
+ entry,
+ native,
+ onConnected,
+}: NativeIntegrationPanelProps) {
+ const { t } = useTranslation("openhands");
+ const { backend, orgId } = useActiveBackend();
+ const { refetch: refetchSettings } = useSettings();
+ const [hasOpenedIntegrations, setHasOpenedIntegrations] =
+ React.useState(false);
+ const [isChecking, setIsChecking] = React.useState(false);
+ const [error, setError] = React.useState<string | null>(null);
+
+ const features = [t(I18nKey.MCP$NATIVE_FEATURE_REPOS, { name: entry.name })];
+ if (native.provider === "github") {
+ features.push(t(I18nKey.MCP$NATIVE_FEATURE_MENTIONS_GITHUB));
+ } else if (native.provider === "gitlab") {
+ features.push(t(I18nKey.MCP$NATIVE_FEATURE_MENTIONS_GITLAB));
+ }
+
+ const openIntegrations = () => {
+ window.open(
+ cloudIntegrationsUrl(backend, orgId),
+ "_blank",
+ "noopener,noreferrer",
+ );
+ setHasOpenedIntegrations(true);
+ };
+
+ const confirmConnection = async () => {
+ setError(null);
+ setIsChecking(true);
+ const { data } = await refetchSettings();
+ setIsChecking(false);
+ if (
+ convertRawProvidersToList(data?.provider_tokens_set).includes(
+ native.provider,
+ )
+ ) {
+ onConnected();
+ return;
+ }
+ setError(t(I18nKey.MCP$NATIVE_NOT_CONNECTED_YET, { name: entry.name }));
+ };
+
+ return (
+ <div
+ data-testid="mcp-native-panel"
+ className="flex flex-col gap-4 rounded-xl border border-border p-4"
+ >
+ <div className="flex flex-col gap-1">
+ <div className="flex items-center gap-2">
+ <h3 className="text-sm font-semibold text-contrast">
+ {t(I18nKey.MCP$NATIVE_TAB, { name: entry.name })}
+ </h3>
+ <BrandBadge className="shrink-0 whitespace-nowrap px-2.5 py-1 text-xs">
+ {t(I18nKey.SETTINGS$SKILLS_RECOMMENDED)}
+ </BrandBadge>
+ </div>
+ <p className="text-xs text-tertiary-light">
+ {t(I18nKey.MCP$NATIVE_DESCRIPTION, { name: entry.name })}
+ </p>
+ </div>
+
+ <ul className="flex flex-col gap-2">
+ {features.map((feature) => (
+ <li
+ key={feature}
+ className="flex items-center gap-2 text-sm text-contrast"
+ >
+ <CircleCheck className="size-4 shrink-0 text-success" aria-hidden />
+ {feature}
+ </li>
+ ))}
+ </ul>
+
+ <div className="flex items-center justify-between gap-3 border-t border-border pt-4">
+ <p className="text-xs text-tertiary-light">
+ {native.isConnected
+ ? t(I18nKey.MCP$NATIVE_CONNECTED, { name: entry.name })
+ : t(I18nKey.MCP$NATIVE_CONNECT_HINT, { name: entry.name })}
+ </p>
+ <div className="flex shrink-0 gap-2">
+ {!native.isConnected && (
+ <BrandButton
+ type="button"
+ variant={hasOpenedIntegrations ? "secondary" : "primary"}
+ onClick={openIntegrations}
+ testId="mcp-native-install"
+ >
+ {t(I18nKey.MCP$INSTALL_BUTTON)}
+ </BrandButton>
+ )}
+ {(native.isConnected || hasOpenedIntegrations) && (
+ <BrandButton
+ type="button"
+ variant="primary"
+ onClick={native.isConnected ? onConnected : confirmConnection}
+ isDisabled={isChecking}
+ testId="mcp-native-continue"
+ >
+ {t(I18nKey.BUTTON$CONTINUE)}
+ </BrandButton>
+ )}
+ </div>
+ </div>
+
+ {error && (
+ <p data-testid="mcp-native-error" className="text-sm text-red-500">
+ {error}
+ </p>
+ )}
+ </div>
+ );
+}
diff --git a/src/components/features/onboarding/steps/say-hello-step.tsx b/src/components/features/onboarding/steps/say-hello-step.tsx
index 308adcadaa..d66fe62688 100644
--- a/src/components/features/onboarding/steps/say-hello-step.tsx
+++ b/src/components/features/onboarding/steps/say-hello-step.tsx
@@ -4,7 +4,6 @@ import { ChatSendButton } from "#/components/features/chat/chat-send-button";
import { RecommendedAutomationsLauncher } from "#/components/features/automations/recommended-automations-launcher";
import { BrandButton } from "#/components/features/settings/brand-button";
import { useNavigation } from "#/context/navigation-context";
-import { useActiveBackend } from "#/contexts/active-backend-context";
import { useCreateConversation } from "#/hooks/mutation/use-create-conversation";
import { useIsCreatingConversation } from "#/hooks/use-is-creating-conversation";
import { I18nKey } from "#/i18n/declaration";
@@ -30,8 +29,6 @@ export function SayHelloStep({
}: SayHelloStepProps) {
const { t } = useTranslation("openhands");
const { navigate } = useNavigation();
- const { backend } = useActiveBackend();
- const showRecommendedAutomations = backend.kind !== "cloud";
const defaultMessage = t(I18nKey.ONBOARDING$HELLO_DEFAULT_MESSAGE);
const [message, setMessage] = React.useState(defaultMessage);
@@ -155,30 +152,26 @@ export function SayHelloStep({
</div>
) : null}
- {showRecommendedAutomations ? (
- <>
- <div
- data-testid="onboarding-hello-or-separator"
- className="mt-6 flex w-full items-center gap-3"
- >
- <div className="h-px flex-1 bg-border" />
- <span className="text-xs uppercase text-muted">
- {t(I18nKey.LANDING$OR)}
- </span>
- <div className="h-px flex-1 bg-border" />
- </div>
+ <div
+ data-testid="onboarding-hello-or-separator"
+ className="mt-6 flex w-full items-center gap-3"
+ >
+ <div className="h-px flex-1 bg-border" />
+ <span className="text-xs uppercase text-muted">
+ {t(I18nKey.LANDING$OR)}
+ </span>
+ <div className="h-px flex-1 bg-border" />
+ </div>
- <div
- data-testid="onboarding-recommended-automations"
- className="flex min-h-0 flex-1 flex-col"
- >
- <RecommendedAutomationsLauncher
- onLaunched={onLaunched}
- scrollableGrid
- />
- </div>
- </>
- ) : null}
+ <div
+ data-testid="onboarding-recommended-automations"
+ className="flex min-h-0 flex-1 flex-col"
+ >
+ <RecommendedAutomationsLauncher
+ onLaunched={onLaunched}
+ scrollableGrid
+ />
+ </div>
<div className="flex shrink-0 items-center justify-between gap-2 bg-base-secondary pt-7 pb-7">
<BrandButton
diff --git a/src/components/features/settings/integrations-settings-link.tsx b/src/components/features/settings/integrations-settings-link.tsx
index 33c8b38356..2e6a0a1337 100644
--- a/src/components/features/settings/integrations-settings-link.tsx
+++ b/src/components/features/settings/integrations-settings-link.tsx
@@ -3,6 +3,7 @@ import { ExternalLink, Puzzle } from "lucide-react";
import { I18nKey } from "#/i18n/declaration";
import { useActiveBackendContext } from "#/contexts/active-backend-context";
import { isNoBackend } from "#/api/backend-registry/active-store";
+import { cloudIntegrationsUrl } from "#/utils/cloud-integrations-url";
import { cn } from "#/utils/utils";
import {
SIDEBAR_ICON_SLOT_CLASS,
@@ -23,10 +24,7 @@ export function IntegrationsSettingsLink() {
if (isNoBackend(backend) || backend.kind !== "cloud") return null;
- // `org` is consumed by the cloud settings loader so the page opens on the
- // org that is active here instead of the cloud's last-used org.
- const orgQuery = orgId ? `?org=${encodeURIComponent(orgId)}` : "";
- const integrationsUrl = `${backend.host.replace(/\/+$/, "")}/settings/integrations${orgQuery}`;
+ const integrationsUrl = cloudIntegrationsUrl(backend, orgId);
return (
<a
diff --git a/src/hooks/query/use-manifest-prerequisites.ts b/src/hooks/query/use-manifest-prerequisites.ts
index adbe5df1d4..0262dcc3e9 100644
--- a/src/hooks/query/use-manifest-prerequisites.ts
+++ b/src/hooks/query/use-manifest-prerequisites.ts
@@ -15,6 +15,7 @@ import type {
SetupIntegrationRequirement,
} from "#/manifests/types";
import { useSettings } from "./use-settings";
+import { useNativeGitIntegrations } from "./use-native-git-integrations";
export interface MissingSetupIntegration {
id: string;
@@ -44,6 +45,8 @@ export function useSetupPrerequisites(
): SetupPrerequisitesResult {
const integrations = entry.requires.integrations;
const { data: settings, isLoading } = useSettings();
+ const { getNativeIntegration, isLoading: isNativeIntegrationsLoading } =
+ useNativeGitIntegrations();
const installedServers = useMemo(
() =>
@@ -60,11 +63,12 @@ export function useSetupPrerequisites(
entry: getMarketplaceEntryById(id, catalog) ?? null,
}))
.filter(
- ({ entry: catalogEntry }) =>
- !catalogEntry ||
- !findInstalledEntryMatch(catalogEntry, installedServers),
+ ({ id, entry: catalogEntry }) =>
+ !getNativeIntegration(id)?.isConnected &&
+ (!catalogEntry ||
+ !findInstalledEntryMatch(catalogEntry, installedServers)),
);
- }, [integrations, installedServers]);
+ }, [getNativeIntegration, integrations, installedServers]);
const blockingIntegrations = missingIntegrations.filter(
({ requirement }) => requirement.required !== false,
@@ -77,6 +81,6 @@ export function useSetupPrerequisites(
blockingIntegrations,
warningIntegrations,
isBlocked: blockingIntegrations.length > 0,
- isLoading,
+ isLoading: isLoading || isNativeIntegrationsLoading,
};
}
diff --git a/src/hooks/query/use-native-git-integrations.ts b/src/hooks/query/use-native-git-integrations.ts
new file mode 100644
index 0000000000..737f2d2ddb
--- /dev/null
+++ b/src/hooks/query/use-native-git-integrations.ts
@@ -0,0 +1,63 @@
+import { useCallback } from "react";
+import { useQuery } from "@tanstack/react-query";
+import { fetchCloudProvidersConfigured } from "#/api/cloud/settings-service.api";
+import { useActiveBackend } from "#/contexts/active-backend-context";
+import { useUserProviders } from "#/hooks/use-user-providers";
+import type { Provider } from "#/types/settings";
+
+/** Integration catalog entries a cloud instance can also connect natively. */
+const NATIVE_PROVIDER_BY_ENTRY_ID: Record<string, Provider> = {
+ github: "github",
+ gitlab: "gitlab",
+ bitbucket: "bitbucket",
+};
+
+export interface NativeGitIntegration {
+ provider: Provider;
+ isConnected: boolean;
+}
+
+/** Whether a catalog entry is one a cloud instance may connect natively. */
+export function isNativeGitCandidate(entryId: string): boolean {
+ return Object.hasOwn(NATIVE_PROVIDER_BY_ENTRY_ID, entryId);
+}
+
+/**
+ * Resolves whether an integration catalog entry can use the active cloud
+ * instance's native git integration (Settings > Integrations) instead of an
+ * MCP server. `getNativeIntegration` returns null — meaning MCP is the only
+ * option — on local backends, for non-git entries, and for providers the
+ * instance has not enabled. While `isLoading`, the instance's providers are
+ * not known yet and null means nothing: wait rather than decide on it.
+ */
+export function useNativeGitIntegrations() {
+ const { backend } = useActiveBackend();
+ const isCloud = backend.kind === "cloud";
+ const { providers: connectedProviders } = useUserProviders();
+
+ const { data: configuredProviders, isLoading } = useQuery({
+ queryKey: [
+ "cloud-providers-configured",
+ backend.id,
+ backend.connectionRevision ?? 0,
+ ],
+ queryFn: fetchCloudProvidersConfigured,
+ enabled: isCloud,
+ staleTime: 1000 * 60 * 5,
+ retry: false,
+ meta: { disableToast: true },
+ });
+
+ const getNativeIntegration = useCallback(
+ (entryId: string): NativeGitIntegration | null => {
+ const provider = NATIVE_PROVIDER_BY_ENTRY_ID[entryId];
+ if (!isCloud || !provider || !configuredProviders?.includes(provider)) {
+ return null;
+ }
+ return { provider, isConnected: connectedProviders.includes(provider) };
+ },
+ [isCloud, configuredProviders, connectedProviders],
+ );
+
+ return { getNativeIntegration, isLoading };
+}
diff --git a/src/i18n/translation.json b/src/i18n/translation.json
index 82e53c08b7..763713a205 100644
--- a/src/i18n/translation.json
+++ b/src/i18n/translation.json
@@ -16591,6 +16591,176 @@
"uk": "Переглянути документацію →",
"ca": "Veure la documentació →"
},
+ "MCP$NATIVE_TAB": {
+ "en": "{{name}} Native",
+ "ja": "{{name}} ネイティブ",
+ "zh-CN": "{{name}} 原生集成",
+ "zh-TW": "{{name}} 原生整合",
+ "ko-KR": "{{name}} 네이티브",
+ "no": "{{name}} innebygd",
+ "it": "{{name}} nativo",
+ "pt": "{{name}} nativo",
+ "es": "{{name}} nativo",
+ "ar": "{{name}} الأصلي",
+ "fr": "{{name}} natif",
+ "tr": "{{name}} yerel",
+ "de": "{{name}} nativ",
+ "uk": "{{name}} нативна",
+ "ca": "{{name}} natiu"
+ },
+ "MCP$MCP_TAB": {
+ "en": "{{name}} MCP",
+ "ja": "{{name}} MCP",
+ "zh-CN": "{{name}} MCP",
+ "zh-TW": "{{name}} MCP",
+ "ko-KR": "{{name}} MCP",
+ "no": "{{name}} MCP",
+ "it": "{{name}} MCP",
+ "pt": "{{name}} MCP",
+ "es": "{{name}} MCP",
+ "ar": "{{name}} MCP",
+ "fr": "{{name}} MCP",
+ "tr": "{{name}} MCP",
+ "de": "{{name}} MCP",
+ "uk": "{{name}} MCP",
+ "ca": "{{name}} MCP"
+ },
+ "MCP$NATIVE_DESCRIPTION": {
+ "en": "The recommended way to connect. Provides a more seamless, native {{name}} experience with full access to your repositories, issues, and pull requests.",
+ "ja": "推奨される接続方法です。リポジトリ、Issue、プルリクエストにフルアクセスできる、よりシームレスなネイティブ {{name}} 体験を提供します。",
+ "zh-CN": "推荐的连接方式。提供更无缝的原生 {{name}} 体验,可完全访问您的仓库、议题和拉取请求。",
+ "zh-TW": "建議的連線方式。提供更流暢的原生 {{name}} 體驗,可完整存取您的儲存庫、議題和拉取請求。",
+ "ko-KR": "권장되는 연결 방법입니다. 저장소, 이슈, 풀 리퀘스트에 대한 전체 액세스 권한으로 더욱 원활한 네이티브 {{name}} 환경을 제공합니다.",
+ "no": "Den anbefalte måten å koble til på. Gir en mer sømløs, innebygd {{name}}-opplevelse med full tilgang til repositoriene, sakene og pull-forespørslene dine.",
+ "it": "Il modo consigliato per connettersi. Offre un'esperienza {{name}} nativa più fluida, con accesso completo a repository, issue e pull request.",
+ "pt": "A forma recomendada de conectar. Oferece uma experiência nativa do {{name}} mais integrada, com acesso total aos seus repositórios, issues e pull requests.",
+ "es": "La forma recomendada de conectarse. Ofrece una experiencia nativa de {{name}} más fluida, con acceso completo a tus repositorios, issues y pull requests.",
+ "ar": "الطريقة الموصى بها للاتصال. توفر تجربة {{name}} أصلية أكثر سلاسة مع وصول كامل إلى مستودعاتك ومشكلاتك وطلبات السحب.",
+ "fr": "La méthode de connexion recommandée. Offre une expérience {{name}} native plus fluide, avec un accès complet à vos dépôts, tickets et pull requests.",
+ "tr": "Önerilen bağlantı yöntemi. Depolarınıza, sorunlarınıza ve çekme isteklerinize tam erişimle daha sorunsuz, yerel bir {{name}} deneyimi sunar.",
+ "de": "Die empfohlene Verbindungsart. Bietet ein nahtloseres, natives {{name}}-Erlebnis mit vollem Zugriff auf Ihre Repositorys, Issues und Pull Requests.",
+ "uk": "Рекомендований спосіб підключення. Забезпечує зручнішу нативну роботу з {{name}} і повний доступ до ваших репозиторіїв, задач і запитів на злиття.",
+ "ca": "La manera recomanada de connectar-se. Ofereix una experiència nativa de {{name}} més fluida, amb accés complet als vostres repositoris, incidències i pull requests."
+ },
+ "MCP$MCP_DESCRIPTION": {
+ "en": "Connect via the {{name}} MCP server using your own credentials.",
+ "ja": "ご自身の認証情報を使用して {{name}} MCP サーバー経由で接続します。",
+ "zh-CN": "使用您自己的凭据通过 {{name}} MCP 服务器连接。",
+ "zh-TW": "使用您自己的憑證透過 {{name}} MCP 伺服器連線。",
+ "ko-KR": "자신의 자격 증명을 사용하여 {{name}} MCP 서버를 통해 연결합니다.",
+ "no": "Koble til via {{name}} MCP-serveren med din egen påloggingsinformasjon.",
+ "it": "Connettiti tramite il server MCP di {{name}} usando le tue credenziali.",
+ "pt": "Conecte-se pelo servidor MCP do {{name}} usando suas próprias credenciais.",
+ "es": "Conéctate a través del servidor MCP de {{name}} con tus propias credenciales.",
+ "ar": "اتصل عبر خادم MCP الخاص بـ {{name}} باستخدام بيانات الاعتماد الخاصة بك.",
+ "fr": "Connectez-vous via le serveur MCP {{name}} avec vos propres identifiants.",
+ "tr": "Kendi kimlik bilgilerinizi kullanarak {{name}} MCP sunucusu üzerinden bağlanın.",
+ "de": "Verbinden Sie sich über den {{name}}-MCP-Server mit Ihren eigenen Zugangsdaten.",
+ "uk": "Підключіться через MCP-сервер {{name}}, використовуючи власні облікові дані.",
+ "ca": "Connecteu-vos a través del servidor MCP de {{name}} amb les vostres credencials."
+ },
+ "MCP$NATIVE_FEATURE_REPOS": {
+ "en": "Fetch {{name}} repos in conversations",
+ "ja": "会話で {{name}} リポジトリを取得",
+ "zh-CN": "在对话中获取 {{name}} 仓库",
+ "zh-TW": "在對話中取得 {{name}} 儲存庫",
+ "ko-KR": "대화에서 {{name}} 저장소 가져오기",
+ "no": "Hent {{name}}-repositorier i samtaler",
+ "it": "Recupera i repository {{name}} nelle conversazioni",
+ "pt": "Buscar repositórios do {{name}} nas conversas",
+ "es": "Obtén repositorios de {{name}} en las conversaciones",
+ "ar": "جلب مستودعات {{name}} في المحادثات",
+ "fr": "Récupérer les dépôts {{name}} dans les conversations",
+ "tr": "Sohbetlerde {{name}} depolarını getirin",
+ "de": "{{name}}-Repositorys in Unterhaltungen abrufen",
+ "uk": "Отримуйте репозиторії {{name}} у розмовах",
+ "ca": "Obteniu repositoris de {{name}} a les converses"
+ },
+ "MCP$NATIVE_FEATURE_MENTIONS_GITHUB": {
+ "en": "Mention @openhands in GitHub issues and PRs",
+ "ja": "GitHub の Issue や PR で @openhands をメンション",
+ "zh-CN": "在 GitHub 议题和 PR 中提及 @openhands",
+ "zh-TW": "在 GitHub 議題和 PR 中提及 @openhands",
+ "ko-KR": "GitHub 이슈 및 PR에서 @openhands 멘션하기",
+ "no": "Nevn @openhands i GitHub-saker og PR-er",
+ "it": "Menziona @openhands nelle issue e nelle PR di GitHub",
+ "pt": "Mencione @openhands em issues e PRs do GitHub",
+ "es": "Menciona a @openhands en issues y PR de GitHub",
+ "ar": "أشر إلى @openhands في مشكلات GitHub وطلبات السحب",
+ "fr": "Mentionnez @openhands dans les tickets et PR GitHub",
+ "tr": "GitHub sorunlarında ve PR'larda @openhands'den bahsedin",
+ "de": "@openhands in GitHub-Issues und PRs erwähnen",
+ "uk": "Згадуйте @openhands у задачах і PR на GitHub",
+ "ca": "Mencioneu @openhands a les incidències i PR de GitHub"
+ },
+ "MCP$NATIVE_FEATURE_MENTIONS_GITLAB": {
+ "en": "Mention @openhands in GitLab issues and MRs",
+ "ja": "GitLab の Issue や MR で @openhands をメンション",
+ "zh-CN": "在 GitLab 议题和 MR 中提及 @openhands",
+ "zh-TW": "在 GitLab 議題和 MR 中提及 @openhands",
+ "ko-KR": "GitLab 이슈 및 MR에서 @openhands 멘션하기",
+ "no": "Nevn @openhands i GitLab-saker og MR-er",
+ "it": "Menziona @openhands nelle issue e nelle MR di GitLab",
+ "pt": "Mencione @openhands em issues e MRs do GitLab",
+ "es": "Menciona a @openhands en issues y MR de GitLab",
+ "ar": "أشر إلى @openhands في مشكلات GitLab وطلبات الدمج",
+ "fr": "Mentionnez @openhands dans les tickets et MR GitLab",
+ "tr": "GitLab sorunlarında ve MR'larda @openhands'den bahsedin",
+ "de": "@openhands in GitLab-Issues und MRs erwähnen",
+ "uk": "Згадуйте @openhands у задачах і MR на GitLab",
+ "ca": "Mencioneu @openhands a les incidències i MR de GitLab"
+ },
+ "MCP$NATIVE_CONNECT_HINT": {
+ "en": "Connect with {{name}} OAuth to get started.",
+ "ja": "開始するには {{name}} OAuth で接続してください。",
+ "zh-CN": "使用 {{name}} OAuth 连接以开始使用。",
+ "zh-TW": "使用 {{name}} OAuth 連線以開始使用。",
+ "ko-KR": "시작하려면 {{name}} OAuth로 연결하세요.",
+ "no": "Koble til med {{name}} OAuth for å komme i gang.",
+ "it": "Connettiti con OAuth di {{name}} per iniziare.",
+ "pt": "Conecte-se com o OAuth do {{name}} para começar.",
+ "es": "Conéctate con OAuth de {{name}} para empezar.",
+ "ar": "اتصل عبر OAuth الخاص بـ {{name}} للبدء.",
+ "fr": "Connectez-vous avec l'OAuth {{name}} pour commencer.",
+ "tr": "Başlamak için {{name}} OAuth ile bağlanın.",
+ "de": "Verbinden Sie sich über {{name}}-OAuth, um loszulegen.",
+ "uk": "Щоб почати, підключіться через OAuth {{name}}.",
+ "ca": "Connecteu-vos amb l'OAuth de {{name}} per començar."
+ },
+ "MCP$NATIVE_CONNECTED": {
+ "en": "{{name}} is connected through the native integration.",
+ "ja": "{{name}} はネイティブ連携で接続されています。",
+ "zh-CN": "{{name}} 已通过原生集成连接。",
+ "zh-TW": "{{name}} 已透過原生整合連線。",
+ "ko-KR": "{{name}}이(가) 네이티브 통합을 통해 연결되었습니다.",
+ "no": "{{name}} er koblet til via den innebygde integrasjonen.",
+ "it": "{{name}} è connesso tramite l'integrazione nativa.",
+ "pt": "O {{name}} está conectado pela integração nativa.",
+ "es": "{{name}} está conectado mediante la integración nativa.",
+ "ar": "{{name}} متصل عبر التكامل الأصلي.",
+ "fr": "{{name}} est connecté via l'intégration native.",
+ "tr": "{{name}}, yerel entegrasyon üzerinden bağlı.",
+ "de": "{{name}} ist über die native Integration verbunden.",
+ "uk": "{{name}} підключено через нативну інтеграцію.",
+ "ca": "{{name}} està connectat mitjançant la integració nativa."
+ },
+ "MCP$NATIVE_NOT_CONNECTED_YET": {
+ "en": "{{name}} isn't connected yet. Finish connecting in the tab that opened, then select Continue.",
+ "ja": "{{name}} はまだ接続されていません。開いたタブで接続を完了してから、「続行」を選択してください。",
+ "zh-CN": "{{name}} 尚未连接。请在打开的标签页中完成连接,然后选择“继续”。",
+ "zh-TW": "{{name}} 尚未連線。請在開啟的分頁中完成連線,然後選擇「繼續」。",
+ "ko-KR": "{{name}}이(가) 아직 연결되지 않았습니다. 열린 탭에서 연결을 완료한 후 '계속'을 선택하세요.",
+ "no": "{{name}} er ikke koblet til ennå. Fullfør tilkoblingen i fanen som ble åpnet, og velg deretter Fortsett.",
+ "it": "{{name}} non è ancora connesso. Completa la connessione nella scheda che si è aperta, poi seleziona Continua.",
+ "pt": "O {{name}} ainda não está conectado. Conclua a conexão na aba que foi aberta e selecione Continuar.",
+ "es": "{{name}} aún no está conectado. Termina de conectarlo en la pestaña que se abrió y luego selecciona Continuar.",
+ "ar": "لم يتم توصيل {{name}} بعد. أكمل الاتصال في علامة التبويب التي فُتحت، ثم اختر متابعة.",
+ "fr": "{{name}} n'est pas encore connecté. Terminez la connexion dans l'onglet qui s'est ouvert, puis sélectionnez Continuer.",
+ "tr": "{{name}} henüz bağlı değil. Açılan sekmede bağlantıyı tamamlayın, ardından Devam'ı seçin.",
+ "de": "{{name}} ist noch nicht verbunden. Schließen Sie die Verbindung im geöffneten Tab ab und wählen Sie dann Weiter.",
+ "uk": "{{name}} ще не підключено. Завершіть підключення у відкритій вкладці, а потім виберіть «Продовжити».",
+ "ca": "{{name}} encara no està connectat. Acabeu la connexió a la pestanya que s'ha obert i, després, seleccioneu Continua."
+ },
"MCP$INSTALL_SUCCESS": {
"en": "MCP server saved.",
"ja": "MCP サーバーを保存しました。",
diff --git a/src/utils/cloud-integrations-url.ts b/src/utils/cloud-integrations-url.ts
new file mode 100644
index 0000000000..b90c614e7a
--- /dev/null
+++ b/src/utils/cloud-integrations-url.ts
@@ -0,0 +1,14 @@
+import type { Backend } from "#/api/backend-registry/types";
+
+/**
+ * The cloud instance's Settings > Integrations page. `org` is consumed by the
+ * cloud settings loader so the page opens on the org that is active here
+ * instead of the cloud's last-used org.
+ */
+export function cloudIntegrationsUrl(
+ backend: Pick<Backend, "host">,
+ orgId?: string | null,
+): string {
+ const orgQuery = orgId ? `?org=${encodeURIComponent(orgId)}` : "";
+ return `${backend.host.replace(/\/+$/, "")}/settings/integrations${orgQuery}`;
+}