Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
refactor(cli-tools): remove duplicated MITM tab and Antigravity card render (R5-2, plan 11 §12 #10)
diegosouzapw9f5db36af8ba
diff --git a/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx b/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsxindex fc9a6c6586..d9be06eab9 100644--- a/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx+++ b/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx@@ -16,7 +16,6 @@ import {ClineToolCard,KiloToolCard,DefaultToolCard,- AntigravityToolCard,CopilotToolCard,CustomCliCard,HermesAgentToolCard,@@ -44,7 +43,6 @@ const GUIDED_TOOL_IDS = new Set(["amp","qwen",]);-const MITM_TOOL_IDS = new Set(["antigravity", "kiro"]);const CUSTOM_TOOL_IDS = new Set(["custom"]);export default function CLIToolsPageClient({ machineId: _machineId }) {@@ -251,7 +249,6 @@ export default function CLIToolsPageClient({ machineId: _machineId }) {if (activeCategory === "all") return true;if (activeCategory === "auto") return AUTO_CONFIGURED_TOOL_IDS.has(toolId);if (activeCategory === "guided") return GUIDED_TOOL_IDS.has(toolId);- if (activeCategory === "mitm") return MITM_TOOL_IDS.has(toolId);if (activeCategory === "custom") return CUSTOM_TOOL_IDS.has(toolId);return true;});@@ -311,16 +308,6 @@ export default function CLIToolsPageClient({ machineId: _machineId }) {cloudEnabled={cloudEnabled}/>);- case "antigravity":- return (- <AntigravityToolCard- key={toolId}- {...commonProps}- activeProviders={getActiveProviders()}- hasActiveProviders={hasActiveProviders}- cloudEnabled={cloudEnabled}- />- );case "cline":return (<ClineToolCard@@ -372,18 +359,6 @@ export default function CLIToolsPageClient({ machineId: _machineId }) {/>);default:- // #487: Any tool with configType "mitm" should use the MITM card (Start/Stop controls)- if (tool.configType === "mitm") {- return (- <AntigravityToolCard- key={toolId}- {...commonProps}- activeProviders={getActiveProviders()}- hasActiveProviders={hasActiveProviders}- cloudEnabled={cloudEnabled}- />- );- }return (<DefaultToolCardkey={toolId}@@ -447,7 +422,6 @@ export default function CLIToolsPageClient({ machineId: _machineId }) {options={[{ value: "auto", label: t("autoConfiguredTab") },{ value: "guided", label: t("guidedClientsTab") },- { value: "mitm", label: t("mitmClientsTab") },{value: "custom",label: translateOrFallback("customCliTab", "Custom CLI"),diff --git a/tests/unit/ui/cli-tools-no-mitm-tab.test.tsx b/tests/unit/ui/cli-tools-no-mitm-tab.test.tsxnew file mode 100644index 0000000000..e1b3442c83--- /dev/null+++ b/tests/unit/ui/cli-tools-no-mitm-tab.test.tsx@@ -0,0 +1,49 @@+/**+ * Regression guard: /dashboard/cli-tools must NOT contain MITM UI.+ * MITM setup now lives exclusively in AgentBridge (plan 11 §12 #10, R5-2).+ *+ * Uses source-text inspection — no JSDOM render needed.+ */+import { describe, it } from "node:test";+import assert from "node:assert/strict";+import { readFileSync } from "node:fs";+import { fileURLToPath } from "node:url";+import path from "node:path";++const __dirname = path.dirname(fileURLToPath(import.meta.url));+const PAGE_PATH = path.resolve(+ __dirname,+ "../../../src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx",+);++const src = readFileSync(PAGE_PATH, "utf-8");++describe("CLIToolsPageClient — no MITM duplication (R5-2)", () => {+ it("MITM_TOOL_IDS constant is not defined", () => {+ assert.ok(+ !src.includes("MITM_TOOL_IDS"),+ "MITM_TOOL_IDS must be removed from CLIToolsPageClient.tsx",+ );+ });++ it('mitm tab value is not present in SegmentedControl options', () => {+ assert.ok(+ !src.includes('value: "mitm"'),+ 'Tab entry { value: "mitm" } must be removed from CLIToolsPageClient.tsx',+ );+ });++ it('mitmClientsTab i18n key is not referenced in render', () => {+ assert.ok(+ !src.includes('t("mitmClientsTab")'),+ 'mitmClientsTab must not be called in CLIToolsPageClient.tsx',+ );+ });++ it("AntigravityToolCard is not imported", () => {+ assert.ok(+ !src.includes("AntigravityToolCard"),+ "AntigravityToolCard import must be removed from CLIToolsPageClient.tsx",+ );+ });+});