Skip to content

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

settings: every row has its line and the same room above and below its words

yetone46176fc14f31
diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css
index 97c5c93f2..268d7c613 100644
--- a/internal/gui/assets/app.css
+++ b/internal/gui/assets/app.css
@@ -555,6 +555,9 @@ body.panel .list { border: 0; border-radius: 10px; box-shadow: var(--card-edge);
.row { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 5px 9px 5px 11px; }
body.window .row { min-height: 48px; padding: 7px 12px 7px 14px; gap: 12px; }
.row + .row, .editor + .row, .row + .editor { border-top: 1px solid var(--line-2); }
+/* Settings' agent-pref link box sits between two rows, empty but for a search:
+ the row after it, and its own first row, still get their line (the owner, 10-22) */
+#agentPrefLinks + .row, .row + #agentPrefLinks > .row:first-child { border-top: 1px solid var(--line-2); }
.row .ic { width: 18px; height: 18px; }
body.window .row .ic { width: 22px; height: 22px; }
.row .name { font-weight: 500; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@@ -3411,7 +3414,10 @@ body:not(.side-nav) #view-settings .set-head.stuck::before { box-shadow: 0 1px 0
/* a built-in page a plugin's page replaces steps aside in the sidebar */
#nav button[data-replaced] { display: none !important; }
img.nav-ic { border-radius: 3px; object-fit: contain; }
-.row.pref { min-height: 50px; padding: 8px 12px 8px 14px; gap: 14px; }
+/* one space above and below every row's content, a row with a line under its
+ name too: the window's 7px for every row made those read cramped beside the
+ one-line rows, which min-height centred (the owner, 10-22) */
+.row.pref, body.window .row.pref { min-height: 48px; padding: 12px 12px 12px 14px; gap: 14px; }
.row.pref .who { flex: 1 1 auto; }
.row.pref .sub { margin-top: 2px; color: var(--fg-2); }
.row.pref.font-row { flex-wrap: wrap; gap: 8px 14px; }
@@ -3439,7 +3445,7 @@ img.nav-ic { border-radius: 3px; object-fit: contain; }
#otelList .otel-stacked .segs { margin-left: 0; max-width: 100%; flex-wrap: wrap; }
#otelList .otel-env { padding: 12px 14px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); }
-.session-terminal-select, .pref-pick { max-width: min(230px, 45%); height: 29px; color: var(--fg); }
+.session-terminal-select, .pref-pick { max-width: min(230px, 45%); height: 26px; color: var(--fg); }
.session-terminal-select:focus-visible, .pref-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row.pref .segs { flex: none; margin-left: auto; }
.proxy-segs { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; min-width: 0; max-width: 100%; }
diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js
index 710a54f10..309464e02 100644
--- a/internal/gui/assets/app.js
+++ b/internal/gui/assets/app.js
@@ -23882,10 +23882,12 @@ function hold(h) {
// what was clicked moves it down rather than scrolling the view to follow
// it. Turning automatic updates off grew the Version row above the
// switch once the save answered, and the view slid 2px off its top (#2134).
- // Only while what was clicked stays under the pointer, moved by less than
- // half its height: a day picked on Routing brings its stage in above the
- // bar (~138px), and the bar is held where it was clicked (#961)
- if (h.top && want > 0 && Math.abs(d) < a[0].getBoundingClientRect().height / 2) want = 0;
+ // Only while what was clicked moved by less than its height, a line come
+ // in above it: a day picked on Routing brings its stage in above the bar
+ // (~138px), and the bar is held where it was clicked (#961). Half its
+ // height was too little once a settings row kept 12px above and below its
+ // words: the Version row's line grew it 12px past a 22px switch (10-22)
+ if (h.top && want > 0 && Math.abs(d) < a[0].getBoundingClientRect().height) want = 0;
// a view at its top when clicked stays there rather than be given room
// to scroll down: a chip saved in the panel's Profiles came in above the
// button held, and room made for the button slid the chip up under the
diff --git a/internal/gui/tests/reset-reminder.test.cjs b/internal/gui/tests/reset-reminder.test.cjs
index 6a832ff03..60b112be1 100644
--- a/internal/gui/tests/reset-reminder.test.cjs
+++ b/internal/gui/tests/reset-reminder.test.cjs
@@ -9,7 +9,7 @@ const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { chromium, webkit } = require("playwright");
-const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");
+const { watchSettingsReads, settingsDrawn, reach } = require("./reader.cjs");
const assets = path.resolve(__dirname, "../assets");
@@ -83,19 +83,25 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await page.locator("#resetReminderSegs .opt.on").textContent(), w.off);
assert.equal(await page.locator("#resetReminderRow select").count(), 0);
- await page.locator("#resetReminderRow").scrollIntoViewIfNeeded();
- await page.waitForTimeout(200);
- const top = await page.locator("#view-settings").evaluate((v) => v.scrollTop);
+ // each control wheeled wholly into sight, clear of the tabs and the
+ // window's foot, before it is clicked: Playwright's own scroll to one
+ // cut off moved the page, not the click (10-22, taller rows)
+ const scrolled = () => page.locator("#view-settings").evaluate((v) => v.scrollTop);
+ await reach(page, opts.nth(2));
+ let top = await scrolled();
await opts.nth(2).click();
assert.equal((await posted(1)).resetReminder, 24);
await page.waitForTimeout(300);
assert.equal(await page.locator("#resetReminderSegs .opt.on").textContent(), w.h(24));
+ assert.equal(await scrolled(), top, "the click moved the page");
// another setting saved later keeps it
+ await reach(page, page.locator("#currencySegs .opt", { hasText: w.cny }));
+ top = await scrolled();
await page.locator("#currencySegs .opt", { hasText: w.cny }).click();
assert.equal((await posted(2)).resetReminder, 24, "kept by another save");
await page.waitForTimeout(300);
- assert.equal(await page.locator("#view-settings").evaluate((v) => v.scrollTop), top, "no click moved the page");
+ assert.equal(await scrolled(), top, "no click moved the page");
await opts.nth(0).click();
assert.equal((await posted(3)).resetReminder, 0, "Off saves 0");
diff --git a/internal/gui/tests/settings-general.test.cjs b/internal/gui/tests/settings-general.test.cjs
index e2d85e00d..3a6358a3b 100644
--- a/internal/gui/tests/settings-general.test.cjs
+++ b/internal/gui/tests/settings-general.test.cjs
@@ -12,7 +12,11 @@
// - Language is a button (never a native <select>) showing the language;
// its menu, the app's own, lists all six, and a pick saves lang and
// draws the page in it, the button staying under the pointer;
-// - no row has a coloured stripe down its left.
+// - no row has a coloured stripe down its left;
+// - every row past the first has its line, the one after the agents' empty
+// link box too, and as much room above and below its words as any other:
+// the window's 7px left a row with a line under its name cramped, and the
+// one-line rows of one height (the owner, 10-22).
const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
const path = require("node:path");
@@ -83,6 +87,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
}),
stripes: [...document.querySelectorAll("#setPage-general .row")].filter((r) => parseFloat(getComputedStyle(r).borderLeftWidth) > 1).length,
sideways: document.documentElement.scrollWidth > innerWidth,
+ rule: [...document.querySelectorAll("#setPage-general .row.pref")].filter((r) => r.getClientRects().length).map((r, i) => {
+ const b = r.getBoundingClientRect(), w = r.querySelector(".who").getBoundingClientRect(), line = parseFloat(getComputedStyle(r).borderTopWidth);
+ const oneLine = ![...r.querySelectorAll(".who .sub")].some((s) => s.getClientRects().length && s.textContent.trim());
+ return { id: r.id || r.querySelector(".name").textContent, lined: i === 0 || line >= 1, above: w.top - b.top - line, below: b.bottom - w.bottom, height: Math.round(b.height - line), oneLine };
+ }),
};
}, [bare, kept]);
for (const [sel, subs] of rows.bare) assert.deepEqual(subs, [], `${sel}'s row says its name alone`);
@@ -96,6 +105,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
}
assert.equal(rows.stripes, 0, "a row has a stripe down its left");
assert.equal(rows.sideways, false, "the page scrolls sideways");
+ for (const r of rows.rule) {
+ assert.ok(r.lined, `${r.id} has no line above it`);
+ assert.ok(r.above >= 11.5 && r.below >= 11.5, `${r.id}'s words sit close to its lines: ${JSON.stringify(r)}`);
+ }
+ if (width === 1000) assert.equal(new Set(rows.rule.filter((r) => r.oneLine).map((r) => r.height)).size, 1, `one-line rows of more than one height: ${JSON.stringify(rows.rule)}`);
// Language: one button showing the language, the app's menu listing all six
const pick = page.locator("#langPick");
diff --git a/internal/gui/tests/turn-done.test.cjs b/internal/gui/tests/turn-done.test.cjs
index 4f1579e9f..a957a96a8 100644
--- a/internal/gui/tests/turn-done.test.cjs
+++ b/internal/gui/tests/turn-done.test.cjs
@@ -9,7 +9,7 @@ const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { chromium, webkit } = require("playwright");
-const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");
+const { watchSettingsReads, settingsDrawn, reach } = require("./reader.cjs");
const assets = path.resolve(__dirname, "../assets");
@@ -96,19 +96,25 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
});
assert.deepEqual(over, [], "nothing past the edge");
- await page.locator("#turnDoneRow").scrollIntoViewIfNeeded();
- await page.waitForTimeout(200);
- const top = await page.locator("#view-settings").evaluate((v) => v.scrollTop);
+ // each control wheeled wholly into sight, clear of the tabs and the
+ // window's foot, before it is clicked: Playwright's own scroll to one
+ // cut off moved the page, not the click (10-22, taller rows)
+ const scrolled = () => page.locator("#view-settings").evaluate((v) => v.scrollTop);
+ await reach(page, opts.nth(2));
+ let top = await scrolled();
await opts.nth(2).click();
assert.equal((await posted(1)).turnDoneAlert, 180);
await page.waitForTimeout(300);
assert.equal(await page.locator("#turnDoneSegs .opt.on").textContent(), w.m(3));
+ assert.equal(await scrolled(), top, "the click moved the page");
// another setting saved later keeps it
+ await reach(page, page.locator("#currencySegs .opt").nth(1));
+ top = await scrolled();
await page.locator("#currencySegs .opt").nth(1).click();
assert.equal((await posted(2)).turnDoneAlert, 180, "kept by another save");
await page.waitForTimeout(300);
- assert.equal(await page.locator("#view-settings").evaluate((v) => v.scrollTop), top, "no click moved the page");
+ assert.equal(await scrolled(), top, "no click moved the page");
await opts.nth(0).click();
assert.equal((await posted(3)).turnDoneAlert, 0, "Off saves 0");
diff --git a/internal/gui/tests/update-restart.test.cjs b/internal/gui/tests/update-restart.test.cjs
index 25419c511..df9c354d1 100644
--- a/internal/gui/tests/update-restart.test.cjs
+++ b/internal/gui/tests/update-restart.test.cjs
@@ -147,10 +147,10 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
// automatic updates off: kept, dimmed, says when it works
// (the version row above then says automatic updates are off, a
- // line that can grow it by a pixel or two: what is held is the
- // control clicked, where it is on the screen, unless the view is at
- // its top, which stays at its top and lets the switch move down by
- // those pixels, #2134)
+ // line that grows it about 12px: what is held is the control
+ // clicked, where it is on the screen, unless the view is at its
+ // top, which stays at its top and lets the switch move down by
+ // less than its height, #2134)
await showRow(page, auto);
const settings = page.locator("#view-settings");
const atTop = await settings.evaluate((v) => v.scrollTop < 1);
@@ -164,7 +164,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
const y1 = (await auto.locator(".opt").nth(0).boundingBox()).y;
if (atTop) {
assert.equal(await settings.evaluate((v) => v.scrollTop), 0, "a view at its top stays at its top");
- assert.ok(y1 - y0 >= -1 && y1 - y0 <= 4, `the clicked switch moved ${y1 - y0}px`);
+ const tall = (await auto.locator(".opt").nth(0).boundingBox()).height;
+ assert.ok(y1 - y0 >= -1 && y1 - y0 < tall, `the clicked switch moved ${y1 - y0}px, its height ${tall}px`);
} else assert.ok(Math.abs(y1 - y0) <= 1, `the clicked switch moved ${y1 - y0}px`);
// and off again
diff --git a/internal/gui/tests/usage-alert.test.cjs b/internal/gui/tests/usage-alert.test.cjs
index 84b9f32e7..ccedd1b70 100644
--- a/internal/gui/tests/usage-alert.test.cjs
+++ b/internal/gui/tests/usage-alert.test.cjs
@@ -12,7 +12,7 @@ const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { chromium, webkit } = require("playwright");
-const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");
+const { watchSettingsReads, settingsDrawn, reach } = require("./reader.cjs");
const assets = path.resolve(__dirname, "../assets");
@@ -138,6 +138,9 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
// scrolled down with the wheel (the rows to the middle, clear of
// the footer), turning it on moves nothing
await wheelTo(page);
+ // and the switch clear of the tabs: Playwright's own scroll to one
+ // under them moved the page, not the click (10-22, taller rows)
+ await reach(page, usageSegs.nth(1));
const before = await view(page);
assert(before > 0, "the settings list must be long enough to scroll");
await usageSegs.nth(1).click();