A desktop coding agent with free access to frontier models.
TypeScript
fix: MCP blocked hint said once
Samrat Talukdare0ef86dea2e3
diff --git a/apps/app/src/react-app/domains/settings/pages/mcp-supported-panel.tsx b/apps/app/src/react-app/domains/settings/pages/mcp-supported-panel.tsxindex 5ef211db..436d5a86 100644--- a/apps/app/src/react-app/domains/settings/pages/mcp-supported-panel.tsx+++ b/apps/app/src/react-app/domains/settings/pages/mcp-supported-panel.tsx@@ -41,7 +41,9 @@ export function mcpServerState(entry: Pick<McpServerEntry, "name" | "config">, dconst hint = MCP_BLOCKED_HINTS[decision.code] ?? null;// No hint that only repeats what the reason already says.const said = (text: string) => text.toLowerCase().replace(/\bmcp /g, "").replace(/\.$/, "");- return { kind: "blocked", reason, hint: hint && !said(reason).includes(said(hint)) ? hint : null };+ // The same advice in other words ("Start it with npx (npm packages) or uvx …") counts as said too.+ const opening = hint ? said(hint).split(" ").slice(0, 4).join(" ") : "";+ return { kind: "blocked", reason, hint: hint && !said(reason).includes(said(hint)) && !said(reason).includes(opening) ? hint : null };}if ((entry.config as { enabled?: unknown } | undefined)?.enabled === false) return { kind: "off" };const parts = [diff --git a/apps/app/tests/mcp-supported-panel.test.tsx b/apps/app/tests/mcp-supported-panel.test.tsxindex d643a155..1d4aa527 100644--- a/apps/app/tests/mcp-supported-panel.test.tsx+++ b/apps/app/tests/mcp-supported-panel.test.tsx@@ -97,6 +97,8 @@ describe("Settings > MCP: supported servers", () => {.toMatchObject({ hint: null });expect(mcpServerState(server("x"), { name: "x", status: "blocked", code: "unknown_command", reason: "The app cannot tell which MCP server this is." })).toMatchObject({ hint: "Start it with npx or uvx." });+ expect(mcpServerState(server("x"), { name: "x", status: "blocked", code: "unknown_command", reason: "The app cannot tell which MCP server this is. Start it with npx (npm packages) or uvx (Python packages) and the package name." }))+ .toMatchObject({ hint: null });expect(mcpServerState(server("x"), { name: "x", status: "blocked", code: "outside_project", reason: "This MCP server may only use files inside the project folder. (/etc)" })).toMatchObject({ hint: "Point it at a folder or file inside the project." });});