Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
gui: Codex's card has no subagent-model or memories square beside its settings rows
yetone3ee37aea64cf
diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.jsindex 8fa1134e1..8f75c413b 100644--- a/internal/gui/assets/app.js+++ b/internal/gui/assets/app.js@@ -423,7 +423,7 @@ function renderAgents() {// user's own)// nor Aside's account with one account only (#1499)const none = (f) => (f.key === "effort" || f.key === "ultracode" || f.label === "subagents" || f.label === SUB_EFFORT || f.label === SUB_MODEL || f.label === AUTO_MODE || f.label === MEMORIES || f.label === "sign-in" || f.key === "small" || asideAccount(a, f)) && !f.options.length && !f.value;- const shownFields = a.fields.filter((f) => !grouped(a, f) && !none(f) && !codexOwnSub(a, f));+ const shownFields = a.fields.filter((f) => !grouped(a, f) && !none(f) && !codexOwnSub(a, f) && !codexRowed(a, f));const tiers = tierMenu(a);if (tiers) shownFields.push(tiers);const sorted = shownFields.sort((x, y) => wide(y) - wide(x) || extra(x) - extra(y));@@ -650,9 +650,10 @@ function renderAgents() {// pickers keep lining up down the list// (a row whose CLI is gone has none)const setUp = state.agents.filter((a) => !a.cliMissing);- list.classList.toggle("extras", setUp.some((a) => a.fields.some(extra) || tierMenu(a) || a.launch));+ const sq = (a) => a.fields.filter((f) => extra(f) && !codexRowed(a, f));+ list.classList.toggle("extras", setUp.some((a) => sq(a).length || tierMenu(a) || a.launch));// as wide as the row with the most squares- list.style.setProperty("--extras", Math.max(1, ...setUp.map((a) => a.fields.filter((f) => extra(f) && !grouped(a, f)).length + (tierMenu(a) ? 1 : 0) + (a.launch ? 1 : 0))));+ list.style.setProperty("--extras", Math.max(1, ...setUp.map((a) => sq(a).filter((f) => !grouped(a, f)).length + (tierMenu(a) ? 1 : 0) + (a.launch ? 1 : 0))));if (!folded.length) {for (const a of used) list.append(agentRow(a));} else {@@ -3789,6 +3790,8 @@ const claudePicks = (a, f) => leadPicks(a, f) && a.id === "claude";// model of magpie's to pick there, Codex's own square stays.const codexSub = (a) => a.id.split("@wsl:")[0] === "codex" && a.fields.some((f) => f.label === SUB_MODEL && (f.options.length || f.value));const codexOwnSub = (a, f) => f.label === "subagents" && codexSub(a);+// named rows in Codex's settings: no square too (the owner, 10-25)+const codexRowed = (a, f) => a.id === "codex" && !gatewayMode && (f.label === SUB_MODEL || f.label === MEMORIES);const SAME_AS_LEAD = "Same as the lead";const SUB_MODEL_UNSET = "Each subagent runs on the lead's model ({model}), or on another the lead picks for it. Pick a model here to put every subagent on it.";const SUB_MODEL_UNSET_PLAIN = "Each subagent runs on the lead's model, or on another the lead picks for it. Pick a model here to put every subagent on it.";diff --git a/internal/gui/core_budget_test.go b/internal/gui/core_budget_test.goindex 04fc031e1..aba541e63 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_322_289 // 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)- coreScriptBudget = 1_529_837 // 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)+ 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))func TestCoreScriptBudget(t *testing.T) {diff --git a/internal/gui/tests/codex-memories-settings.test.cjs b/internal/gui/tests/codex-memories-settings.test.cjsindex d23a38256..313333d6c 100644--- a/internal/gui/tests/codex-memories-settings.test.cjs+++ b/internal/gui/tests/codex-memories-settings.test.cjs@@ -5,9 +5,10 @@// (Settings had them till the owner, 10-20). The row sits under "Codex auto-review// model" with its name alone (1ooogle on X); unset it is// Codex's own pick. It opens the app's model picker (no native select), and-// a pick posts Codex's memories field as the card's square does: the square-// lights with it, and Default picked on the square puts the row back. No-// Codex with the field: no row, and Claude Code's settings haven't it. The square's label names it. No click+// a pick posts Codex's memories field, and Default puts Codex's own back.+// The card has no square for it beside the row, the same setting twice (the+// owner, 10-25). No Codex with the field: no row, and Claude Code's settings+// haven't it. No click// scrolls the page. Chromium and WebKit, en/zh/ja/de, 440px and wide; no// backend, the API is faked here.const assert = require("node:assert/strict");@@ -15,7 +16,7 @@ const fs = require("node:fs/promises");const path = require("node:path");const { test } = require("node:test");const { chromium, webkit } = require("playwright");-const { watchSettingsReads, openAgentSettings, reach } = require("./reader.cjs");+const { watchSettingsReads, openAgentSettings } = require("./reader.cjs");const assets = path.resolve(__dirname, "../assets");const models = [{ value: "gpt-5.5", label: "GPT-5.5", ref: "openai/gpt-5.5" }, { value: "gpt-5.4-mini", label: "GPT-5.4 mini", ref: "openai/gpt-5.4-mini" }];@@ -73,17 +74,17 @@ function server(lang, sets, codex) {// the words as i18n.js has themconst W = {- en: { name: "Codex memories model", own: "Codex’s own pick", square: "Codex memories model: GPT-5.4 mini", def: "Default" },- zh: { name: "Codex 记忆整理模型", own: "由 Codex 决定", square: "Codex 记忆整理模型:GPT-5.4 mini", def: "默认" },- ja: { name: "Codex メモリ整理のモデル", own: null, square: null, def: null },- de: { name: "Codex-Modell für Erinnerungen", own: null, square: null, def: null },+ en: { name: "Codex memories model", own: "Codex’s own pick", def: "Default" },+ zh: { name: "Codex 记忆整理模型", own: "由 Codex 决定", def: "默认" },+ ja: { name: "Codex メモリ整理のモデル", own: null, def: null },+ de: { name: "Codex-Modell für Erinnerungen", own: null, def: null },};const view = (page) => page.locator("#view-agents").evaluate((v) => v.scrollTop);for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {for (const width of [440, 1100]) {for (const lang of ["en", "zh", "ja", "de"]) {- test(`${engine} ${width}px ${lang}: Codex's settings pick the model it writes its memories with, the card's square in step`, async (t) => {+ test(`${engine} ${width}px ${lang}: Codex's settings pick the model it writes its memories with, no square beside them`, async (t) => {const w = W[lang];const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));const context = await browser.newContext({ viewport: { width, height: 520 }, reducedMotion: "reduce" });@@ -143,19 +144,13 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",await page.waitForTimeout(300);assert.equal(await view(page), before, "picking a model scrolled the page");- // the card's square, on the same opened row, is the same setting,- // and says what it is- const codex = '.row.agent[data-id="codex"]';- const square = page.locator(`${codex} .extras-cell .field.extra.set[data-key="memories"]`);- await square.waitFor();- if (w.square) assert.equal(await square.getAttribute("aria-label"), w.square);- assert.equal(await square.getAttribute("title"), await square.getAttribute("aria-label"));- assert((await square.getAttribute("title")).startsWith(w.name), "the square's tooltip names it");- await reach(page, square);- await square.click();+ // the card has no square for it beside the row: that was the same+ // setting twice (the owner, 10-25). Default is picked on the row.+ assert.equal(await page.locator('.row.agent[data-id="codex"] .field[data-key="memories"]').count(), 0, "a memories square on Codex's card");+ await pick.click();await page.locator("#pop:not([hidden]) #list li").first().waitFor();await page.locator("#pop #list li").first().click();- await page.waitForFunction(() => !document.querySelector('.row.agent[data-id="codex"] .field.extra.set[data-key="memories"]'));+ for (let i = 0; i < 100 && sets.length < 2; i++) await page.waitForTimeout(50);assert.deepEqual(sets.at(-1), { agent: "codex", field: "memories", value: "" });// and the row shows Codex's own againdiff --git a/internal/gui/tests/codex-memories.test.cjs b/internal/gui/tests/codex-memories.test.cjsindex 6671d76e9..239d67f10 100644--- a/internal/gui/tests/codex-memories.test.cjs+++ b/internal/gui/tests/codex-memories.test.cjs@@ -1,8 +1,11 @@// Run with Node's test runner and Playwright on the module path; see README.md.// Codex writes its memories with models of its own (gpt-5.6-terra to// consolidate, gpt-5.6-luna to sum a thread up), whatever its model (Yc on-// Discord). The model it writes them with is a square in Codex's row, the-// [memories] extract_model and consolidation_model: unset it says what+// Discord). The model it writes them with, the [memories] extract_model and+// consolidation_model, is a named row in Codex's settings+// (codex-memories-settings), so Codex's own card has no square for it: the+// two were the same setting twice (the owner, 10-25). A Codex in WSL, which+// those settings don't read, keeps the square on its row: unset it says what// Codex uses, it opens the app's model picker (no native select) with// Default first, a model picked is posted and lights the square, and// Default posts "" to take the keys out. A click scrolls nothing, and@@ -25,6 +28,13 @@ const fresh = () => ({{ key: "memories", label: "memories", value: "", options: models },],},+ {+ id: "codex@wsl:Ubuntu-24.04", name: "Codex", path: "/wsl/config.toml", icon: "codex-color", wired: true,+ fields: [+ { key: "model", label: "model", value: "gpt-5.5", options: models },+ { key: "memories", label: "memories", value: "", options: models },+ ],+ },// nothing to pick: no square{id: "codex2", name: "Codex", path: "/test2/config.toml", icon: "codex-color", wired: false,@@ -65,11 +75,11 @@ const W = {zh: { unset: "Codex 记忆整理模型:Codex 自带的:整理用 gpt-5.6-terra,总结对话用 gpt-5.6-luna", def: "默认", set: "Codex 记忆整理模型:GPT-5.4 mini" },};-const codex = '.row.agent[data-id="codex"]';+const codex = '.row.agent[data-id="codex@wsl:Ubuntu-24.04"]';for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {for (const lang of ["en", "zh"]) {- test(`${engine} ${lang}: the model Codex writes its memories with is a square opening the model picker`, async (t) => {+ test(`${engine} ${lang}: the model Codex writes its memories with is a square opening the model picker in WSL, none on Codex's card`, async (t) => {const w = W[lang];const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));const page = await browser.newPage({ viewport: { width: 1100, height: 700 } });@@ -86,7 +96,14 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",});await page.goto("http://magpie.test/");await page.locator(codex).waitFor();+ // Codex's own card: its settings have the row, so no square here+ await page.locator('.row.agent[data-id="codex"] .ag-link').click();+ await page.locator('.row.agent[data-id="codex"] .ag-exp').waitFor();+ assert.equal(await page.locator('.row.agent[data-id="codex"] .field[data-key="memories"]').count(), 0, "Codex's card has a memories square beside its settings row");+ await page.locator('.row.agent[data-id="codex"] .ag-link').click();+ await page.locator('.row.agent[data-id="codex"]:not(.expanded)').waitFor();await page.locator(`${codex} .ag-link`).click();+ await page.locator(`${codex}.expanded > .ag-exp`).waitFor();await page.locator(`${codex} .ag-exp`).waitFor();assert.equal(await page.locator('.row.agent[data-id="codex2"] .field[data-key="memories"]').count(), 0, "a memories square with nothing to pick");@@ -111,16 +128,16 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",assert.equal(left, 0, "a coloured left border");await page.locator("#pop #list li", { hasText: "GPT-5.4 mini" }).first().click();- await page.waitForFunction(() => document.querySelector('.row.agent[data-id="codex"] .field.extra.set[data-key="memories"]'));- assert.deepEqual(sets, [{ agent: "codex", field: "memories", value: "gpt-5.4-mini" }]);+ await page.waitForFunction(() => document.querySelector('.row.agent[data-id="codex@wsl:Ubuntu-24.04"] .field.extra.set[data-key="memories"]'));+ assert.deepEqual(sets, [{ agent: "codex@wsl:Ubuntu-24.04", field: "memories", value: "gpt-5.4-mini" }]);assert.equal(await square.getAttribute("aria-label"), w.set);// Default takes the keys outawait square.click();await page.locator("#pop:not([hidden]) #list li").first().waitFor();await page.locator("#pop #list li").first().click();- await page.waitForFunction(() => !document.querySelector('.row.agent[data-id="codex"] .field.extra.set[data-key="memories"]'));- assert.deepEqual(sets.at(-1), { agent: "codex", field: "memories", value: "" });+ await page.waitForFunction(() => !document.querySelector('.row.agent[data-id="codex@wsl:Ubuntu-24.04"] .field.extra.set[data-key="memories"]'));+ assert.deepEqual(sets.at(-1), { agent: "codex@wsl:Ubuntu-24.04", field: "memories", value: "" });assert.equal(await page.evaluate(() => scrollY), y);assert.deepEqual(errors, []);});diff --git a/internal/gui/tests/codex-subagent-model.test.cjs b/internal/gui/tests/codex-subagent-model.test.cjsindex 4b344ffa3..17771d58e 100644--- a/internal/gui/tests/codex-subagent-model.test.cjs+++ b/internal/gui/tests/codex-subagent-model.test.cjs@@ -1,14 +1,17 @@// Run with Node's test runner and Playwright on the module path; see README.md.// Codex's lead picks each subagent's model itself, and Codex's own config// can't overrule it (willz on Discord), so magpie puts every Codex subagent-// on a model set in Codex's row: a square opening the app's model picker+// on a model set in Codex's settings, a named row. Codex's card has no+// square for it beside the row (the same setting twice, the owner, 10-25);+// a Codex in WSL, which those settings don't read, keeps it on its row: a+// square opening the app's model picker// (no native select) with magpie's models, another provider's too (#1633),// "Same as the lead" first. It is the one square for the subagents' model:// Codex's own subagents square, which read the same (the owner), isn't// drawn, and a model left in Codex's config by it is said on this one and// lights it till a pick here takes it away. Each title says plainly what// the choice does. A model picked is posted and lights the square; Same as-// the lead posts "". Codex's sheet has the same setting as a named row. The Routing page's story of a subagent's request says it was+// the lead posts "". The row in Codex's sheet picks the same way. The Routing page's story of a subagent's request says it was// put on that model, or why it stayed on the one asked for (a task sealed// for ChatGPT accounts, the model set another provider's). A click scrolls nothing, nothing has a coloured left// border, and the row fits a narrow window, in every language. No backend:@@ -36,6 +39,14 @@ const fresh = () => ({{ key: "subagent_model", label: "subagent model", value: "", options: chatgpt },],},+ {+ id: "codex@wsl:Ubuntu-24.04", name: "Codex", path: "/wsl/config.toml", icon: "codex-color", wired: true,+ fields: [+ { key: "model", label: "model", value: "gpt-5.5", options: own },+ { key: "subagent", label: "subagents", value: "gpt-5.4-mini", options: own },+ { key: "subagent_model", label: "subagent model", value: "", options: chatgpt },+ ],+ },// no ChatGPT account in magpie: no square{id: "codex2", name: "Codex", path: "/test2/config.toml", icon: "codex-color", wired: false,@@ -130,14 +141,15 @@ const W = {sealed: "Codex hat einen Subagent mit gpt-5.5 angefordert, und er blieb dort: Seine Subagenten sind auf token/gpt-6.1-sol gesetzt, aber seine Aufgabe wurde vom ChatGPT-Backend versiegelt, das seinen Lead beantwortet hat, und nur ein ChatGPT-Konto kann sie öffnen." },};-const codex = '.row.agent[data-id="codex"]';+const codex = '.row.agent[data-id="codex@wsl:Ubuntu-24.04"]';+const wsl = "codex@wsl:Ubuntu-24.04";const engines = process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"];const langs = process.env.LANGS ? process.env.LANGS.split(",") : Object.keys(W);for (const engine of engines) {for (const lang of langs) {for (const width of [1100, 560]) {- test(`${engine} ${lang} ${width}px: Codex's subagent model is a square opening magpie's models, a ChatGPT account's first`, async (t) => {+ test(`${engine} ${lang} ${width}px: Codex's subagent model opens magpie's models, a ChatGPT account's first, a square only in WSL`, async (t) => {const w = W[lang];const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));const page = await browser.newPage({ viewport: { width, height: 760 } });@@ -154,7 +166,15 @@ for (const engine of engines) {});await page.goto("http://magpie.test/");await page.locator(codex).waitFor();+ // Codex's own card: its settings have the row, so no square here+ await page.locator('.row.agent[data-id="codex"] .ag-link').click();+ await page.locator('.row.agent[data-id="codex"] .ag-exp').waitFor();+ assert.equal(await page.locator('.row.agent[data-id="codex"] .field[data-key="subagent_model"]').count(), 0, "a subagent model square on Codex's card beside its settings row");+ assert.equal(await page.locator('.row.agent[data-id="codex"] .field[data-key="subagent"]').count(), 0, "Codex's own subagents square");+ await page.locator('.row.agent[data-id="codex"] .ag-link').click();+ await page.locator('.row.agent[data-id="codex"]:not(.expanded)').waitFor();await page.locator(`${codex} .ag-link`).click();+ await page.locator(`${codex}.expanded > .ag-exp`).waitFor();await page.locator(`${codex} .ag-exp`).waitFor();assert.equal(await page.locator('.row.agent[data-id="codex2"] .field[data-key="subagent_model"]').count(), 0, "a square with nothing to pick");@@ -191,27 +211,37 @@ for (const engine of engines) {assert.equal(left, 0, "a coloured left border");await page.locator("#pop #list li", { hasText: "GPT-6 Astra" }).first().click();- await page.waitForFunction(() => document.querySelector('.row.agent[data-id="codex"] .field.extra.set[data-key="subagent_model"]'));- assert.deepEqual(sets, [{ agent: "codex", field: "subagent_model", value: "codex/gpt-6-astra" }]);+ await page.waitForFunction(() => document.querySelector('.row.agent[data-id="codex@wsl:Ubuntu-24.04"] .field.extra.set[data-key="subagent_model"]'));+ assert.deepEqual(sets, [{ agent: wsl, field: "subagent_model", value: "codex/gpt-6-astra" }]);assert.equal(await square.getAttribute("aria-label"), w.set + "\n" + w.setLine);- // Codex's sheet has it as a row with a name, the same setting- const pick = page.locator("#codexSubagentModelRow button");- await pick.waitFor();- assert.equal((await page.locator("#codexSubagentModelRow .name").textContent()).trim(), w.row);- assert.equal((await pick.textContent()).trim(), "GPT-6 Astra");- assert.equal(await page.locator("#codexSubagentModelRow .who").getAttribute("title"), w.setLine);// Same as the lead: every subagent on the model asked for again, and// Codex's config no longer has oneawait square.click();await page.locator("#pop:not([hidden]) #list li").first().waitFor();await page.locator("#pop #list li").first().click();- await page.waitForFunction(() => !document.querySelector('.row.agent[data-id="codex"] .field.extra.set[data-key="subagent_model"]'));- assert.deepEqual(sets.at(-1), { agent: "codex", field: "subagent_model", value: "" });+ await page.waitForFunction(() => !document.querySelector('.row.agent[data-id="codex@wsl:Ubuntu-24.04"] .field.extra.set[data-key="subagent_model"]'));+ assert.deepEqual(sets.at(-1), { agent: wsl, field: "subagent_model", value: "" });assert.equal(await square.getAttribute("aria-label"), w.unset + "\n" + w.line);- assert.equal((await pick.textContent()).trim(), w.def);assert.equal(await page.evaluate(() => scrollY), y);+ // Codex's sheet has it as a row with a name: where Codex's own is+ // picked+ const pick = page.locator("#codexSubagentModelRow button");+ await pick.waitFor();+ assert.equal((await page.locator("#codexSubagentModelRow .name").textContent()).trim(), w.row);+ await pick.click();+ await page.locator("#pop:not([hidden]) #list li").first().waitFor();+ await page.locator("#pop #list li", { hasText: "GPT-6 Astra" }).first().click();+ await page.locator("#codexSubagentModelRow button", { hasText: "GPT-6 Astra" }).waitFor();+ assert.deepEqual(sets.at(-1), { agent: "codex", field: "subagent_model", value: "codex/gpt-6-astra" });+ assert.equal(await page.locator("#codexSubagentModelRow .who").getAttribute("title"), w.setLine);+ await pick.click();+ await page.locator("#pop:not([hidden]) #list li").first().waitFor();+ await page.locator("#pop #list li").first().click();+ await page.locator("#codexSubagentModelRow button", { hasText: w.def }).waitFor();+ assert.deepEqual(sets.at(-1), { agent: "codex", field: "subagent_model", value: "" });+// the Routing page's story: put on the model set, or why not// (each from the list afresh: a narrow window shows the story over it)for (const [i, said] of [[0, w.moved], [1, w.kept], [2, w.sealed]]) {