Skip to content

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

gui: a new partner's tile in the add sheet keeps a small dot until it is opened

yetoneade2f0628801
diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css
index 11a8f4028..7c5acc45b 100644
--- a/internal/gui/assets/app.css
+++ b/internal/gui/assets/app.css
@@ -1953,7 +1953,10 @@ body.panel .foot { min-height: 0; padding: 5px 8px 7px 14px; border-top: 1px sol
#addProvider.has-new::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 0 5px; border-radius: 50%; background: var(--accent); vertical-align: 6px; box-shadow: 0 0 0 0 var(--accent); animation: new-dot-in .4s cubic-bezier(.3, 1.6, .5, 1), new-dot-ring 2.4s ease-out .4s 2; }
@keyframes new-dot-in { from { transform: scale(0); } }
@keyframes new-dot-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 5px transparent; } }
-@media (prefers-reduced-motion: reduce) { #addProvider.has-new::after { animation: none; } }
+/* and on the tile of each partner new when the sheet showed it, until it is opened (partnerTile) */
+.tile .new-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
+.tile .new-dot.in { animation: new-dot-in .4s cubic-bezier(.3, 1.6, .5, 1), new-dot-ring 2.4s ease-out .4s 1; }
+@media (prefers-reduced-motion: reduce) { #addProvider.has-new::after, .tile .new-dot.in { animation: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 6px; min-height: 12px; }
.chip {
display: inline-flex; align-items: center; gap: 2px;
diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js
index c6834c98a..15f40600d 100644
--- a/internal/gui/assets/app.js
+++ b/internal/gui/assets/app.js
@@ -7324,6 +7324,9 @@ function renderAdd() {
if (partners.length) {
any = true;
const grid = section("Partners", "magpie's sponsors");
+ // a new one's tile keeps a dot until opened (partnerTile)
+ newPartnerTiles ??= new Set();
+ for (const p of partners) if (p.new && !p.added) newPartnerTiles.add(p.id);
for (const pr of partners) grid.append(partnerTile(pr));
partnersCounted ??= new Set();
const fresh = partners.filter((p) => !partnersCounted.has(p.id));
@@ -7589,12 +7592,26 @@ function markNewPartners() {
else b.removeAttribute("title");
}
+// partners new when the sheet showed them, each dotted until opened, this
+// run; a dot scales in once
+let newPartnerTiles = null;
+const newPartnerDotsIn = new Set();
+
// a partner's row: its own section says it is sponsored, so no badge
function partnerTile(pr) {
const b = tile({ ...pr, sponsored: false, note: "" });
if (!pr.added) {
const open = b.onclick;
- b.onclick = (e) => { countPartner("opened", [pr.id]); open(e); };
+ b.onclick = (e) => { newPartnerTiles?.delete(pr.id); countPartner("opened", [pr.id]); open(e); };
+ }
+ if (!pr.added && newPartnerTiles?.has(pr.id)) {
+ const d = el("span", "new-dot" + (newPartnerDotsIn.has(pr.id) ? "" : " in"));
+ newPartnerDotsIn.add(pr.id);
+ // a hidden dot's animation starts over when shown again
+ d.addEventListener("animationend", (e) => { if (e.animationName === "new-dot-ring") d.classList.remove("in"); });
+ d.setAttribute("role", "img");
+ d.setAttribute("aria-label", t("New"));
+ b.querySelector(".nm").append(d);
}
if (!pr.added) b.title = pr.name + (partnerNote(pr) ? " · " + partnerNote(pr) : "") + "\n" + hostOf(pr.chat || pr.responses || pr.anthropic);
return b;
diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js
index c689a72cf..ad99d74a3 100644
--- a/internal/gui/assets/i18n.js
+++ b/internal/gui/assets/i18n.js
@@ -1438,6 +1438,7 @@ const I18N = {
"Partners": "合作伙伴",
"magpie's sponsors": "赞助 magpie 的服务",
"New in Partners: {names}": "合作伙伴有新成员:{names}",
+ "New": "新",
"Relays": "中转",
"one key, many vendors": "一个密钥,多家模型",
"Removed from magpie": "已从 magpie 移除",
@@ -5323,6 +5324,7 @@ const I18N = {
"Partners": "合作夥伴",
"magpie's sponsors": "贊助 magpie 的服務",
"New in Partners: {names}": "合作夥伴有新成員:{names}",
+ "New": "新",
"Relays": "中轉",
"one key, many vendors": "一個金鑰,多家模型",
"Removed from magpie": "已從 magpie 移除",
@@ -9183,6 +9185,7 @@ const I18N = {
"Partners": "パートナー",
"magpie's sponsors": "magpie のスポンサー",
"New in Partners: {names}": "新しいパートナー:{names}",
+ "New": "新着",
"Relays": "中継サービス",
"one key, many vendors": "1 つのキーで複数のベンダー",
"Removed from magpie": "magpie から削除済み",
@@ -13073,6 +13076,7 @@ const I18N = {
"Partners": "Partner",
"magpie's sponsors": "Sponsoren von magpie",
"New in Partners: {names}": "Neu bei den Partnern: {names}",
+ "New": "Neu",
"Relays": "Relays",
"one key, many vendors": "ein Schlüssel, viele Anbieter",
"Removed from magpie": "Aus magpie entfernt",
diff --git a/internal/gui/core_budget_test.go b/internal/gui/core_budget_test.go
index 9a07dd780..59471f263 100644
--- a/internal/gui/core_budget_test.go
+++ b/internal/gui/core_budget_test.go
@@ -15,8 +15,8 @@ import (
// so a page can't quietly grow back into the core; a change that needs more
// raises them and says why in its commit.
const (
- appScriptBudget = 1_338_084 // app.js: 1,198,239 after Usage left (P2); 1,218,098 with the 10-15 fixes to pages still in the core; 1,232,466 with the provider editor's Advanced fold and every dialog holding its place, the core's own (10-16); 1,250,533 with the quota refresh kept through redraws, the core's own since the tray panel draws it too, plus 1.5% (#2397); 1,269,083 with Free first's option in the provider editor's ROUTINGS, which the Routing page reads too, plus 1.5%; 1,272,726 with the Providers page drawing its last list at once (#1519), the core's page, and the Routing trace's account names read without Object.entries (#1481), plus 1.5%; a dialog growing out of the row that opened it and folding back into it, the core's own since every page's dialogs open through it (10-20); Codex's and Claude Code's own settings moved from Settings into the agent's row on the Agents page, the core's own since the tray panel and the window both draw them (10-20); 1,314,432 with Settings › Privacy's record of what was masked (its summary, the records view and the local model's controls), which belongs to Settings, the core's own, plus 1.5%; 1,336,481 with a provider's Names & levels saying Provider in model names is Settings' and opening it there (joe), and Settings' Image recognition saying where a custom provider's model is marked (nexnull), both in the core's own pages, with no room added (10-23); 1,337,633 with Settings › Models › Replies' Intent classifier timeout (#2934, reyoung), Settings' own row, drawn by waitRow, which the Image generation timeout's row now shares, with no room added; 1,337,735 with the provider editor's link naming a partner's page by its own host (siteHost) instead of usemagpie.ai's /go link, the core's own editor, with no room added (10-23); 1,338,084 with Check in now saying what the press came to (claimed +credits, already today, not available yet) where it said "refreshed" (#3326), the check-in row the tray panel draws too, the core's own, with no room added (10-23)
- coreScriptBudget = 1_529_844 // every core script: 1,358,034 after Usage left; 1,380,003 with them; 1,405,937 with the fold; 1,426,102 with 10-16's core work (the GitHub list loading, the move to plugins, Settings › Long conversations), plus 1.5% (#2612); 1,447,368 with loadBack, the window's one state read per return, which every page needs and so is the core's own (1,446,845 before it, 155 bytes under), plus 1.5%; OpenCode Zen's card saying OpenCode tells no key its balance adds ~390 bytes inside it; 1,472,589 with the dialog that grows out of its row and the agents' own settings in their rows, on main's 10-20 core work (the Providers page's last list, the Routing trace's names), plus 1.5% (10-20); 1,506,192 with Settings › Privacy's record of what was masked, plus 1.5%; 1,529,393 with the Intent classifier timeout row (#2934), with no room added; 1,529,495 with the editor's partner link host, with no room added; 1,529,844 with Check in now's press summary (#3326), with no room added
+ appScriptBudget = 1_338_929 // app.js: 1,198,239 after Usage left (P2); 1,218,098 with the 10-15 fixes to pages still in the core; 1,232,466 with the provider editor's Advanced fold and every dialog holding its place, the core's own (10-16); 1,250,533 with the quota refresh kept through redraws, the core's own since the tray panel draws it too, plus 1.5% (#2397); 1,269,083 with Free first's option in the provider editor's ROUTINGS, which the Routing page reads too, plus 1.5%; 1,272,726 with the Providers page drawing its last list at once (#1519), the core's page, and the Routing trace's account names read without Object.entries (#1481), plus 1.5%; a dialog growing out of the row that opened it and folding back into it, the core's own since every page's dialogs open through it (10-20); Codex's and Claude Code's own settings moved from Settings into the agent's row on the Agents page, the core's own since the tray panel and the window both draw them (10-20); 1,314,432 with Settings › Privacy's record of what was masked (its summary, the records view and the local model's controls), which belongs to Settings, the core's own, plus 1.5%; 1,336,481 with a provider's Names & levels saying Provider in model names is Settings' and opening it there (joe), and Settings' Image recognition saying where a custom provider's model is marked (nexnull), both in the core's own pages, with no room added (10-23); 1,337,633 with Settings › Models › Replies' Intent classifier timeout (#2934, reyoung), Settings' own row, drawn by waitRow, which the Image generation timeout's row now shares, with no room added; 1,337,735 with the provider editor's link naming a partner's page by its own host (siteHost) instead of usemagpie.ai's /go link, the core's own editor, with no room added (10-23); 1,338,084 with Check in now saying what the press came to (claimed +credits, already today, not available yet) where it said "refreshed" (#3326), the check-in row the tray panel draws too, the core's own, with no room added (10-23); 1,338,929 with a new partner's tile keeping a small dot until it is opened, in the add sheet, the core's own, with no room added (10-23)
+ coreScriptBudget = 1_530_689 // every core script: 1,358,034 after Usage left; 1,380,003 with them; 1,405,937 with the fold; 1,426,102 with 10-16's core work (the GitHub list loading, the move to plugins, Settings › Long conversations), plus 1.5% (#2612); 1,447,368 with loadBack, the window's one state read per return, which every page needs and so is the core's own (1,446,845 before it, 155 bytes under), plus 1.5%; OpenCode Zen's card saying OpenCode tells no key its balance adds ~390 bytes inside it; 1,472,589 with the dialog that grows out of its row and the agents' own settings in their rows, on main's 10-20 core work (the Providers page's last list, the Routing trace's names), plus 1.5% (10-20); 1,506,192 with Settings › Privacy's record of what was masked, plus 1.5%; 1,529,393 with the Intent classifier timeout row (#2934), with no room added; 1,529,495 with the editor's partner link host, with no room added; 1,529,844 with Check in now's press summary (#3326), with no room added; 1,530,689 with the new partner tile's dot, with no room added
)
func TestCoreScriptBudget(t *testing.T) {
diff --git a/internal/gui/tests/partners.test.cjs b/internal/gui/tests/partners.test.cjs
index fe65184c2..516638dac 100644
--- a/internal/gui/tests/partners.test.cjs
+++ b/internal/gui/tests/partners.test.cjs
@@ -175,6 +175,42 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await add.click();
await page.locator("#addSheet .tile").first().waitFor();
assert.equal(await add.evaluate((b) => b.classList.contains("has-new")), false);
+ // each new partner's tile has its own dot, inside the tile, and one
+ // listed only in another language isn't there to have one
+ const tileDots = () => page.locator("#addSheet .tile").evaluateAll((ts) => ts.filter((x) => x.querySelector(".new-dot")).map((x) => {
+ const d = x.querySelector(".new-dot"), s = getComputedStyle(d), r = d.getBoundingClientRect(), o = x.getBoundingClientRect();
+ return { name: x.dataset.pick, w: s.width, h: s.height, bg: s.backgroundColor, inside: r.left >= o.left && r.right <= o.right && r.top >= o.top && r.bottom <= o.bottom, label: d.getAttribute("aria-label") };
+ }));
+ const want = lang === "en" ? ["Acme AI"] : ["Acme AI", "China Only"];
+ let dots = await tileDots();
+ assert.deepEqual(dots.map((d) => d.name), want);
+ for (const d of dots) {
+ assert.deepEqual([d.w, d.h, d.inside, d.label], ["6px", "6px", true, lang === "en" ? "New" : "新"]);
+ assert.notEqual(d.bg, "rgba(0, 0, 0, 0)");
+ }
+ // a dot scales in and rings once, then rests
+ await page.waitForFunction(() => !document.querySelector("#addSheet .new-dot.in"), null, { timeout: 8000 });
+ // the dots outlast the sheet showing them, closing and opening again
+ await page.keyboard.press("Escape");
+ await page.locator("#addSheet").waitFor({ state: "hidden" });
+ await add.click();
+ await page.locator("#addSheet .tile").first().waitFor();
+ assert.deepEqual((await tileDots()).map((d) => d.name), want);
+ // a dot drawn again doesn't scale in again
+ assert.equal(await page.locator("#addSheet .new-dot.in").count(), 0);
+ // opened, Acme's dot is spent; the others keep theirs, in the sheet
+ // it folds back into and in the sheet opened again
+ await page.locator('#addSheet .tile[data-pick="Acme AI"]').click();
+ await page.locator("#modal .editor").waitFor();
+ await page.keyboard.press("Escape");
+ await page.locator("#modal .editor").waitFor({ state: "detached" });
+ await page.locator('#addSheet .tile[data-pick="Acme AI"]').waitFor();
+ assert.deepEqual((await tileDots()).map((d) => d.name), want.slice(1));
+ await page.keyboard.press("Escape");
+ await page.locator("#addSheet").waitFor({ state: "hidden" });
+ await add.click();
+ await page.locator("#addSheet .tile").first().waitFor();
+ assert.deepEqual((await tileDots()).map((d) => d.name), want.slice(1));
await page.keyboard.press("Escape");
await page.locator("#addSheet").waitFor({ state: "hidden" });
assert.equal(await add.evaluate((b) => b.classList.contains("has-new")), false);