Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Land the per-bot MCP settings link on the Simple apps page
aivsomkar7e89ba57fcdc
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.tsindex 5fcf1a4f7e..499c3a22c8 100644--- a/src/components/BotSettingsDialog.simple.test.ts+++ b/src/components/BotSettingsDialog.simple.test.ts@@ -397,7 +397,7 @@ describe("the bot panel in Simple mode", () => {// App tool grants (PluginsPanel) and the working folder (the files pane) name a Simple page; MCP servers live on the// apps page, and tool selection names none, so it lands where Access does.- it.each([["apps", "apps"], ["folder", "folder"], ["mcp", undefined], ["tools", undefined]] as const)("lands an Access link naming %s on %s", (page, landing) => {+ it.each([["apps", "apps"], ["folder", "folder"], ["mcp", "apps"], ["tools", undefined]] as const)("lands an Access link naming %s on %s", (page, landing) => {try {openBotSettings(fixture.dispatch, "access", { page });const rendered = panel(makeBot(), "access");diff --git a/src/components/bot-panel/PanelShell.dom.test.ts b/src/components/bot-panel/PanelShell.dom.test.tsindex 1b87df8138..f03ae7a295 100644--- a/src/components/bot-panel/PanelShell.dom.test.ts+++ b/src/components/bot-panel/PanelShell.dom.test.ts@@ -107,10 +107,10 @@ describe("named links into the bot panel", () => {await settle();expect(page()).toBe("folder");- // Simple mode has no MCP page: the link lands where Access does.+ // MCP servers are listed on the apps page.flushSync(() => openBotSettings(fixture.dispatch, "access", { page: "mcp" }));await settle();- expect([tab(), page()]).toEqual(["computer", null]);+ expect(page()).toBe("apps");flushSync(() => openBotSettings(fixture.dispatch, "access"));await settle();diff --git a/src/components/bot-panel/panel-link.test.ts b/src/components/bot-panel/panel-link.test.tsindex 6acd444ee3..39d572b091 100644--- a/src/components/bot-panel/panel-link.test.ts+++ b/src/components/bot-panel/panel-link.test.ts@@ -23,8 +23,8 @@ describe("named links into a bot's settings", () => {it("lands the access callers on the Simple page that holds what they are about, else on the Computer tab", () => {expect(linkTarget("access", link({ section: "access", page: "apps" }))).toEqual({ tab: "details", page: "apps" });expect(linkTarget("access", link({ section: "access", page: "folder" }))).toEqual({ tab: "library", page: "folder" });- // Simple mode has no MCP or tool-selection page: those links open the Computer tab, where Access lives.- expect(linkTarget("access", link({ section: "access", page: "mcp" }))).toEqual({ tab: "computer" });+ // MCP servers are listed on the apps page; Simple mode has no tool-selection page, so that link opens the Computer tab.+ expect(linkTarget("access", link({ section: "access", page: "mcp" }))).toEqual({ tab: "details", page: "apps" });expect(linkTarget("access", link({ section: "access", page: "tools" }))).toEqual({ tab: "computer" });// A plain Access link (the team map's computer button) still opens the Computer tab, where Works on lives.expect(linkTarget("access", link({ section: "access" }))).toEqual({ tab: "computer" });diff --git a/src/components/bot-panel/panel-link.ts b/src/components/bot-panel/panel-link.tsindex a694d3621e..a78e7dcd6c 100644--- a/src/components/bot-panel/panel-link.ts+++ b/src/components/bot-panel/panel-link.ts@@ -1,7 +1,7 @@import { useSyncExternalStore } from "react";import type { Action, BotSettingsSection } from "@/state/store";-import { isSimplePage, PAGES, sectionTarget, type PageId, type PanelTarget } from "./page-registry";+import { isSimplePage, PAGES, sectionTarget, type PageId, type PanelTarget, type SimplePageId } from "./page-registry";/*** A named open of a bot's settings. The store keeps only the section, which the Simple bot panel maps to one tab or@@ -48,10 +48,14 @@ export function usePanelLink(): PanelLink | null {return useSyncExternalStore(subscribe, snapshot, snapshot);}+/** Pages Advanced mode has that Simple mode folds into another page. */+const SIMPLE_ALIAS: Partial<Record<PageId, SimplePageId>> = { mcp: "apps" };+/** Where a named open of `section` lands: the link's page when it came with one for that section and Simple mode draws* that page, else the section's place, at the link's card when it named one. */export function linkTarget(section: BotSettingsSection, link: PanelLink | null): PanelTarget {const ours = link?.section === section ? link : null;- if (ours?.page && isSimplePage(ours.page)) return { tab: PAGES[ours.page].home, page: ours.page };+ const page = ours?.page && (SIMPLE_ALIAS[ours.page] ?? ours.page);+ if (page && isSimplePage(page)) return { tab: PAGES[page].home, page };return ours?.anchor ? { ...sectionTarget(section), anchor: ours.anchor } : sectionTarget(section);}