Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
gateway: a key's Limit and Models keep their room unhovered (#4072)
yetone96115018cf61
diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.cssindex 58965acb6..600ff792f 100644--- a/internal/gui/assets/app.css+++ b/internal/gui/assets/app.css@@ -2331,8 +2331,10 @@ body.window .ag-sk-icon { width: 22px; height: 22px; border-radius: 6px; }/* a gateway key: the copy right beside the masked key, the rest underits … (the owner: a copy out in the row's middle looked lost) */.gw-keys .acc > .plan + .copy { margin-left: -5px; }-/* narrow, the masked key gives up its room before the key's name does */-.gw-keys .acc > .plan { flex-shrink: 6; }+/* narrow, the masked key gives up its room before the key's name does.+ Not the Providers keys list's rules (.accts.keys): Limit and Models keep+ their room there while hidden, so a hover doesn't push the row about */+.gw-keys .acc > .plan { flex: 0 6 auto; min-width: 3em; overflow: hidden; text-overflow: ellipsis; }.gw-keys .gw-key-more { flex: none; color: var(--muted); }.gw-keys .gw-key-more:is(:hover, .open) { color: var(--fg); }#view-gateway .row-head, #view-usage .row-head { margin: 14px 0 6px; padding: 0 2px; }diff --git a/internal/gui/assets/plugins/gateway/keys.js b/internal/gui/assets/plugins/gateway/keys.jsindex 0f45f0eac..433d76df2 100644--- a/internal/gui/assets/plugins/gateway/keys.js+++ b/internal/gui/assets/plugins/gateway/keys.js@@ -207,7 +207,7 @@ function renderGatewayKeys() {$("#addGatewayKey").onclick = () => { gatewayKeyDraft = ""; renderGatewayKeys(); };// keys: a badge left unset folds away until the row is pointed at, as// on a provider's keys, so nothing invisible holds a place in the row- const list = el("div", "accts keys gw-keys");+ const list = el("div", "accts gw-keys");if (gatewayKeys === null) {if (gatewayKeysErr) list.append(el("div", "none", t(gatewayKeysErr))), box.append(list);return;diff --git a/internal/gui/tests/gateway-key-limit.test.cjs b/internal/gui/tests/gateway-key-limit.test.cjsindex 8cefc136f..36f576a50 100644--- a/internal/gui/tests/gateway-key-limit.test.cjs+++ b/internal/gui/tests/gateway-key-limit.test.cjs@@ -24,7 +24,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",test(`${engine} ${lang}: a gateway key's limit is shown and set with Save`, async (t) => {const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));t.after(() => browser.close());- const page = await (await browser.newContext({ viewport: { width: 1000, height: 420 }, reducedMotion: "reduce" })).newPage();+ const page = await (await browser.newContext({ viewport: { width: 1000, height: 560 }, reducedMotion: "reduce" })).newPage();page.setDefaultTimeout(6000);const events = [], errors = [];page.on("pageerror", (e) => errors.push(e.message));diff --git a/internal/gui/tests/gateway-older.test.cjs b/internal/gui/tests/gateway-older.test.cjsindex ba6598676..50fad7ad1 100644--- a/internal/gui/tests/gateway-older.test.cjs+++ b/internal/gui/tests/gateway-older.test.cjs@@ -62,14 +62,14 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",if (older) {assert.equal((await state.textContent()).trim(), c.state);assert.match(await page.locator("#gateway .sub").textContent(), c.sub);- assert(await page.locator("#gateway .dot").evaluate((d) => !d.classList.contains("on")), "the dot isn't green");+ assert(await page.locator("#gateway > .gw-mark").evaluate((d) => !d.classList.contains("on")), "the mark's light isn't green");// the whole text is there to read, nothing cut off, and the page doesn't scroll sidewaysconst fits = await page.locator("#gateway .sub").evaluate((s) => s.scrollWidth <= s.clientWidth + 1);assert(fits, "the advice is cut off");assert(await page.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth), "the page scrolls sideways");} else {assert.equal((await state.textContent()).trim(), c.same);- assert(await page.locator("#gateway .dot").evaluate((d) => d.classList.contains("on")));+ assert(await page.locator("#gateway > .gw-mark").evaluate((d) => d.classList.contains("on")));}await context.close();}diff --git a/internal/gui/tests/web-page.test.cjs b/internal/gui/tests/web-page.test.cjsindex b988f6e8a..0e3c44e17 100644--- a/internal/gui/tests/web-page.test.cjs+++ b/internal/gui/tests/web-page.test.cjs@@ -111,7 +111,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",};const { page, errors, failed, seen } = await open(true);- await page.locator("#gateway .dot").waitFor();+ await page.locator("#gateway > .gw-mark").waitFor();// the request archive's switch, over the Usage page's requestsawait page.locator('[data-view="usage"]').first().click();@@ -147,7 +147,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",// the app's window still takes its runtime, for close and maximiseconst app = await open(false);- await app.page.locator("#gateway .dot").waitFor();+ await app.page.locator("#gateway > .gw-mark").waitFor();for (let i = 0; i < 50 && !app.seen.paths.includes("/wails/runtime.js"); i++) await app.page.waitForTimeout(40);assert(app.seen.paths.includes("/wails/runtime.js"), "the app's window no longer loads its runtime");assert.deepEqual(app.errors, []);