Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

gui: Masking's bird sits in the middle of its ring; agents and providers show their logos

yetoned3fb381afecb
diff --git a/internal/gui/assets/plugins/redact/page.js b/internal/gui/assets/plugins/redact/page.js
index 7bc4ae131..07ef80f64 100644
--- a/internal/gui/assets/plugins/redact/page.js
+++ b/internal/gui/assets/plugins/redact/page.js
@@ -232,7 +232,12 @@ function maskFlow(sum, move) {
for (const r of rows) {
const b = el("button", "mo-node" + (r.id && maskL[kind] === r.id ? " on" : ""));
b.type = "button";
- b.append(el("span", "nm", r.name), el("span", "ct", fmtN(r.n)));
+ // its logo on the side the lines are: an agent's after its name, a
+ // provider's before it; "N more" keeps the room so the names line up
+ const ic = r.id ? icon(r.icon || "generic") : el("span", "ic");
+ const tx = el("span", "tx");
+ tx.append(el("span", "nm", r.name), el("span", "ct", fmtN(r.n)));
+ b.append(...(kind === "agent" ? [tx, ic] : [ic, tx]));
if (r.id) {
b.title = t("Show what {name} sent masked", { name: r.name });
b.onclick = () => maskNarrow({ [kind]: maskL[kind] === r.id ? "" : r.id });
diff --git a/internal/gui/assets/plugins/redact/redact.css b/internal/gui/assets/plugins/redact/redact.css
index 59328db3a..53b301f8b 100644
--- a/internal/gui/assets/plugins/redact/redact.css
+++ b/internal/gui/assets/plugins/redact/redact.css
@@ -33,19 +33,23 @@
.msk-flow-none { font-size: 12px; line-height: 1.5; color: var(--muted); text-align: center; }
/* agents → this computer → providers: hairlines on a faint grid, magpie's
- bird where they cross the line */
+ bird where they cross the line (the lines' svg is the middle's own child;
+ the bird's, inside .msk-hub, is centred by it) */
.msk-fl { min-width: 0; }
.mo-flow { position: relative; display: grid; grid-template-columns: minmax(0, 140px) minmax(80px, 1fr) minmax(0, 140px); gap: 14px; }
.mo-col { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
-.mo-node { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; height: 34px; min-width: 0; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--fg); font: inherit; cursor: default; }
-.mo-col.provider .mo-node { align-items: flex-start; }
+.mo-node { display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 34px; min-width: 0; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--fg); font: inherit; cursor: default; }
+.mo-col.provider .mo-node { justify-content: flex-start; }
+.mo-node .tx { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; }
+.mo-col.provider .mo-node .tx { align-items: flex-start; }
+.mo-node:disabled .ic { visibility: hidden; }
.mo-node:not(:disabled):hover { background: var(--pill); }
.mo-node:disabled { color: var(--muted); }
.mo-node .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.mo-node .ct { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mo-col.provider .ct { color: var(--accent); }
.mo-mid { position: relative; min-width: 0; }
-.mo-mid svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
+.mo-mid > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mo-mid::before { content: ""; position: absolute; inset: 0; background: var(--fg); opacity: .07; pointer-events: none;
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='1' cy='1' r='.6'/%3E%3C/svg%3E") 0 0 / 14px 14px;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Ccircle cx='1' cy='1' r='.6'/%3E%3C/svg%3E") 0 0 / 14px 14px; }
diff --git a/internal/gui/tests/masking-records.test.cjs b/internal/gui/tests/masking-records.test.cjs
index 9a6bd9900..9f2517c69 100644
--- a/internal/gui/tests/masking-records.test.cjs
+++ b/internal/gui/tests/masking-records.test.cjs
@@ -1,8 +1,9 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// Insights › Masking: a short card of what masking kept from vendors (the
-// number, the days, agents to providers through magpie's bird) over the
-// requests it changed, by day, narrowed by facets, agents and providers,
-// or the values masked most. A request opens on its steps, its text as
+// number, the days, agents to providers, each with its logo, through
+// magpie's bird in the middle of its ring) over the requests it changed,
+// by day, narrowed by facets, agents and providers, or the values masked
+// most. A request opens on its steps, its text as
// written here, as the vendor got it or side by side (only the parts
// masking changed, the rest folded) and how each value was masked; picking
// a value lights its places. A request held back says why and offers to
@@ -71,7 +72,7 @@ function serve(lang, sum, asked, opts = {}) {
const json = (data) => route.fulfill({ json: data });
if (url.pathname === "/boot.js") return route.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = {lang:"${lang}",theme:"light",web:true};` });
if (url.pathname === "/wails/runtime.js") return route.fulfill({ contentType: "text/javascript", body: "export const Window = {};" });
- if (url.pathname === "/api/state") return json({ agents: [{ id: "claude", name: "Claude Code", icon: "claude", fields: [] }, { id: "codex", name: "Codex", icon: "codex", fields: [] }], profiles: [], settings });
+ if (url.pathname === "/api/state") return json({ agents: [{ id: "claude", name: "Claude Code", icon: "claudecode-color", fields: [] }, { id: "codex", name: "Codex", icon: "codex-color", fields: [] }], profiles: [], settings });
if (url.pathname === "/api/settings") {
if (req.method() === "POST") { asked.push("settings " + req.postData()); Object.assign(settings, JSON.parse(req.postData())); }
return json(settings);
@@ -183,6 +184,15 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await card.locator(".msk-hub use").getAttribute("href"), "#bird");
const hub = await card.locator(".msk-hub").boundingBox(), mid = await card.locator(".mo-mid").boundingBox();
assert(Math.abs(hub.x + hub.width / 2 - (mid.x + mid.width / 2)) < 1.5, "the bird sits on the centre line");
+ // and in the middle of its ring (the lines' svg rule once pinned it
+ // to the ring's top left)
+ const bird = await card.locator(".msk-hub svg").boundingBox();
+ assert(Math.abs(bird.x + bird.width / 2 - (hub.x + hub.width / 2)) < 1 && Math.abs(bird.y + bird.height / 2 - (hub.y + hub.height / 2)) < 1, "the bird in the middle of its ring");
+ // each agent and provider with its logo, on the side the lines are
+ assert.deepEqual(await card.locator(".mo-node .ic").evaluateAll((ns) => ns.map((n) => n.dataset.icon)), ["claudecode-color", "codex-color", "anthropic", "openai"]);
+ const agentNode = card.locator(".mo-col.agent .mo-node").first(), provNode = card.locator(".mo-col.provider .mo-node").first();
+ assert((await agentNode.locator(".ic").boundingBox()).x > (await agentNode.locator(".nm").boundingBox()).x, "an agent's logo after its name");
+ assert((await provNode.locator(".ic").boundingBox()).x < (await provNode.locator(".nm").boundingBox()).x, "a provider's logo before its name");
assert.match(await card.locator(".mo-cap").textContent(), /magpie/);
assert.equal(await page.evaluate(() => [...document.querySelectorAll("#maskCard, #maskCard *")].some((n) => /gradient/.test(getComputedStyle(n).backgroundImage))), false, "flat: no gradient");
// short: the list starts in the first screen