Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
gui: a plugin's page grows to its README on a spring, not in one jump
yetone54b198c5c18d
diff --git a/internal/gui/assets/plugins.js b/internal/gui/assets/plugins.jsindex ad2435140..cafe19dd5 100644--- a/internal/gui/assets/plugins.js+++ b/internal/gui/assets/plugins.js@@ -1572,14 +1572,24 @@// the button follows an install or a sign-in made while it's openconst tick = setInterval(() => { if (!ed.isConnected) return stop(); redrawAct(); }, 600);function stop() { clearInterval(tick); }+ // the README takes the skeleton's place, and the dialog grows to it on+ // the spring it opened on, centred as it goes, not in one jump+ const fill = (n) => {+ const d = ed.parentElement, h = d.offsetHeight, y = d.style.top;+ readme.replaceChildren(n);+ if (!ed.isConnected || calm()) return;+ holdModal();+ d.animate([{ height: h + "px", top: y, overflow: "hidden" }, { height: d.offsetHeight + "px", top: d.style.top, overflow: "hidden" }], { duration: 570, easing: SPRING });+ readme.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 300, easing: "ease-out" });+ };try {const p = await api("plugins/page?name=" + encodeURIComponent(l.package));const at = l.github && !entryOf(l.package) ? l.github.pushed : p.updated;upd.textContent = at && !at.startsWith("0001") ? new Date(at).toLocaleDateString(intlLang(), { year: "numeric", month: "short", day: "numeric" }) : "—";- readme.replaceChildren(markdown(p.readme || t("No README")));+ fill(markdown(p.readme || t("No README")));} catch (e) {upd.textContent = "—";- readme.replaceChildren(el("p", "pm-note", t(l.github && isGit(l.package) && !entryOf(l.package) ? "GitHub didn't answer: {error}" : local ? "Couldn't read the folder's README: {error}" : "npm didn't answer: {error}", { error: e.message })));+ fill(el("p", "pm-note", t(l.github && isGit(l.package) && !entryOf(l.package) ? "GitHub didn't answer: {error}" : local ? "Couldn't read the folder's README: {error}" : "npm didn't answer: {error}", { error: e.message })));}}diff --git a/internal/gui/core_budget_test.go b/internal/gui/core_budget_test.goindex aba541e63..58e192df9 100644--- a/internal/gui/core_budget_test.go+++ b/internal/gui/core_budget_test.go@@ -16,7 +16,7 @@ import (// raises them and says why in its commit.const (appScriptBudget = 1_322_537 // 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); 1,343,324 with the sidebar's open-page row marked by one shape that moves on a spring (navTopGo), the window's own shell, which every page sits beside, with no room added (10-23); 1,343,465 with a dialog kept centred while its content comes in, until it is pressed (holdModal, every page's dialogs), the core's own, with no room added (10-24); 1,317,486 with what masking did moved out to Insights › Masking (plugins/redact), the budget lowered to it (10-24); 1,321,336 with Codex's one subagent model, its card's square saying plainly what each choice does and a row with a name in its sheet, where two squares read alike (the owner), the Agents page's, which the tray panel draws too, the core's own, with no room added (10-24); 1,321,424 with Settings › Models' Image generation MCP server row beside Image recognition's (JonahFu on X), the two drawn by one helper (mcpRow), Settings' own, with no room added (10-25); 1,321,994 with a provider of the user's set never to rest for a limit (zoecats), the provider editor's Advanced row, the core's own editor, with no room added (10-25); 1,322,289 with Settings › Privacy's Keep a key's form under Mask secrets (Charles Cao on X), Settings' own row, with no room added (10-25); 1,322,537 with no Codex squares beside its named settings rows (the owner), with no room added (10-25)- coreScriptBudget = 1_530_050 // 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; 1,535,084 with the sidebar's spring, with no room added; 1,549,478 with the context window card's map (tiles by tokens, the default look, the block grid a switch away) and its text view showing an inline image, in context.js, which the Routing page draws as well as Usage, so the core's own, with no room added (10-24); 1,550,768 with a usage card's refresh opening after its text (#840's card, which the tray panel draws too), the Add key spinner, and a dialog kept centred while its content comes in, with no room added (10-24); 1,524,789 with what masking did moved out to Insights › Masking, lowered to it; 1,528,525 with Codex's one subagent model, with no room added (10-24); 1,528,972 with the Image generation MCP server row (JonahFu on X), with no room added (10-25); 1,529,542 with the limit-rest row (zoecats), with no room added (10-25); 1,529,837 with Keep a key's form (Charles Cao on X), with no room added (10-25); 1,530,050 with no Codex squares beside its named settings rows (the owner), with no room added (10-25)+ coreScriptBudget = 1_530_631 // 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; 1,535,084 with the sidebar's spring, with no room added; 1,549,478 with the context window card's map (tiles by tokens, the default look, the block grid a switch away) and its text view showing an inline image, in context.js, which the Routing page draws as well as Usage, so the core's own, with no room added (10-24); 1,550,768 with a usage card's refresh opening after its text (#840's card, which the tray panel draws too), the Add key spinner, and a dialog kept centred while its content comes in, with no room added (10-24); 1,524,789 with what masking did moved out to Insights › Masking, lowered to it; 1,528,525 with Codex's one subagent model, with no room added (10-24); 1,528,972 with the Image generation MCP server row (JonahFu on X), with no room added (10-25); 1,529,542 with the limit-rest row (zoecats), with no room added (10-25); 1,529,837 with Keep a key's form (Charles Cao on X), with no room added (10-25); 1,530,050 with no Codex squares beside its named settings rows (the owner), with no room added (10-25); 1,530,631 with a plugin's page growing to its README on the dialog's spring instead of in one jump (the owner), the Plugins page's, in plugins.js, with no room added (10-25))func TestCoreScriptBudget(t *testing.T) {diff --git a/internal/gui/tests/modal-centred-late.test.cjs b/internal/gui/tests/modal-centred-late.test.cjsindex 6a15ec429..1ab71edd6 100644--- a/internal/gui/tests/modal-centred-late.test.cjs+++ b/internal/gui/tests/modal-centred-late.test.cjs@@ -91,4 +91,53 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",});}});++ test(engine + ": a dialog grows to its README over frames, centred all the way, not in one jump", async (t) => {+ const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));+ t.after(() => browser.close());+ for (const height of [820, 560]) {+ await t.test(height + "px", async () => {+ const page = await (await browser.newContext({ viewport: { width: 980, height } })).newPage();+ page.setDefaultTimeout(5000);+ const errors = [];+ page.on("pageerror", (e) => errors.push(e.message));+ let release;+ const next = new Promise((r) => { release = r; });+ await page.route("**/*", server(() => next));+ await page.goto("http://magpie.test/?view=plugins");+ await page.locator("#view-plugins .pm-find input").fill("copilot");+ const card = page.locator('.pm-card[data-pkg="opencode-copilot-auth"]');+ await card.locator(".pm-dl", { hasText: "48k/week" }).waitFor();+ await page.waitForLoadState("networkidle");+ await card.locator(".pm-sum").click();+ await page.locator("#modal .pm-detail").waitFor();+ // the open's morph over, so each frame's box is the dialog's own+ await page.waitForFunction(() => document.querySelector("#modal .dialog").getAnimations().length === 0);+ const before = await gaps(page);+ // each frame's gaps, from the README's arrival until the dialog settles+ const frames = page.evaluate(() => new Promise((done) => {+ const m = document.querySelector("#modal"), c = getComputedStyle(m), d = m.querySelector(".dialog"), out = [];+ const step = () => {+ if (d.querySelector(".pm-md")) {+ const a = m.getBoundingClientRect(), b = d.getBoundingClientRect();+ out.push({ top: b.top - a.top - parseFloat(c.paddingTop), bottom: a.bottom - parseFloat(c.paddingBottom) - b.bottom, height: b.height });+ if (out.length > 3 && !d.getAnimations().length) return done(out);+ }+ requestAnimationFrame(step);+ };+ step();+ }));+ release({ readme: readme(height > 600 ? 12 : 60), updated: "2026-09-01T00:00:00Z" });+ const seen = await frames;+ const end = seen.at(-1);+ assert(end.height > before.height + 40, `grew: ${JSON.stringify({ before, end })}`);+ // drawn at heights between the two, not the skeleton's then the README's+ const between = seen.filter((f) => f.height > before.height + 4 && f.height < end.height - 4);+ assert(between.length >= 3, `grew over frames: ${JSON.stringify(seen.map((f) => Math.round(f.height)))}`);+ for (const f of seen) assert(Math.abs(f.top - f.bottom) <= 2, `centred in every frame: ${JSON.stringify(f)}`);+ assert.deepEqual(errors, []);+ await page.context().close();+ });+ }+ });}