providers, settings: a Codex account's resets are used where they are shown, its Providers row and Settings' auto-use rows (roamlog, husky_bobo on X)

roamlog on X (使用重置卡的功能哪去了): the Providers page's Codex editor
showed "↺ 2 张重置卡" on each ChatGPT account, windows at 0% left, and no
way to use one. Nothing was removed: the use (askReset, resetask.js) was
only ever on the Usage card ("Use a reset") and the menu bar panel ("Use
one…"); the Providers row's chip (#813) was words. husky_bobo (X, Windows
10, v0.1.2597, 为什么我没有这个手动用卡按钮呢?) looked for it in Settings ›
Usage, under "Codex: auto-use resets" with both times on, where it never
was either.

- Providers editor: a Codex account's "↺ N resets" is a button (a span
  with role=button, the window meters' aq-set look and hover, no colour of
  its own; Enter and Space too) opening the same confirmation, its
  tooltip saying which reset a use spends. A GLM team's resets, counted
  by window and used on the vendor's page, stay words.
- The confirmation asked from the editor goes back to it on Cancel or
  once spent (ed.back, as Sign out's does): the editor is the modal, and
  closing would have closed it too.
- Settings › Usage › Codex: auto-use resets: each account holding resets
  says "↺ N resets · until … · auto-used before it expires" under its
  name with "Use a reset" beside it, read as the editor reads them
  (loginUsageOf, cached a minute), drawn again once spent. In
  autoresetown.js, loaded with those rows.
- No new strings. The core's scripts are 1,533,441 bytes, 305 under
  their size before, budget 1,533,802 not raised: a span-as-button helper
  (spanBtn) shared with windowCapMeter, and the reset helpers' comments
  cut down.

Run, at base 9d08993c8:
- mote (mote-run): providers-reset-use.test.cjs (new: 40 cases, Chromium
  and WebKit, en/zh/zh-TW/ja/de, 420 and 1000/1100 px; Providers row
  click and keyboard, Cancel spends nothing and keeps the editor, a use
  posts {user} alone and the row reads 1, the GLM chip inert, no page
  move; Settings as the Windows app (navigator.platform Win32, web:false)
  with husky_bobo's settings, both times on), reset-providers,
  codex-auto-reset-settings, codex-reset-lead, codex-auto-reset: 114 of
  114 pass. go test -tags nogui -run 'Budget|I18n|Asset|Script'
  ./internal/gui ok. gofmt -l clean.
- Whole GUI suite: on the Linux box (wsl-run, magpie-desktop), since
  mote had three other sessions' full GUI suites running; started before
  the push, its result follows in the report, reds filed on their own.

Broken by hand (red, then put back), on mote:
- origin/main's assets: the Providers cases red ("the resets are words
  only, nothing uses one"), the Settings cases red (no .ar-own-resets).
- origin/main's resetask.js with the rest of this change: Cancel closes
  the editor (chip gone), and Settings still says 2 resets after a use.

Not tried: a real reset was not spent (fixtures only); not run in the
real Windows app on xiaomi-gpu, only with Windows' navigator.platform.
This commit is contained in:
yetone
2026-11-01 20:55:02 +08:00
parent 15b035eef0
commit c0477aa728
5 changed files with 244 additions and 28 deletions
+3
View File
@@ -2049,6 +2049,9 @@ body.panel .profiles #save { height: 25px; } /* the field's: the line keeps its
.ar-own-case { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.ar-own-say { min-width: 0; color: var(--muted); font-size: 12px; text-align: right; }
.ar-own-case .segs { flex: none; }
/* the account's resets, and Use, under its name (as on its Usage card) */
.ar-own-resets { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-variant-numeric: tabular-nums; }
.ar-own-resets .text { font-size: 11px; padding: 2px 7px; }
.lib-switch.auto-reset, .lib-switch.use-credits { width: 28px; height: 16px; padding: 0; border: 0; cursor: pointer; }
.lib-switch.auto-reset i, .lib-switch.use-credits i { width: 12px; height: 12px; }
.lib-switch.auto-reset.on i, .lib-switch.use-credits.on i { transform: translateX(12px); }
+22 -25
View File
@@ -13236,7 +13236,7 @@ function renderAccounts(a, p) {
}
}
if (quota && !l.lapsed) line.querySelector(".plan").after(accountRefresh(a.agent, p, l.user));
row.append(accountQuota(l.lapsed ? { [l.user]: { error: t(l.lapsed) } } : quota, l.user, capFor, p ? (m, w) => windowCapMeter(m, p, l.user, w) : null));
row.append(accountQuota(l.lapsed ? { [l.user]: { error: t(l.lapsed) } } : quota, l.user, capFor, p ? (m, w) => windowCapMeter(m, p, l.user, w) : null, a.agent));
row.classList.add("with-aq"); // not :has(.aq), which Safari 15.0 lacks (#220)
// Remove goes under ⋯ too, but beside Sign in again while signed out
if (!row.classList.contains("signed-out")) tools.append(...line.querySelectorAll(":scope > .text.quiet"));
@@ -13698,7 +13698,7 @@ function accountRefresh(agent, p, user) {
// accountQuota: an account's allowance as a line of small meters under its
// name, the reset time on the ones nearly used up, credits and held resets.
function accountQuota(data, user, capFor = () => 0, settable = null) {
function accountQuota(data, user, capFor = () => 0, settable = null, prov) {
const line = el("div", "aq");
if (!data) {
line.append(el("span", "skeleton sk-aq"), el("span", "skeleton sk-aq"));
@@ -13710,10 +13710,15 @@ function accountQuota(data, user, capFor = () => 0, settable = null) {
line.append(el("span", "aq-asof", asOfText(q)));
}
if (q?.resets?.count && !q.error) {
const words = resetsWords(q.resets);
const resets = el("span", "aq-w aq-resets");
resets.title = tipLines(words.textContent, words.title);
// Codex's are used from here too, as on Usage (roamlog on X)
const words = resetsWords(q.resets), use = prov == "codex" && !q.resets.byWindow;
const resets = el("span", "aq-w aq-resets" + (use ? " aq-set" : ""));
resets.title = tipLines(words.textContent, words.title, use && "\n" + resetUseTitle(q));
resets.append(words.querySelector(".resets-n"));
if (use) {
spanBtn(resets).setAttribute("aria-haspopup", "dialog");
resets.onclick = (e) => { e.stopPropagation(); askReset({ ...q, provider: prov, user }); };
}
line.append(resets);
}
// an account on no plan says so, whatever else can be read of it
@@ -13973,21 +13978,12 @@ function pillNumber(at, val, ph, cls, label, parse, bad, own, set) {
}
// windowCapMeter: a window's meter on an account's row as the button that
// sets the window's own cap, in the app's menu: the account's cap, none on
// this window, a share, or one typed in place. A window of a model family
// shown as one figure (tiers) stands for several windows and isn't set
// here; one the cap doesn't count (on-demand) has none to set.
// sets the window's own cap; not a family's (tiers) or on-demand's.
function windowCapMeter(m, p, user, w) {
if (!w.capId || w.tiers) return m;
const own = windowOwnCapOf(p, user, w), cap = accountCapOf(p, user);
const name = t(w.name);
// a span acting as the button: a <button> here, a flex item of the
// wrapping meter line, leaves WebKit's row its one-line height until the
// next layout, and the row grows under the pointer at the first click
const b = el("span", m.className + " aq-set" + (own ? " own" : ""));
b.setAttribute("role", "button");
b.tabIndex = 0;
b.onkeydown = (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); b.click(); } };
const b = spanBtn(el("span", m.className + " aq-set" + (own ? " own" : "")));
b.append(...m.childNodes);
if (own) b.append(el("span", "aq-own", own >= 100 ? t("No cap") : t("Cap {n}%", { n: own })));
const reset = m.title || (w.resetsAt ? resetText(new Date(w.resetsAt), new Date(w.resetsAt).toLocaleString(intlLang())) : "");
@@ -14134,6 +14130,13 @@ function to100(v) { return Math.max(0, Math.min(100, v)); }
// quotaNoShare: no share was said (0 is one, absent is not, #3650), or the
// window is a wallet's balance (#3950): its text or figure is all there is
function quotaNoShare(w) { return !!w.text || w.used == null || w.balance != null; }
// spanBtn: a span as a button: a <button> in a wrapping line keeps WebKit's row one line high till the next layout
function spanBtn(b) {
b.tabIndex = 0;
b.setAttribute("role", "button");
b.onkeydown = (e) => { if (e.key == "Enter" || e.key == " ") { e.preventDefault(); b.click(); } };
return b;
}
function tipLines(...a) { return a.filter(Boolean).join("\n"); }
function quotaFill(w) {
if (w.used == null) return 0;
@@ -17612,10 +17615,7 @@ function panelQuotaCard(q) {
// panelOptsFolded: the panel cards, by id, whose options are folded.
const panelOptsFolded = new Set(kept("panelOptsFolded", []));
// resetsWords: a Codex account's rate-limit resets, "↺ 2 resets · until
// Sat 22:30", the date only when one of them runs out. A GLM Coding team
// plan's are counted by window, "↺ 2 five-hour resets · 1 weekly reset",
// and spent on the vendor's page, not here.
// resetsWords: "↺ 2 resets · until Sat 22:30"; a GLM team's by window.
function resetsWords(r, q) {
const w = el("span", "resets-words");
if (r.byWindow) {
@@ -17652,9 +17652,7 @@ function resetsWords(r, q) {
return w;
}
// resetsEach lists every reset left and when it runs out, a line each,
// soonest first, as the vendor said them (#960: the hover only named the
// first, which the card already shows).
// resetsEach: every reset left and when it runs out, soonest first (#960)
function resetsEach(r) {
return r.each.map((c, i) => {
const when = c.until ? new Date(c.until).toLocaleString(intlLang()) : "";
@@ -17664,8 +17662,7 @@ function resetsEach(r) {
}).join("\n");
}
// resetUseTitle says which reset a use spends: the one that runs out
// first, so no one hesitates for fear of losing one that lasts longer.
// resetUseTitle: a use spends the one that runs out first
function resetUseTitle(q) {
const r = q.resets;
return (r.until
+15
View File
@@ -18,6 +18,10 @@ window.autoResetOwnPaint = function (s) {
const users = [...(s.codexUsers || [])];
for (const u of on) if (!users.some((x) => x.toLowerCase() === u)) users.push(u);
head.hidden = !users.length;
// each account's resets, read as the providers' editor reads them,
// with Use beside them (husky_bobo on X looked for it here)
const held = users.length ? loginUsageOf("codex") : null;
if (users.length && !held) loginUsage.codex?.loading?.then(() => { if (!head.hidden && loginUsage.codex?.data) autoResetOwnPaint(prefs || s); });
let after = head;
for (const user of users) {
const r = el("div", "row pref ar-own");
@@ -26,6 +30,17 @@ window.autoResetOwnPaint = function (s) {
const name = el("div", "name", user);
name.title = user;
who.append(name);
const q = held && Object.entries(held).find(([u]) => u.toLowerCase() === user.toLowerCase())?.[1];
if (q?.resets?.count && !q.error && !q.resets.byWindow) {
const qu = { ...q, provider: "codex", user };
const sub = el("div", "sub ar-own-resets");
const use = el("button", "text", t("Use a reset"));
use.title = resetUseTitle(qu);
use.setAttribute("aria-haspopup", "dialog");
use.onclick = (e) => { e.stopPropagation(); askReset(qu); };
sub.append(resetsWords(qu.resets, qu), " ", use);
who.append(sub);
}
// each of the two times its own Off/On (#2078)
const was = on.includes(user.toLowerCase()) ? autoResetWhenOf(s.codexAutoResetOnly?.[user.toLowerCase()]) : { week: false, expiring: false };
const cases = el("div", "ar-own-cases");
+7 -3
View File
@@ -73,12 +73,14 @@ window.askResetSheet = function (q) {
go.classList.add("busy");
try {
const out = await api("usage/codex-reset", chosen ? { user: q.user || "", credit: cards[chosen].id } : { user: q.user || "" });
// the providers' editor and Settings read the account's windows
// and resets on their own, kept a minute: read again, as Usage is
// (#1491); asked from the editor, closing goes back to it
delete loginUsage.codex;
closeConfirmAsk();
status(who + ": " + resetOutcome(out), out.code === "reset" ? "ok" : "err");
// the providers' editor reads the account's windows and resets
// on its own, kept a minute: read again, as Usage is (#1491)
delete loginUsage.codex;
if (editing && view === "providers") renderProviders();
if (window.autoResetOwnPaint && $("#codexAutoResetRow")) autoResetOwnPaint(prefs);
loadQuotas();
} catch (err) {
go.disabled = false;
@@ -90,6 +92,8 @@ window.askResetSheet = function (q) {
cancel.onclick = cancelAsk;
bar.append(el("span", "grow"), cancel, go);
ed.append(bar);
// asked from a provider's editor (roamlog on X): Cancel goes back to it
if (editing && view === "providers") ed.back = renderProviders;
confirmAsk = ed;
openModal(ed);
$("#modal").classList.add("lib");
@@ -0,0 +1,197 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// A Codex account's "↺ 2 resets" on its Providers editor row uses one, as
// Usage's "Use a reset" does (roamlog on X: 使用重置卡的功能哪去了 — the
// row showed the resets and offered no way to use them). Clicked, or Enter
// on it, it opens the same confirmation; Cancel spends nothing; confirmed,
// the reset is asked for that account alone and the row reads again. A
// GLM team's resets, counted by window and used on the vendor's page, stay
// words. Settings › Usage's "Codex: auto-use resets" lists the same
// accounts, and husky_bobo (X, Windows 10) looked for the use there: each
// account holding resets says so under its name with Use beside it, both
// auto-use times on as theirs were, as the Windows app (navigator.platform
// Win32, not a web page). Every language, Chromium and WebKit, a phone's
// width and a desk's; no backend, the API is faked here and nothing real is
// spent.
const assert = require("node:assert/strict");
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 assets = path.resolve(process.env.ASSET_DIR || path.resolve(__dirname, "../assets"));
const later = new Date(Date.now() + 3 * 864e5).toISOString();
const user = "me@example.com";
function serve(lang, posts, web = true) {
let spent = false;
const windows = () => [{ name: "5 hours", used: spent ? 0 : 100, resetsAt: later }, { name: "7 days", used: spent ? 0 : 62, resetsAt: later }];
const prov = (id, name, agent, plan) => ({
id, name, icon: id, chat: "", responses: "", anthropic: "", catalog: "",
models: [{ id: "m-1", name: "", on: true }], agents: [], fallback: [], headers: {}, keyList: [], proxy: "",
account: { agent, agentName: name, user, plan, logins: [{ user, plan, active: true, on: true }] },
});
const providers = [prov("codex", "Codex", "codex", "PLUS"), prov("zcode", "GLM Team", "zcode", "TEAM")];
return async (route) => {
const req = route.request(), url = new URL(req.url());
const json = (data) => route.fulfill({ json: data });
if (url.pathname === "/boot.js") return route.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = {lang:"${lang}",theme:"light",web:${web}};` });
if (url.pathname === "/wails/runtime.js") return route.fulfill({ contentType: "text/javascript", body: "export const Window = {};" });
if (url.pathname === "/api/state") return json({ agents: [], profiles: [], settings: { lang, theme: "light", quotaLeft: true, codexAutoReset: [user], codexAutoResetOnly: {} } });
// husky_bobo's: both times on for the account
if (url.pathname === "/api/settings") return json({ lang, theme: "light", quotaLeft: true, version: "0.1.2597", dir: "~/.config/magpie", gateway: "http://127.0.0.1:3425", fx: { rate: 7.2, at: new Date().toISOString(), stale: false }, codexUsers: [user], codexAutoReset: [user], codexAutoResetOnly: {}, codexResetLead: 30 });
if (url.pathname === "/api/providers") return json({ providers, presets: [], excluded: [], gateway: { running: true, window: true } });
if (url.pathname === "/api/login/usage") {
const agent = url.searchParams.get("agent");
if (agent === "codex") return json({ [user]: { provider: "codex", windows: windows(), resets: { count: spent ? 1 : 2, until: later } } });
if (agent === "zcode") return json({ [user]: { provider: "zcode", windows: windows(), resets: { byWindow: true, count: 2, fiveHour: 1, weekly: 1, team: true } } });
return json({});
}
if (url.pathname === "/api/usage/codex-reset") {
posts.push(req.postDataJSON());
spent = true;
return json({ code: "reset", windows: 2 });
}
if (url.pathname === "/api/groups") return json({ groups: [], models: [] });
if (url.pathname === "/api/plugins") return json({ plugins: [] });
if (url.pathname.startsWith("/api/")) return json(url.pathname === "/api/usage/quotas" ? [] : {});
const file = path.join(assets, url.pathname === "/" ? "index.html" : url.pathname);
const contentType = { ".html": "text/html", ".js": "text/javascript", ".css": "text/css", ".svg": "image/svg+xml", ".png": "image/png" }[path.extname(file)];
await route.fulfill({ body: await fs.readFile(file).catch(() => ""), contentType });
};
}
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
for (const lang of ["en", "zh", "zh-TW", "ja", "de"]) {
for (const width of [420, 1000]) {
test(`${engine} ${lang} ${width}px: a Codex account's resets on its Providers row use one`, 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, height: 800 }, reducedMotion: "reduce" })).newPage();
page.setDefaultTimeout(5000);
page.setDefaultNavigationTimeout(60000);
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
const posts = [];
await page.route("**/*", serve(lang, posts));
await page.goto("http://magpie.test/?view=providers");
const w = await page.evaluate((lang) => {
const tr = (s) => (lang === "en" ? s : I18N[lang]?.[s]);
return { two: "↺ " + tr("{n} resets")?.replace("{n}", 2), one: "↺ " + tr("1 reset"), use: tr("Use a reset"), ask: tr("Use a Codex reset?"), cancel: tr("Cancel") };
}, lang);
for (const [k, v] of Object.entries(w)) assert.ok(v && !v.includes("undefined"), `${lang} has no words for ${k}`);
await page.locator(".row.provider", { hasText: "Codex" }).first().click();
const chip = page.locator(`.editor .acc[data-account-id="${user}"] .aq-resets`);
await chip.waitFor();
assert.equal((await chip.textContent()).trim(), w.two);
assert.equal(await chip.getAttribute("role"), "button", "the resets are words only, nothing uses one");
assert.equal(await chip.getAttribute("aria-haspopup"), "dialog");
// its tooltip says which one a use spends, before anything is asked
assert.match(await chip.getAttribute("title"), /\n\n/);
// the same quiet look as the window meters' buttons: no colour of its own
const look = await chip.evaluate((n) => { const s = getComputedStyle(n); return { color: s.color, border: s.borderLeftWidth, bg: s.backgroundColor }; });
const meterColor = await page.locator(`.editor .acc[data-account-id="${user}"] .aq`).evaluate((n) => getComputedStyle(n).color);
assert.equal(look.color, meterColor);
assert.equal(look.border, "0px");
assert.equal(look.bg, "rgba(0, 0, 0, 0)");
// the row stays one line high where the meters fit: the chip is no taller than the meters
const box = await chip.boundingBox();
assert.ok(box.height < 24, `chip is ${box.height}px high`);
// Cancel spends nothing
const y = await page.evaluate(() => document.scrollingElement.scrollTop);
await chip.click();
const ask = page.locator(".reset-ask");
await ask.waitFor();
assert.equal((await ask.locator(".ehead b").textContent()).trim(), w.ask);
assert.ok((await ask.textContent()).includes(user), "the confirmation doesn't name the account");
await ask.locator("button", { hasText: w.cancel }).click();
await ask.waitFor({ state: "detached" });
assert.deepEqual(posts, []);
assert.equal(await page.evaluate(() => document.scrollingElement.scrollTop), y, "the click moved the page");
// the editor is still open: the click didn't reach the row behind it
await chip.waitFor();
// from the keyboard, then confirmed: that account's reset, once
await chip.focus();
await page.keyboard.press("Enter");
await ask.waitFor();
await ask.locator("button.primary", { hasText: w.use }).click();
await ask.waitFor({ state: "detached" });
assert.deepEqual(posts, [{ user }]);
await page.waitForFunction((one) => document.querySelector('.editor .acc[data-account-id="me@example.com"] .aq-resets')?.textContent.trim() === one, w.one, { timeout: 3000 })
.catch(async () => assert.fail(`the row still says ${(await chip.textContent()).trim()}`));
// a GLM team's resets are used on the vendor's page: words only
await page.keyboard.press("Escape");
await page.locator(".editor").waitFor({ state: "detached" });
await page.locator(".row.provider", { hasText: "GLM Team" }).first().click();
const glm = page.locator(`.editor .acc[data-account-id="${user}"] .aq-resets`);
await glm.waitFor();
assert.equal(await glm.getAttribute("role"), null);
await glm.click();
assert.equal(await page.locator(".reset-ask").count(), 0);
assert.equal(posts.length, 1);
assert.deepEqual(errors, []);
});
}
}
}
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
for (const lang of ["en", "zh", "zh-TW", "ja", "de"]) {
for (const width of [420, 1100]) {
test(`${engine} ${lang} ${width}px Windows: Settings' Codex auto-use rows use a reset`, 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, height: 800 }, reducedMotion: "reduce" })).newPage();
page.setDefaultTimeout(5000);
page.setDefaultNavigationTimeout(60000);
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
const posts = [];
await page.addInitScript(() => Object.defineProperty(navigator, "platform", { value: "Win32" }));
await page.route("**/*", serve(lang, posts, false));
await watchSettingsReads(page);
await page.goto("http://magpie.test/?view=settings&tab=usage");
await settingsDrawn(page);
const w = await page.evaluate((lang) => {
const tr = (s) => (lang === "en" ? s : I18N[lang]?.[s]);
return { two: "↺ " + tr("{n} resets")?.replace("{n}", 2), one: "↺ " + tr("1 reset"), use: tr("Use a reset"), cancel: tr("Cancel"), kept: tr("auto-used before it expires") };
}, lang);
for (const [k, v] of Object.entries(w)) assert.ok(v && !v.includes("undefined"), `${lang} has no words for ${k}`);
const row = page.locator(`.ar-own[data-user="${user}"]`);
const held = row.locator(".ar-own-resets");
await held.waitFor();
assert.equal((await held.locator(".resets-n").textContent()).trim(), w.two);
assert.ok((await held.textContent()).includes(w.kept), "doesn't say the one running out is auto-used");
const use = held.locator("button", { hasText: w.use });
// nothing runs past the settings view
const over = await page.evaluate(() => {
const v = document.querySelector("#view-settings").getBoundingClientRect();
return [...document.querySelectorAll(".ar-own, .ar-own-resets, .ar-own-resets button")].filter((n) => n.getBoundingClientRect().right > v.right + 1).length;
});
assert.equal(over, 0, "a row runs past the view");
await use.click();
const ask = page.locator(".reset-ask");
await ask.waitFor();
// where the click left it (Playwright scrolls the button into view)
const top = await page.locator("#view-settings").evaluate((v) => v.scrollTop);
await ask.locator("button", { hasText: w.cancel }).click();
await ask.waitFor({ state: "detached" });
assert.deepEqual(posts, []);
assert.equal(await page.locator("#view-settings").evaluate((v) => v.scrollTop), top, "Cancel moved the page");
await use.click();
await ask.waitFor();
await ask.locator("button.primary", { hasText: w.use }).click();
await ask.waitFor({ state: "detached" });
assert.deepEqual(posts, [{ user }]);
await page.waitForFunction(({ one, user }) => document.querySelector(`.ar-own[data-user="${user}"] .ar-own-resets .resets-n`)?.textContent.trim() === one, { one: w.one, user }, { timeout: 3000 })
.catch(async () => assert.fail(`Settings still says ${(await held.textContent()).trim()}`));
assert.equal(await page.locator("#view-settings").evaluate((v) => v.scrollTop), top, "a click moved the page");
assert.deepEqual(errors, []);
});
}
}
}