Skip to content

🙌 OpenHands: AI-Driven Development

Rename Integrations nav item to MCP Directory (#371)

jpelletier1951ca0af2458
diff --git a/__tests__/components/features/sidebar/sidebar.test.tsx b/__tests__/components/features/sidebar/sidebar.test.tsx
index e26af87e1f..aaf36421ca 100644
--- a/__tests__/components/features/sidebar/sidebar.test.tsx
+++ b/__tests__/components/features/sidebar/sidebar.test.tsx
@@ -67,14 +67,15 @@ vi.mock("#/components/features/backends/backend-selector", () => ({
}));
vi.mock("#/components/features/sidebar/sidebar-conversation-list", () => ({
- SidebarConversationList: () => <div data-testid="sidebar-conversation-list" />,
+ SidebarConversationList: () => (
+ <div data-testid="sidebar-conversation-list" />
+ ),
}));
vi.mock("#/hooks/use-settings-nav-items", () => ({
useSettingsNavItems: () => [],
}));
-
function renderSidebar(currentPath: string) {
const value: NavigationContextValue = {
currentPath,
@@ -101,7 +102,12 @@ describe("Sidebar", () => {
window.localStorage.clear();
});
- it.each([["/conversations"], ["/automations"], ["/automations/abc-123"], ["/settings"]])(
+ it.each([
+ ["/conversations"],
+ ["/automations"],
+ ["/automations/abc-123"],
+ ["/settings"],
+ ])(
"keeps the sidebar's default top padding on %s so spacing stays consistent with the conversations page",
(currentPath) => {
renderSidebar(currentPath);
@@ -122,6 +128,17 @@ describe("Sidebar", () => {
expect(settingsToggle.className).toMatch(/(^|\s)text-\[#8C8C8C\](\s|$)/);
});
+ it("labels the MCP nav item as MCP Directory instead of Integrations", () => {
+ renderSidebar("/mcp");
+
+ expect(screen.getByRole("link", { name: "SIDEBAR$MCP_DIRECTORY" })).toBe(
+ screen.getByTestId("sidebar-mcp-link"),
+ );
+ expect(
+ screen.queryByRole("link", { name: "SIDEBAR$INTEGRATIONS" }),
+ ).not.toBeInTheDocument();
+ });
+
it("toggles between expanded and collapsed states and persists the choice", () => {
const { unmount } = renderSidebar("/conversations");
@@ -170,6 +187,7 @@ describe("Sidebar", () => {
"sidebar-conversations-link",
"sidebar-automations-link",
"sidebar-skills-link",
+ "sidebar-mcp-link",
"sidebar-settings-toggle",
]) {
const link = screen.getByTestId(testId);
diff --git a/__tests__/i18n/sidebar-mcp-directory-label.test.ts b/__tests__/i18n/sidebar-mcp-directory-label.test.ts
new file mode 100644
index 0000000000..5b4e6f064c
--- /dev/null
+++ b/__tests__/i18n/sidebar-mcp-directory-label.test.ts
@@ -0,0 +1,21 @@
+import fs from "fs";
+import path from "path";
+import { describe, expect, it } from "vitest";
+
+// The sidebar MCP entry must not use the ambiguous "Integrations" label.
+// Lock this down at translation.json because the test i18next mock returns keys.
+describe("SIDEBAR$MCP_DIRECTORY label", () => {
+ const translationPath = path.join(
+ __dirname,
+ "../../src/i18n/translation.json",
+ );
+ const translation = JSON.parse(
+ fs.readFileSync(translationPath, "utf-8"),
+ ) as Record<string, Record<string, string>>;
+
+ it('uses "MCP Directory" (not "Integrations") in English', () => {
+ expect(translation.SIDEBAR$MCP_DIRECTORY).toBeDefined();
+ expect(translation.SIDEBAR$MCP_DIRECTORY.en).toBe("MCP Directory");
+ expect(translation.SIDEBAR$MCP_DIRECTORY.en).not.toBe("Integrations");
+ });
+});
diff --git a/src/components/features/sidebar/sidebar.tsx b/src/components/features/sidebar/sidebar.tsx
index 44be944b47..4f299d12f8 100644
--- a/src/components/features/sidebar/sidebar.tsx
+++ b/src/components/features/sidebar/sidebar.tsx
@@ -229,7 +229,7 @@ export function Sidebar() {
/>
<SidebarNavLink
to="/mcp"
- label={t(I18nKey.SIDEBAR$INTEGRATIONS)}
+ label={t(I18nKey.SIDEBAR$MCP_DIRECTORY)}
testId="sidebar-mcp-link"
disabled={linkDisabled}
collapsed={collapsed}
diff --git a/src/i18n/translation.json b/src/i18n/translation.json
index cb551f5789..00e74c3cd0 100644
--- a/src/i18n/translation.json
+++ b/src/i18n/translation.json
@@ -11831,22 +11831,22 @@
"tr": "Yetenekler",
"uk": "Навички"
},
- "SIDEBAR$INTEGRATIONS": {
- "en": "Integrations",
- "ja": "連携",
- "zh-CN": "集成",
- "zh-TW": "整合",
- "ko-KR": "통합",
- "no": "Integrasjoner",
- "ar": "التكاملات",
- "de": "Integrationen",
- "fr": "Intégrations",
- "it": "Integrazioni",
- "pt": "Integrações",
- "es": "Integraciones",
- "ca": "Integracions",
- "tr": "Entegrasyonlar",
- "uk": "Інтеграції"
+ "SIDEBAR$MCP_DIRECTORY": {
+ "en": "MCP Directory",
+ "ja": "MCPディレクトリ",
+ "zh-CN": "MCP 目录",
+ "zh-TW": "MCP 目錄",
+ "ko-KR": "MCP 디렉토리",
+ "no": "MCP-katalog",
+ "ar": "دليل MCP",
+ "de": "MCP-Verzeichnis",
+ "fr": "Répertoire MCP",
+ "it": "Directory MCP",
+ "pt": "Diretório MCP",
+ "es": "Directorio MCP",
+ "ca": "Directori MCP",
+ "tr": "MCP Dizini",
+ "uk": "Каталог MCP"
},
"MCP$PAGE_DESCRIPTION": {
"en": "Add Model Context Protocol servers to expand what your agent can do. Click any server below to install it.",