GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(app): link Console MCPs and skills in Extensions settings (#63125) · anomalyco/opencode@6c5d38d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • app
      • e2e
        • regression
          • mcp-workspace-toggle.spec.ts
          • settings.spec.ts
        • utils
          • console.ts
      • src
        • providers/connect
          • mcp-dialog.tsx
        • runtime/i18n
          • en.ts
        • settings
          • providers
            • console-extensions.test.ts
            • console-extensions.ts
            • console-link.tsx
            • extensions.tsx
          • settings.css
          • workspaces
            • project-extensions.tsx
            • project.css
        • shell
          • search-list.css
    • gui-plugins/src/details
      • server-panel.tsx
    • ui/src/icons
      • icon
        • additional-icons.ts
      • new-icons.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/app/e2e/regression/mcp-workspace-toggle.spec.ts‎

Copy file name to clipboardExpand all lines: packages/app/e2e/regression/mcp-workspace-toggle.spec.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ async function open(
6969
if (input.surface === "dialog") return page.keyboard.press("Control+;")
7070

7171
if (input.surface === "settings") {
72-
await page.keyboard.press("Control+,")
72+
// Settings opens with the platform's command key, which the app reads from navigator.platform.
73+
const mac = await page.evaluate(() => /(Mac|iPod|iPhone|iPad)/.test(navigator.platform))
74+
await page.keyboard.press(mac ? "Meta+," : "Control+,")
7375

7476
return panel.getByRole("tab", { name: "Extensions", exact: true }).click()
7577
}
Collapse file

‎packages/app/e2e/regression/settings.spec.ts‎

Copy file name to clipboardExpand all lines: packages/app/e2e/regression/settings.spec.ts
+199-1Lines changed: 199 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { ConfigEntry, OpenCodeEvent, SessionMessageInfo, WorktreeDirectory
33
import { NO_PROVIDER, REMOTE_SERVER, SERVER, holdRoute, project, seed, session } from "../utils/app"
44
import { mockMissingLocation, mockOpenCodeServer } from "../utils/mock-server"
55
import { mockRemoteServer, mockWorkspace, openSession, openSettings, type WorkspaceInput } from "../utils/workspace"
6+
import { CONSOLE_URL, consoleGateway, consoleSignIn } from "../utils/console"
67
import { recordNotifications } from "../utils/notifications"
78
import { installSseTransport } from "../utils/sse-transport"
89

@@ -783,6 +784,97 @@ test("a project plugin list that fails to load offers Retry instead of an empty
783784
await expect(panel.getByRole("status")).toHaveCount(0)
784785
})
785786

787+
test("project extensions link Console MCPs and skills and offer sign-in as the server-wide page does", async ({
788+
page,
789+
context,
790+
}) => {
791+
const consoleUrl = CONSOLE_URL
792+
await context.route("https://opencode.ai/console/**", (route) => route.fulfill({ body: "Console" }))
793+
794+
const { settings } = await open(page, {
795+
configEntries: [
796+
{
797+
type: "document",
798+
info: {
799+
mcp: {
800+
servers: {
801+
slack: consoleGateway("slack"),
802+
github: consoleGateway("github", { protocol: "2026-07-28" }),
803+
},
804+
},
805+
},
806+
},
807+
],
808+
mcp: [
809+
...["figma", "github", "slack"].map((name) => ({ name, status: { status: "connected" } })),
810+
{ name: "stripe", integrationID: "stripe-oauth", status: { status: "needs_auth", error: "Sign in required" } },
811+
],
812+
integrations: [
813+
consoleSignIn,
814+
{
815+
id: "stripe-oauth",
816+
name: "Stripe",
817+
methods: [{ id: "oauth", type: "oauth" }],
818+
connections: [],
819+
metadata: { source: "mcp" },
820+
},
821+
],
822+
skills: [
823+
{ id: "review", name: "Code review", path: "/home/test/.config/opencode/skills/review/SKILL.md", content: "x" },
824+
{ id: "funnel", name: "Funnel analytics", path: "skill://funnel/SKILL.md", content: "x" },
825+
],
826+
})
827+
828+
await openProject(page)
829+
await settings.getByRole("tab", { name: "Extensions", exact: true }).click()
830+
831+
// Console's servers are shared with every project, so they list under Shared.
832+
const mcps = settings.getByRole("tabpanel", { name: "MCPs", exact: true })
833+
await mcps.getByRole("button", { name: /^Shared/ }).click()
834+
await expect(mcps.getByRole("switch", { name: "figma", exact: true })).toBeVisible()
835+
// As on the server-wide page, a dot shows each status and the words stay for assistive technology.
836+
await expect(mcps.getByRole("switch", { name: "slack", exact: true })).toHaveAccessibleDescription("Connected")
837+
await expect(mcps.getByRole("switch", { name: "github", exact: true })).toHaveCount(0)
838+
await expect(mcps.getByRole("button", { name: "Manage figma in Console", exact: true })).toHaveCount(0)
839+
// A server that needs a sign-in asks for it in the switch's place, as on the server-wide page.
840+
await expect(mcps.getByRole("button", { name: "Sign in to stripe", exact: true })).toHaveText("Sign in")
841+
await expect(mcps.getByRole("switch", { name: "stripe", exact: true })).toHaveCount(0)
842+
843+
const connection = page.waitForEvent("popup")
844+
await mcps.getByRole("button", { name: "Connect github in Console", exact: true }).click()
845+
await expect(await connection).toHaveURL(`${consoleUrl}/org_acme/extensions?connect=github`)
846+
847+
const manage = page.waitForEvent("popup")
848+
await mcps.getByRole("button", { name: "Manage slack in Console", exact: true }).click()
849+
await expect(await manage).toHaveURL(`${consoleUrl}/org_acme/extensions/mcp/slack`)
850+
851+
await settings.getByRole("tab", { name: "Skills", exact: true }).click()
852+
const skills = settings.getByRole("tabpanel", { name: "Skills", exact: true })
853+
await skills.getByRole("button", { name: /^Shared/ }).click()
854+
await expect(skills.getByText("Code review", { exact: true })).toBeVisible()
855+
await expect(skills.getByRole("button", { name: "Manage Code review in Console", exact: true })).toHaveCount(0)
856+
857+
const skill = page.waitForEvent("popup")
858+
await skills.getByRole("button", { name: "Manage Funnel analytics in Console", exact: true }).click()
859+
await expect(await skill).toHaveURL(`${consoleUrl}/org_acme/extensions?kind=skills&search=funnel`)
860+
})
861+
862+
test("a Console skill links to Console's home when no Console MCP names the workspace", async ({ page, context }) => {
863+
await context.route(`${CONSOLE_URL}**`, (route) => route.fulfill({ body: "Console" }))
864+
865+
const { settings } = await open(page, {
866+
integrations: [consoleSignIn],
867+
skills: [{ id: "funnel", name: "Funnel analytics", path: "skill://funnel/SKILL.md", content: "x" }],
868+
})
869+
870+
await settings.getByRole("tab", { name: "Extensions", exact: true }).click()
871+
await settings.getByRole("tab", { name: "Skills", exact: true }).click()
872+
873+
const skill = page.waitForEvent("popup")
874+
await settings.getByRole("button", { name: "Manage Funnel analytics in Console", exact: true }).click()
875+
await expect(await skill).toHaveURL(CONSOLE_URL)
876+
})
877+
786878
for (const field of [
787879
{
788880
name: "color",
@@ -1050,7 +1142,14 @@ test.describe("pages open before slow data", () => {
10501142
})
10511143

10521144
test("extensions", async ({ page }) => {
1053-
const { settings } = await open(page, { mcp: [{ name: "demo-mcp", status: { status: "connected" } }] })
1145+
const { settings } = await open(page, {
1146+
mcp: [{ name: "demo-mcp", status: { status: "connected" } }],
1147+
skills: [
1148+
{ id: "opencode", name: "OpenCode", path: "skill://opencode/SKILL.md", content: "OpenCode help" },
1149+
{ id: "plugin-skill", name: "Plugin skill", path: "skill://plugin-skill/SKILL.md", content: "Plugin help" },
1150+
],
1151+
})
1152+
10541153
const mcp = await holdRoute(page, (url) => url.pathname === "/api/mcp")
10551154
await settings.getByRole("tab", { name: "Extensions", exact: true }).click()
10561155
await mcp.arrived
@@ -1059,6 +1158,11 @@ test.describe("pages open before slow data", () => {
10591158
mcp.release()
10601159
await settings.getByRole("tab", { name: "MCPs", exact: true }).click()
10611160
await expect(settings.getByRole("switch", { name: "demo-mcp" })).toBeChecked()
1161+
// Without a Console sign-in, a virtual skill is never linked to Console.
1162+
await settings.getByRole("tab", { name: "Skills", exact: true }).click()
1163+
await expect(settings.getByText("OpenCode", { exact: true })).toBeVisible()
1164+
await expect(settings.getByText("Plugin skill", { exact: true })).toBeVisible()
1165+
await expect(settings.getByRole("button", { name: /in Console$/ })).toHaveCount(0)
10621166
})
10631167

10641168
test("extensions show MCP status dots with sign-in, error, and switch controls", async ({ page, context }) => {
@@ -1115,6 +1219,100 @@ test.describe("pages open before slow data", () => {
11151219
await expect(details.getByText(error, { exact: true })).toBeVisible()
11161220
})
11171221

1222+
test("extensions list Console MCPs and skills with local ones", async ({ page, context }) => {
1223+
await context.route("https://opencode.ai/console/**", (route) => route.fulfill({ body: "Console" }))
1224+
const consoleUrl = CONSOLE_URL
1225+
1226+
const actions: string[] = []
1227+
1228+
const { settings, push } = await open(page, {
1229+
configEntries: [
1230+
{
1231+
type: "document",
1232+
info: {
1233+
mcp: {
1234+
servers: {
1235+
linear: consoleGateway("linear"),
1236+
github: consoleGateway("github", { protocol: "2026-07-28" }),
1237+
clickhouse: consoleGateway("clickhouse"),
1238+
},
1239+
},
1240+
},
1241+
},
1242+
{
1243+
type: "document",
1244+
path: "/home/test/.config/opencode/opencode.json",
1245+
info: { mcp: { servers: { linear: { type: "remote", url: "https://mcp.linear.app/mcp" } } } },
1246+
},
1247+
],
1248+
integrations: [consoleSignIn],
1249+
mcp: ["figma", "linear", "github", "clickhouse"].map((name) => ({ name, status: { status: "connected" } })),
1250+
skills: [
1251+
{
1252+
id: "review",
1253+
name: "Code review",
1254+
path: "/home/test/.config/opencode/skills/review/SKILL.md",
1255+
content: "Review code",
1256+
},
1257+
{ id: "opencode", name: "OpenCode", path: "skill://opencode/SKILL.md", content: "OpenCode help" },
1258+
{ id: "report", name: "Report", path: "skill://report/SKILL.md", content: "Report bugs" },
1259+
{ id: "browser", name: "Browser", path: "skill://browser/SKILL.md", content: "Browser help" },
1260+
{ id: "funnel", name: "Funnel analytics", path: "skill://funnel/SKILL.md", content: "Analyze the funnel" },
1261+
],
1262+
onMcpAction: (input) => {
1263+
actions.push(`${input.server}:${input.action}`)
1264+
},
1265+
})
1266+
1267+
await settings.getByRole("tab", { name: "Extensions", exact: true }).click()
1268+
1269+
// One list: a name both configs define is one row, the user's server, with Console's link kept. A Console server
1270+
// whose account isn't connected asks for the connection in the switch's place.
1271+
await expect(settings.getByRole("switch")).toHaveCount(3)
1272+
await expect(settings.getByRole("switch", { name: "linear", exact: true })).toBeChecked()
1273+
await expect(settings.getByRole("switch", { name: "figma", exact: true })).toBeChecked()
1274+
await expect(settings.getByRole("switch", { name: "github", exact: true })).toHaveCount(0)
1275+
await expect(settings.getByRole("button", { name: "Manage linear in Console" })).toHaveText(
1276+
"Replaces OpenCode Console",
1277+
)
1278+
await expect(settings.getByRole("button", { name: "Manage github in Console" })).toHaveText("github")
1279+
await expect(settings.getByRole("button", { name: "Manage clickhouse in Console" })).toHaveText("clickhouse")
1280+
await expect(settings.getByText("OpenCode Console", { exact: true })).toHaveCount(0)
1281+
await expect(settings.getByRole("button", { name: "Manage figma in Console" })).toHaveCount(0)
1282+
1283+
const connection = page.waitForEvent("popup")
1284+
await settings.getByRole("button", { name: "Connect github in Console" }).click()
1285+
await expect(await connection).toHaveURL(`${consoleUrl}/org_acme/extensions?connect=github`)
1286+
1287+
const manage = page.waitForEvent("popup")
1288+
await settings.getByRole("button", { name: "Manage linear in Console" }).click()
1289+
await expect(await manage).toHaveURL(`${consoleUrl}/org_acme/extensions/mcp/linear`)
1290+
1291+
const toggle = settings.getByRole("switch", { name: "clickhouse", exact: true })
1292+
await toggle.press("Space")
1293+
await expect(toggle).not.toBeChecked()
1294+
expect(actions).toEqual(["clickhouse:disconnect"])
1295+
const refreshed = page.waitForResponse((response) => new URL(response.url()).pathname === "/api/config")
1296+
await push([{ id: "evt_config_extensions", created: 1, type: "config.updated", data: {} }])
1297+
await refreshed
1298+
await expect(toggle).not.toBeChecked()
1299+
1300+
// One sorted list: only a skill Console delivers links to Console, filtered to that skill.
1301+
await settings.getByRole("tab", { name: "Skills", exact: true }).click()
1302+
await expect(settings.locator(".settings-extension-name")).toHaveText([
1303+
"Browser",
1304+
"Code review",
1305+
"Funnel analytics",
1306+
"OpenCode",
1307+
"Report",
1308+
])
1309+
await expect(settings.getByRole("button", { name: /in Console$/ })).toHaveCount(1)
1310+
1311+
const skill = page.waitForEvent("popup")
1312+
await settings.getByRole("button", { name: "Manage Funnel analytics in Console", exact: true }).click()
1313+
await expect(await skill).toHaveURL(`${consoleUrl}/org_acme/extensions?kind=skills&search=funnel`)
1314+
})
1315+
11181316
for (const fails of [false, true]) {
11191317
test(`about ${fails ? "keeps its fallback when contributors fail" : "updates contributors later"}`, async ({
11201318
page,
Collapse file

‎packages/app/e2e/utils/console.ts‎

Copy file name to clipboard
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export const CONSOLE_URL = "https://opencode.ai/console"
2+
3+
// An MCP server OpenCode Console delivers through its gateway, with the gateway token that names its workspace.
4+
// `protocol` is the pin Console sets while the member hasn't connected their account.
5+
export function consoleGateway(slug: string, options: { workspace?: string; protocol?: "2026-07-28" } = {}) {
6+
const claims = Buffer.from(JSON.stringify({ u: "user_fixture", w: options.workspace ?? "org_acme", d: 1 }))
7+
8+
return {
9+
type: "remote",
10+
url: `${CONSOLE_URL}/api/integration-gateway/${slug}/mcp`,
11+
oauth: false,
12+
headers: { authorization: `Bearer ocgw_${claims.toString("base64url")}.signature` },
13+
protocol: options.protocol,
14+
}
15+
}
16+
17+
// The OpenCode Console integration with a saved sign-in.
18+
export const consoleSignIn = {
19+
id: "opencode",
20+
name: "OpenCode",
21+
methods: [{ id: "oauth", type: "oauth" }],
22+
connections: [{ type: "credential", id: "cred_console", label: "Acme", method: "oauth" }],
23+
}
Collapse file

‎packages/app/src/providers/connect/mcp-dialog.tsx‎

Copy file name to clipboardExpand all lines: packages/app/src/providers/connect/mcp-dialog.tsx
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ export function McpDialog(props: {
273273
<Button
274274
size="small"
275275
variant="ghost-muted"
276-
class="mcp-status-action"
277276
aria-label={language.t("dialog.mcp.error.viewLabel", { name: item().name })}
278277
onClick={() => select(item().name)}
279278
>
@@ -297,7 +296,6 @@ export function McpDialog(props: {
297296
<Button
298297
size="small"
299298
variant="ghost-muted"
300-
class="mcp-status-action"
301299
disabled={busy()}
302300
aria-busy={busy()}
303301
aria-label={language.t("dialog.mcp.signIn.open", { name: item().name })}
Collapse file

‎packages/app/src/runtime/i18n/en.ts‎

Copy file name to clipboardExpand all lines: packages/app/src/runtime/i18n/en.ts
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,12 @@ export const dict = {
954954
"settings.extensions.manageConfig": "Manage in opencode.json",
955955
"settings.extensions.addSkills": "How to add skills",
956956
"settings.extensions.plugins.loadFailed": "Could not load plugins",
957+
"settings.extensions.sources.loadFailed": "Could not load extension sources",
958+
"settings.extensions.console.temporary":
959+
"Switches temporarily control MCP connections for the current project, not your Console preferences. Server configuration changes can reconnect them.",
960+
"settings.extensions.console.replaced": "Replaces OpenCode Console",
961+
"settings.extensions.console.connect": "Connect {{name}} in Console",
962+
"settings.extensions.console.manage": "Manage {{name}} in Console",
957963
"project.settings.title": "Edit project",
958964
"project.settings.autoAccept.description": "Approve this project's permission requests without asking",
959965
"project.settings.autoAccept.default.on": "Use default (On)",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.