From 63cb1af3cb49159e805f9987dc3b0b5b90b502e8 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 31 Oct 2026 22:06:22 +0800 Subject: [PATCH] library: the MCP router's mark is the bird with its tail routed out to three ends The owner asked for a mark that says MCP routing and picked, from three generated drafts, magpie's bird whose tail fans out into lines ending in dots. It is drawn as SVG on the bird itself, not a picture, so it stays sharp at 17px and takes the theme's colour: the bird clipped short of its tail (#bird-notail, beside #bird-tail in index.html), three strokes from where the tail was and a dot at each end. Every place hubMark draws (the Library's MCP router row, the Connect an app sheet) gets it. Run on mote (macOS 27): library-mcp-hub now checks the clip, the three routes and their ends (red on the old mark). library-*, i18n-keys and old-webkit, both engines: 895 pass, 5 fail. The reds are i18n-keys "a plugin's words are its own" (#4524) and library-row-remove's 3 subtests (#4304); both red the same at origin/main 2cfb8351d. Looked at in dark and light at 17px, 34px and 220px. --- internal/gui/assets/index.html | 2 +- internal/gui/assets/plugins/library/client.js | 8 +++++--- internal/gui/tests/library-mcp-hub.test.cjs | 9 +++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/internal/gui/assets/index.html b/internal/gui/assets/index.html index 7bdc5cf0c..2b6d4e3f4 100644 --- a/internal/gui/assets/index.html +++ b/internal/gui/assets/index.html @@ -59,7 +59,7 @@
- + magpie

Agents

diff --git a/internal/gui/assets/plugins/library/client.js b/internal/gui/assets/plugins/library/client.js index 45bbbc3a0..d88c73109 100644 --- a/internal/gui/assets/plugins/library/client.js +++ b/internal/gui/assets/plugins/library/client.js @@ -90,11 +90,13 @@ magpie.plugin("library", (ctx) => { }); } - // the hub's mark: magpie's bird, the one server each agent is given - // (the owner didn't like a made-up glyph for it) + // the hub's mark: magpie's bird, the one server each agent is given, + // its tail three lines out to three servers (the owner's pick, 10-31) function hubMark() { const g = el("span", "lib-glyph lib-hubmark"); - g.innerHTML = ''; + g.innerHTML = ''; return g; } function glyph(d, cls = "lib-glyph") { diff --git a/internal/gui/tests/library-mcp-hub.test.cjs b/internal/gui/tests/library-mcp-hub.test.cjs index 786678f8b..6f749e2ad 100644 --- a/internal/gui/tests/library-mcp-hub.test.cjs +++ b/internal/gui/tests/library-mcp-hub.test.cjs @@ -179,8 +179,13 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", // what it serves: three servers, magpie-image among them, 2 tools each once checked, in Claude Code await page.waitForFunction((x) => document.querySelector("#view-library .lib-hubstats")?.textContent === x, [w("{n} servers", { n: 3 }), w("{n} tools", { n: 6 }), w("in {agents}", { agents: "Claude Code" })].join(" ยท ")); - // the hub's mark is magpie's bird (the owner didn't like a made-up glyph) - assert.equal(await v.locator('.lib-hub > .lib-hubmark use[href="#bird"]').count(), 1); + // the hub's mark is magpie's bird (the owner didn't like a made-up glyph), + // its tail three routes out to three ends (the owner's pick, 10-31), + // drawn by a clip the page has + assert.equal(await v.locator('.lib-hub > .lib-hubmark use[href="#bird"][clip-path="url(#bird-notail)"]').count(), 1); + assert.equal(await v.locator(".lib-hub > .lib-hubmark path").count(), 3); + assert.equal(await v.locator(".lib-hub > .lib-hubmark circle").count(), 3); + assert.equal(await page.locator("clipPath#bird-notail").count(), 1); // the address any other app connects at const at = v.locator(".lib-hubat"); // the row says what it is (the owner: "Other apps" over an address read as nonsense)