gui: Settings › General says each setting's name alone where it says enough, and Language is one menu (1ooogle on X)

1ooogle's mockup on X redrew Settings › General the way macOS System
Settings reads it. The owner approved, and this follows it.

Rows that now show only their name:
- Appearance, Text size, Interface and Code font, the tray click,
  Provider in model names, the Codex titles, auto-review and memories
  model rows, Open at login and Show in Dock.
- A font row's line shows only while its fonts are loading or have
  failed.
- The text size keys (⌘0 / Ctrl+0) move into the choices' tooltip.

Rows that keep one short line, because the name alone doesn't explain
the setting or what it costs:
- Codex subagents, Long conversations, Lightweight mode, Prevent sleep
  and Session terminal.

Renames:
- "Tray icon" becomes "Click the tray icon to", with the choices "Open
  the quick panel" and "Open the main window" (点击托盘图标: 打开快捷面板 /
  打开主窗口).
- "Keep awake while agents work" becomes "Prevent sleep" (防止休眠: 在
  magpie 运行任务时,让电脑保持唤醒状态).
- "Dock" becomes "Show in Dock" (显示程序坞).

Language is one button showing the language picked (renderLangPick).
It opens in the app's own menu (openProtoMenu, styled like Session
terminal's sess-pick), not a native <select> and not six segments.

Every language gets the same text: en, zh, zh-TW, ja and de. The 25
strings no longer used are removed from all four translations.

Tests:
- New: settings-general.test.cjs. In Chromium and WebKit, en, zh,
  zh-TW, ja and de, at 1000 and 440 px, on a Mac, it checks that:
  - the rows that should show only their name have no line;
  - the kept lines are one line each, and none is cut short at 1000px;
  - Language is a button showing the language, and its menu lists all
    six;
  - a pick saves lang and redraws the page in that language, with the
    button staying under the pointer;
  - nothing has a left stripe and nothing scrolls sideways.
  I broke it by hand twice and saw it fail both times: once by giving
  the Dock row a line back, once by making the pick save nothing.
- Updated to the new text and controls: codex-titles,
  codex-auto-review, codex-memories-settings, model-suffix-own,
  plain-names, lightweight, keep-awake, text-size, gateway-mode,
  omarchy, settings-search, gui-zh-tw (Language's button and menu fit
  at 1000/440px), header-relang (picks through the menu) and
  readable-focus (the first shown line).
- German's long-conversations line was shortened to fit on one line at
  1000px.

What was run:
- go test -tags nogui ./internal/gui passes; gofmt -l is clean; go vet
  passes on darwin, linux and windows.
- The whole GUI suite (601 files, --test-concurrency=4): 6584 passed,
  33 failed. Every failing file was then run alone:
  - mobile-web fails on purpose. It compares desktop screenshots with
    origin/main, and only the Settings page differs.
  - routing-group-fold, text-size, routing-sessions and pick-skills
    are #1672; searcher-pick is #1745. Each also fails alone on
    origin/main 260ded9af.
  - routing-provider-off, routing-steady and usage-sum-whole pass when
    run alone, both here and on main.
- Screenshots before and after (zh, en and de light at 1000px, zh at
  440px, zh dark) were looked at.

Not tried in the real Wails window.
This commit is contained in:
yetone
2026-10-12 22:51:53 +08:00
parent e3a497d7a2
commit f36e744c30
22 changed files with 294 additions and 191 deletions
+2 -1
View File
@@ -27,7 +27,7 @@ three.
4. The page reads `GET /api/state` and writes through `POST` routes. Each write answers with the new state, built under `held`.
5. Closing the window hides it. On the Mac a full-screen window first leaves full screen (`closeStep`). The system's close on the panel (a title bar's X, Alt+F4, a window manager's close key) hides it as Escape does, so the tray icon opens it again; a panel lightweight mode let go, no longer `h.panel`, closes (`makePanel`, `TestPanelCloseHidesIt`). Lightweight mode lets go only of a window closed this way: one covered by another app's window, minimised, or open as magpie was hidden is still open (`windowUp`, not Wails' `IsVisible`, which is the occlusion state), and so is it for the Dock while the window is open and for a restart (#1381, `TestCoveredWindowStaysUp`). On the Mac the tray icon and a usage cell close an open panel by the same test (`windowOpen` in `togglePanelNow` and `trayCellClick`, not Wails' `ToggleWindow`), so under a window over the whole screen, such as a remote-desktop server's privacy curtain, the icon still closes the panel instead of showing it again (#1661, `TestTrayCellClickReleasedPanel`).
6. The window opens as it was last left. Its settled size and whether it was maximised are kept in `settings.Window` and `settings.WindowMaximised` (`settle`; per machine, see `KeepOwn`). A maximised window keeps the size it restores to. `makeMain` opens it at that size (`openSize`). On its first show, `placeMain` maximises it again on the Mac and Windows (on Windows once the page has come). On Linux, `makeMain` makes it maximised with `StartState`. On Windows a size larger than the screen's work area is fitted and centred (`fitRoom`), and the larger size stays kept. The window's position is not kept.
7. On the Mac, Settings › Dock puts magpie in the Dock never (the default: out of the Dock, and so out of Command-Tab), while the window is open (`DockWindow`) or always (`Dock`); a full-screen window joins it whatever the setting (`inDock`, `dockOnFullscreen`). `openMain` joins before it shows the window (`setDock` runs on the main thread at once). An app activated out of the Dock (the quick panel's focus) that then joins it stays last in Command-Tab's order though it is in front, so joining to the front activates magpie by way of the Dock (`dockStep`, `activateAgain`; #1381, `TestDockStep`, `TestDockJoinLeadsCommandTab`). It does so without asking NSApp whether magpie is active: the Mac makes it the front app at once, and NSApp says so only once the main thread has taken that in, after the join on a busy Mac (#1651).
7. On the Mac, Settings › Show in Dock puts magpie in the Dock never (the default: out of the Dock, and so out of Command-Tab), while the window is open (`DockWindow`) or always (`Dock`); a full-screen window joins it whatever the setting (`inDock`, `dockOnFullscreen`). `openMain` joins before it shows the window (`setDock` runs on the main thread at once). An app activated out of the Dock (the quick panel's focus) that then joins it stays last in Command-Tab's order though it is in front, so joining to the front activates magpie by way of the Dock (`dockStep`, `activateAgain`; #1381, `TestDockStep`, `TestDockJoinLeadsCommandTab`). It does so without asking NSApp whether magpie is active: the Mac makes it the front app at once, and NSApp says so only once the main thread has taken that in, after the join on a busy Mac (#1651).
## Constraints and failure behavior
@@ -148,6 +148,7 @@ retry after a failed read. See `TestRecentCallBodiesOnDemand` and
### Shared UI rules
- Settings → General is laid out as macOS System Settings is (1ooogle on X): a row says its name alone when that says enough (Appearance, Language, Text size, the fonts, the tray click, the Codex model rows, Open at login, Show in Dock), and keeps one short line where the setting isn't clear from its name or has a consequence (Long conversations, Lightweight mode, Prevent sleep, Session terminal, Codex subagents). A font row's line shows only while its fonts load or fail; the text size keys are the choices' tooltip. Language is one menu button showing the language picked, opened in the app's menu (`renderLangPick`). See `settings-general.test.cjs`.
- Settings' search-provider picker offers **Off**, saved as `searcher: "off"`. Its help explains API-only search and suppresses provider fallback/own-search hints while off; the search priority row is hidden because no provider competes with the APIs. See [gateway search behavior](gateway-routing.md#turning-provider-search-off), [`renderSearcher`](../../internal/gui/assets/app.js), `TestSettingsSearchProviderOff` and `searcher-pick.test.cjs`.
- Settings' Search APIs add row has a base URL field under the key for every API (#1580): the vendor's own address is its placeholder, picking an API already added fills in its saved URL so a new key alone keeps it, and Add with no key changes only the URL. See [a search API's base URL](gateway-routing.md#a-search-apis-base-url), [`renderSearch`](../../internal/gui/assets/app.js) and `search-api.test.cjs`.
- Every user-visible string has zh, zh-TW, ja and de translations with the same placeholders. `gui-zh-tw.test.cjs`, `gui-ja.test.cjs` and `gui-de.test.cjs` fail on a missing one; `gui-zh-tw.test.cjs` also fails on a zh-TW string with a Simplified character left in it.
+1 -1
View File
@@ -481,7 +481,7 @@ func Run(version string, showMain bool, link string) error {
go h.lighten()
h.watchAlerts()
// the quick panel by the icon, or the main window if the user would
// rather (Settings → Tray icon)
// rather (Settings → Click the tray icon to)
h.tray.OnClick(func() {
if cmdClick() {
return // Command-drag moves the icon; the system handles it
+2 -2
View File
@@ -2972,8 +2972,8 @@ body.window .ag-sk-icon { width: 22px; height: 22px; border-radius: 6px; }
#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 { max-width: min(230px, 45%); height: 29px; color: var(--fg); }
.session-terminal-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.session-terminal-select, .pref-pick { max-width: min(230px, 45%); height: 29px; 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; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.proxy-segs input.proxy, input.words { width: 180px; min-width: 0; height: 27px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; outline: none; transition: border-color .12s, box-shadow .12s; }
+28 -13
View File
@@ -19880,7 +19880,7 @@ $("#sessQ").onkeydown = (e) => { if (e.key === "Escape" && e.target.value) { e.s
const THEMES = [["system", "System"], ["light", "Light"], ["dark", "Dark"]];
const LOCALES = [["system", "System"], ["en", "English"], ["zh", "简体中文"], ["zh-TW", "繁體中文"], ["ja", "日本語"], ["de", "Deutsch"]];
const TRAYS = [["panel", "Quick panel"], ["window", "Main window"]];
const TRAYS = [["panel", "Open the quick panel"], ["window", "Open the main window"]];
const CURRENCIES = [["usd", "$ USD"], ["cny", "¥ CNY"]];
// The text size is the windows' own zoom, as a browser's Ctrl/Cmd +: the
// page is laid out again in larger CSS pixels, so everything it measures is
@@ -20003,7 +20003,9 @@ function renderFonts(s) {
const missing = chosen && !window.desktopFonts.available(chosen);
const note = row.querySelector(".font-note");
note.textContent = fontListError ? t("Couldn't read installed fonts") : fontFlight ? t("Loading…")
: missing ? t("Font unavailable; using system default") : fontList?.length === 0 ? t("No installed fonts found") : t("Saved only on this computer");
: missing ? t("Font unavailable; using system default") : fontList?.length === 0 ? t("No installed fonts found") : "";
// a line only when something is wrong or still coming (1ooogle on X)
note.hidden = !note.textContent;
note.classList.toggle("err", fontListError || !!missing);
const pill = row.querySelector(".font-family"), style = row.querySelector(".font-style");
const paint = (button, text, name) => {
@@ -20455,11 +20457,12 @@ function renderSettings() {
prefsBase = keep;
renderFonts(s);
$("#themeSegs").replaceChildren(segs(THEMES.map(([id, name]) => [id, t(name)]), s.theme, (theme) => savePrefs({ ...keep, theme })));
$("#langSegs").replaceChildren(segs(LOCALES.map(([id, name]) => [id, t(name)]), s.lang, (lang) => savePrefs({ ...keep, lang })));
renderLangPick(s, keep);
renderGatewayMode(s);
// a browser tab has its own zoom, and magpie leaves it to it
$("#textSizeRow").hidden = web;
$("#textSizeSub").textContent = t("Everything in magpie's windows, larger; {keys} too", { keys: textSizeKeys() });
// the keys that do it too, kept in the choices' tooltip, the row saying no more than its name
$("#textSizeSegs").title = t("Everything in magpie's windows, larger; {keys} too", { keys: textSizeKeys() });
$("#textSizeSegs").replaceChildren(segs(TEXT_SIZES.map((n) => [n, n + "%"]), s.textSize || 100, (n) => setTextSize(n)));
$("#traySegs").replaceChildren(segs(TRAYS.map(([id, name]) => [id, t(name)]), s.tray || "panel", (tray) => savePrefs({ ...keep, tray })));
// the Dock is the Mac's; the tray and the login item the app's
@@ -20478,8 +20481,8 @@ function renderSettings() {
// its line says what the choice does; data-en keeps a language change on it
const awakeSub = $("#keepAwakeRow .sub");
awakeSub.dataset.en = s.keepAwake && s.keepAwakeDisplay
? "Keeps this computer from going to sleep and its display on while agents work through magpie and for ten minutes after"
: "Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off";
? "Keeps this computer and its screen awake while magpie runs tasks"
: "Keeps this computer awake while magpie runs tasks";
awakeSub.textContent = t(awakeSub.dataset.en);
// WSL's distros, looked in on Windows unless turned off (#1264)
$("#wslAgentsRow").hidden = !s.wsl;
@@ -20653,6 +20656,25 @@ function renderGatewayMode(s) {
$("#gatewayModeSub").textContent = [t("Only what a gateway for other computers needs: no Agents or Library, nor this computer's agents' settings"), now].filter(Boolean).join(" · ");
}
// renderLangPick: Settings' language, one menu button showing the language
// picked (1ooogle on X), the app's own menu rather than six segments.
function renderLangPick(s, keep) {
const b = $("#langPick");
const chosen = LOCALES.some(([id]) => id === s.lang) ? s.lang : "system";
const name = (id) => { const n = LOCALES.find((l) => l[0] === id)[1]; return id === "system" ? t(n) : n; };
b.dataset.value = chosen;
b.setAttribute("aria-label", t("Language"));
b.replaceChildren(el("span", "", name(chosen)), svg(CHEV, 11, 1.6));
b.onclick = (e) => {
e.stopPropagation();
if (b.classList.contains("open")) return closeProtoMenu();
openProtoMenu(b, LOCALES.map(([id]) => ({ v: id, name: name(id), note: "", literalName: true })), chosen, (v) => {
if (v === chosen) return;
savePrefs({ ...keep, lang: v });
}, "Language", "sess-menu", "right");
};
}
function renderSessionTerminal(s, keep) {
const row = $("#sessionTerminalRow");
row.hidden = !document.body.classList.contains("mac");
@@ -21549,9 +21571,6 @@ function renderCodexTitles(s) {
return m ? `${m.name || m.id} · ${m.providerName}` : id;
};
const v = s.codexTitles || "";
$("#codexTitlesSub").textContent = v === "off" ? t("Codex’s title requests are answered by magpie with no title and sent nowhere; new threads stay unnamed")
: v ? t("Codex’s title requests go to this model, not to its ChatGPT sign-in; the Usage and Routing views still show them as titles")
: t("Codex asks its own model for each thread’s title through its ChatGPT sign-in, even while the conversation is on magpie’s models");
const b = el("button", "rt-cond on");
b.type = "button";
b.setAttribute("aria-label", t("Codex thread titles"));
@@ -21578,8 +21597,6 @@ function renderCodexAutoReview(s) {
const models = s.titleModels || [];
const v = s.codexAutoReview || "";
const m = models.find((x) => x.id === v);
$("#codexAutoReviewSub").textContent = v ? t("Codex’s auto-review decides approvals on this model, whatever model the conversation is on")
: t("Codex’s auto-review decides approvals on codex-auto-review when it has it, else on the conversation’s model at low effort");
const b = el("button", "rt-cond on");
b.type = "button";
b.setAttribute("aria-label", t("Codex auto-review model"));
@@ -21610,8 +21627,6 @@ function renderCodexMemories() {
row.hidden = gatewayMode || !f || (!f.options.length && !f.value);
if (row.hidden) return;
const opt = optionFor(f, f.value);
$("#codexMemoriesSub").textContent = f.value ? t("Codex sums threads up and folds them into its memories with this model, whatever model the conversation is on")
: t("Codex sums threads up and folds them into its memories with its own models, gpt-5.6-luna and gpt-5.6-terra, whatever model the conversation is on");
const b = el("button", "rt-cond on");
b.type = "button";
b.setAttribute("aria-label", t("Codex memories model"));
+44 -100
View File
@@ -223,7 +223,6 @@ const I18N = {
"Refresh fonts": "刷新字体列表",
"Couldn't read installed fonts": "无法读取已安装字体",
"Font unavailable; using system default": "字体不可用,暂用系统默认",
"Saved only on this computer": "仅保存在当前电脑",
"Aa 0123 · 中文": "Aa 0123 · 中文",
"Give skills as": "Skills 启用方式",
"Links": "符号链接",
@@ -690,31 +689,28 @@ const I18N = {
"Add it back": "加回来",
"Don't remind me": "不再提示",
"Hide this line; Add a provider still offers it back": "收起这行提示;之后仍可在「添加供应商」里加回来",
"Tray icon": "托盘图标",
"Click the tray icon to": "点击托盘图标",
"Open the quick panel": "打开快捷面板",
"Open the main window": "打开主窗口",
"Bar icon": "状态栏图标",
"magpie’s icon beside Omarchy’s own in the bar; right-click opens the window": "把 magpie 图标放进 Omarchy 状态栏,与系统图标并排;右键打开窗口",
"Dock": "程序坞",
"Show in Dock": "显示程序坞",
"Open at login": "开机自启",
"Start magpie in the tray when you log in, so agents find the gateway from the start": "登录时在托盘启动 magpie,Agent 一开始就能连上网关",
"move magpie to Applications first, then turn this on": "请先把 magpie 移到「应用程序」文件夹,再打开这个选项",
"Keep magpie in the Dock too, always or while its window is open, for Cmd-Tab and a menu bar too full to show its icon": "程序坞中也显示 magpie(常驻或仅在窗口打开时),便于 Cmd-Tab 切换,菜单栏图标被挤掉时也能打开",
"Lightweight mode": "轻量模式",
"Keep awake while agents work": "防止睡眠(Agent 工作时)",
"Prevent sleep": "防止休眠",
"Keeps this computer awake while magpie runs tasks": "在 magpie 运行任务时,让电脑保持唤醒状态",
"Keeps this computer and its screen awake while magpie runs tasks": "在 magpie 运行任务时,让电脑和屏幕保持唤醒状态",
"Detect agents in WSL": "检测 WSL 中的 Agent",
"Looks in running WSL distros for agents to set up, their sessions and Claude Code; off, WSL is never asked anything and the agents found there are no longer shown": "在运行中的 WSL 发行版里查找可接入的 Agent、它们的会话和 Claude Code;关闭后不再向 WSL 询问任何内容,之前在那里找到的 Agent 也不再显示",
"Screen on too": "屏幕也常亮",
"Keeps this computer from going to sleep and its display on while agents work through magpie and for ten minutes after": "Agent 通过 magpie 工作时及之后十分钟内,阻止这台电脑睡眠,屏幕也保持常亮、不锁屏",
"Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off": "Agent 通过 magpie 工作时及之后十分钟内,阻止这台电脑自动睡眠;屏幕仍可能关闭",
"Gateway mode": "网关模式",
"Only what a gateway for other computers needs: no Agents or Library, nor this computer's agents' settings": "只显示给其他电脑当网关所需的内容:不显示 Agent 和资源库,也不显示本机 Agent 的设置",
"Now on: magpie web was started with --gateway": "当前开启:magpie web 以 --gateway 启动",
"Now on: no agents on this computer": "当前开启:本机没有 Agent",
"Now off: agents found on this computer": "当前关闭:本机找到了 Agent",
"A closed panel or window frees its page after a minute, about 100 MB each, and loads it anew when opened": "面板或窗口关闭约一分钟后释放其网页(每个约 100 MB),再次打开时重新加载",
"A closed panel or window frees about 100 MB after a minute; opening it loads it again": "面板或窗口关闭一分钟后释放约 100 MB,再次打开时重新加载",
"With window": "跟随窗口",
"What clicking magpie’s icon in the menu bar or tray opens": "点击菜单栏或托盘里的 magpie 图标时打开什么",
"Quick panel": "快捷面板",
"Main window": "主窗口",
"Proxy": "代理",
"Requests to vendors and update checks go through {proxy}": "对模型厂商的请求和检查更新都经由 {proxy}",
"Following the system proxy, {proxy}": "跟随系统代理:{proxy}",
@@ -837,7 +833,6 @@ const I18N = {
"Share used": "已用比例",
"Amount": "金额",
"Provider in model names": "模型名带供应商",
"Agents’ lists put each model’s provider after its name, or not after names you set": "Agent 的模型列表在模型名后带上供应商,可设为自定义名称不带",
"Not on names I set": "自定义名称不带供应商",
"Agents’ lists show “{label}”": "Agent 的模型列表里显示为「{label}」",
"In agents’ lists": "Agent 列表里的名称",
@@ -846,8 +841,8 @@ const I18N = {
"“· routing group” is set for every group above": "是否带「· routing group」在上方统一设置,对所有路由组生效",
"Codex subagents on any model": "Codex 子代理可用任意模型",
"Long conversations": "长对话",
"Codex and Claude Code compact a conversation at 272K tokens, or the size typed here, on a model with a larger window, unless its provider has a Compact at of its own; in Claude Code a Claude model runs to its own window, 1M for a [1m] one, as Anthropic runs it. The model’s full window lets any conversation grow further, with every turn slower and costlier": "模型窗口超过 272K(或这里填的大小)时,Codex 和 Claude Code 在该处压缩对话,供应商设了自己的「压缩阈值」时以供应商的为准;Claude Code 中的 Claude 模型按自身窗口([1m] 为 1M),与 Anthropic 官方一致。使用完整窗口可让对话更长,但每轮更慢、更贵",
"Full window": "完整窗口",
"Codex and Claude Code compact at 272K or the size typed; a full window makes turns slower and costlier": "Codex 和 Claude Code 在 272K(或这里填的大小)时压缩;用完整窗口则每轮更慢更贵",
"Compact at {n}": "{n} 时压缩",
"Codex thread titles": "Codex 会话标题",
"Codex’s own (ChatGPT)": "Codex 自带(ChatGPT)",
@@ -855,16 +850,9 @@ const I18N = {
"Codex auto-review model": "Codex 自动审批模型",
"Codex’s own pick": "由 Codex 决定",
"as Codex picks it": "按 Codex 默认选择",
"Codex’s auto-review decides approvals on this model, whatever model the conversation is on": "Codex 的自动审批(auto-review)用这个模型决定是否批准,不论对话用的是哪个模型",
"Codex memories model": "Codex 记忆整理模型",
"Codex sums threads up and folds them into its memories with this model, whatever model the conversation is on": "Codex 用这个模型总结对话、整理成记忆,不论对话用的是哪个模型",
"Codex sums threads up and folds them into its memories with its own models, gpt-5.6-luna and gpt-5.6-terra, whatever model the conversation is on": "Codex 用自带的 gpt-5.6-luna 和 gpt-5.6-terra 总结对话、整理成记忆,不论对话用的是哪个模型",
"Codex’s auto-review decides approvals on codex-auto-review when it has it, else on the conversation’s model at low effort": "Codex 的自动审批(auto-review)有 codex-auto-review 时用它,否则用当前对话的模型(low 推理强度)",
"no title, nothing sent": "不生成标题,不发出请求",
"Codex asks its own model for each thread’s title through its ChatGPT sign-in, even while the conversation is on magpie’s models": "Codex 经 ChatGPT 登录用自带模型为每个会话生成标题,即使对话用的是 magpie 的模型",
"Codex’s title requests are answered by magpie with no title and sent nowhere; new threads stay unnamed": "Codex 的标题请求由 magpie 回复空标题,不外发;新会话不自动命名",
"Codex’s title requests go to this model, not to its ChatGPT sign-in; the Usage and Routing views still show them as titles": "Codex 的标题请求改由此模型生成,不经 ChatGPT 登录;用量和路由页仍记为标题请求",
"Codex’s OpenAI models hand subagents their tasks as text (multi-agent V1), so a GPT lead can spawn them on magpie’s other models. New threads only; Codex’s own multi_agent_v2 setting still wins": "Codex 的 OpenAI 模型以文本向子代理派发任务(multi-agent V1),GPT 主代理可在 magpie 的其他模型上开子代理。仅对新会话生效;Codex 自身的 multi_agent_v2 设置优先",
"A GPT lead spawns subagents on magpie’s other models. New threads only; Codex’s own multi_agent_v2 still wins": "GPT 主代理可在 magpie 的其他模型上开子代理。仅对新会话生效;Codex 自身的 multi_agent_v2 优先",
"$ USD": "$ 美元",
"¥ CNY": "¥ 人民币",
"What a cost — the Usage page's, the tray panel's, the TUI's and the CLI's — is shown as; a vendor's own balance, already in its own currency, is never converted": "用量页、托盘面板、TUI 和命令行的费用按此币种显示;厂商余额保持其原币种,不换算",
@@ -2823,15 +2811,13 @@ const I18N = {
"General": "常规",
"Network and sharing": "网络与共享",
"Session terminal": "会话终端",
"Used by the terminal button in Sessions; only apps registered for .command files appear": "用于会话列表中的终端按钮;仅显示已注册处理 .command 文件的应用",
"The terminal a session opens in": "打开会话时使用的终端",
"System default ({name})": "系统默认({name})",
"{name} (fixed)": "固定使用 {name}",
"Unavailable app ({id})": "应用不可用({id})",
"Appearance": "外观",
"Light or dark, or whatever the system is showing": "浅色、深色,或跟随系统",
"Follows the Omarchy theme, as picked in Omarchy's menu": "跟随 Omarchy 主题,在 Omarchy 菜单里切换",
"Language": "语言",
"Applies at once, no restart": "立即生效,无需重启",
"Text size": "文字大小",
"Everything in magpie's windows, larger; {keys} too": "放大 magpie 窗口里的一切;也可用 {keys}",
"Text size {n}%": "文字大小 {n}%",
@@ -4675,7 +4661,6 @@ const I18N = {
"Refresh fonts": "重新整理字型列表",
"Couldn't read installed fonts": "無法讀取已安裝字型",
"Font unavailable; using system default": "字型不可用,暫用系統預設",
"Saved only on this computer": "僅儲存在目前電腦",
"Aa 0123 · 中文": "Aa 0123 · 中文",
"Give skills as": "Skills 啟用方式",
"Links": "符號連結",
@@ -5134,31 +5119,28 @@ const I18N = {
"Add it back": "加回來",
"Don't remind me": "不再提示",
"Hide this line; Add a provider still offers it back": "收起這行提示;之後仍可在「新增供應商」里加回來",
"Tray icon": "托盤圖示",
"Click the tray icon to": "點選托盤圖示",
"Open the quick panel": "開啟快捷面板",
"Open the main window": "開啟主視窗",
"Bar icon": "狀態列圖示",
"magpie’s icon beside Omarchy’s own in the bar; right-click opens the window": "把 magpie 圖示放進 Omarchy 狀態列,與系統圖示並排;右鍵開啟視窗",
"Dock": "程式塢",
"Show in Dock": "顯示程式塢",
"Open at login": "開機自啟",
"Start magpie in the tray when you log in, so agents find the gateway from the start": "登入時在托盤啟動 magpie,Agent 一開始就能連上閘道",
"move magpie to Applications first, then turn this on": "請先把 magpie 移到「應用程式」資料夾,再開啟這個選項",
"Keep magpie in the Dock too, always or while its window is open, for Cmd-Tab and a menu bar too full to show its icon": "程式塢中也顯示 magpie(常駐或僅在視窗開啟時),便於 Cmd-Tab 切換,選單列圖示被擠掉時也能開啟",
"Lightweight mode": "輕量模式",
"Keep awake while agents work": "防止睡眠(Agent 工作時)",
"Prevent sleep": "防止休眠",
"Keeps this computer awake while magpie runs tasks": "在 magpie 執行任務時,讓電腦保持喚醒狀態",
"Keeps this computer and its screen awake while magpie runs tasks": "在 magpie 執行任務時,讓電腦和螢幕保持喚醒狀態",
"Detect agents in WSL": "偵測 WSL 中的 Agent",
"Looks in running WSL distros for agents to set up, their sessions and Claude Code; off, WSL is never asked anything and the agents found there are no longer shown": "在執行中的 WSL 發行版裡尋找可接入的 Agent、它們的工作階段和 Claude Code;關閉後不再向 WSL 詢問任何內容,之前在那裡找到的 Agent 也不再顯示",
"Screen on too": "螢幕也常亮",
"Keeps this computer from going to sleep and its display on while agents work through magpie and for ten minutes after": "Agent 透過 magpie 工作時及之後十分鐘內,阻止這臺電腦睡眠,螢幕也保持常亮、不鎖屏",
"Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off": "Agent 透過 magpie 工作時及之後十分鐘內,阻止這臺電腦自動睡眠;螢幕仍可能關閉",
"Gateway mode": "閘道模式",
"Only what a gateway for other computers needs: no Agents or Library, nor this computer's agents' settings": "只顯示給其他電腦當閘道所需的內容:不顯示 Agent 和資源庫,也不顯示本機 Agent 的設定",
"Now on: magpie web was started with --gateway": "目前開啟:magpie web 以 --gateway 啟動",
"Now on: no agents on this computer": "目前開啟:本機沒有 Agent",
"Now off: agents found on this computer": "目前關閉:本機找到了 Agent",
"A closed panel or window frees its page after a minute, about 100 MB each, and loads it anew when opened": "面板或視窗關閉約一分鐘後釋放其網頁(每個約 100 MB),再次開啟時重新載入",
"A closed panel or window frees about 100 MB after a minute; opening it loads it again": "面板或視窗關閉一分鐘後釋放約 100 MB,再次開啟時重新載入",
"With window": "跟隨視窗",
"What clicking magpie’s icon in the menu bar or tray opens": "點選選單列或托盤裡的 magpie 圖示時開啟什麼",
"Quick panel": "快捷面板",
"Main window": "主視窗",
"Proxy": "代理",
"Requests to vendors and update checks go through {proxy}": "對模型廠商的請求和檢查更新都經由 {proxy}",
"Following the system proxy, {proxy}": "跟隨系統代理:{proxy}",
@@ -5281,7 +5263,6 @@ const I18N = {
"Share used": "已用比例",
"Amount": "金額",
"Provider in model names": "模型名帶供應商",
"Agents’ lists put each model’s provider after its name, or not after names you set": "Agent 的模型列表在模型名後帶上供應商,可設為自定義名稱不帶",
"Not on names I set": "自定義名稱不帶供應商",
"Agents’ lists show “{label}”": "Agent 的模型列表裡顯示為「{label}」",
"In agents’ lists": "Agent 列表裡的名稱",
@@ -5290,8 +5271,8 @@ const I18N = {
"“· routing group” is set for every group above": "是否帶「· routing group」在上方統一設定,對所有路由組生效",
"Codex subagents on any model": "Codex 子代理可用任意模型",
"Long conversations": "長對話",
"Codex and Claude Code compact a conversation at 272K tokens, or the size typed here, on a model with a larger window, unless its provider has a Compact at of its own; in Claude Code a Claude model runs to its own window, 1M for a [1m] one, as Anthropic runs it. The model’s full window lets any conversation grow further, with every turn slower and costlier": "模型視窗超過 272K(或這裡填的大小)時,Codex 和 Claude Code 在該處壓縮對話,供應商設了自己的「壓縮閾值」時以供應商的為準;Claude Code 中的 Claude 模型按自身視窗([1m] 為 1M),與 Anthropic 官方一致。使用完整視窗可讓對話更長,但每輪更慢、更貴",
"Full window": "完整視窗",
"Codex and Claude Code compact at 272K or the size typed; a full window makes turns slower and costlier": "Codex 和 Claude Code 在 272K(或這裡填的大小)時壓縮;用完整視窗則每輪更慢更貴",
"Compact at {n}": "{n} 時壓縮",
"Codex thread titles": "Codex 會話標題",
"Codex’s own (ChatGPT)": "Codex 自帶(ChatGPT)",
@@ -5299,16 +5280,9 @@ const I18N = {
"Codex auto-review model": "Codex 自動審批模型",
"Codex’s own pick": "由 Codex 決定",
"as Codex picks it": "按 Codex 預設選擇",
"Codex’s auto-review decides approvals on this model, whatever model the conversation is on": "Codex 的自動審批(auto-review)用這個模型決定是否批准,不論對話用的是哪個模型",
"Codex memories model": "Codex 記憶整理模型",
"Codex sums threads up and folds them into its memories with this model, whatever model the conversation is on": "Codex 用這個模型總結對話、整理成記憶,不論對話用的是哪個模型",
"Codex sums threads up and folds them into its memories with its own models, gpt-5.6-luna and gpt-5.6-terra, whatever model the conversation is on": "Codex 用自帶的 gpt-5.6-luna 和 gpt-5.6-terra 總結對話、整理成記憶,不論對話用的是哪個模型",
"Codex’s auto-review decides approvals on codex-auto-review when it has it, else on the conversation’s model at low effort": "Codex 的自動審批(auto-review)有 codex-auto-review 時用它,否則用目前對話的模型(low 推理強度)",
"no title, nothing sent": "不生成標題,不發出請求",
"Codex asks its own model for each thread’s title through its ChatGPT sign-in, even while the conversation is on magpie’s models": "Codex 經 ChatGPT 登入用自帶模型為每個會話生成標題,即使對話用的是 magpie 的模型",
"Codex’s title requests are answered by magpie with no title and sent nowhere; new threads stay unnamed": "Codex 的標題請求由 magpie 回覆空標題,不外發;新會話不自動命名",
"Codex’s title requests go to this model, not to its ChatGPT sign-in; the Usage and Routing views still show them as titles": "Codex 的標題請求改由此模型生成,不經 ChatGPT 登入;用量和路由頁仍記為標題請求",
"Codex’s OpenAI models hand subagents their tasks as text (multi-agent V1), so a GPT lead can spawn them on magpie’s other models. New threads only; Codex’s own multi_agent_v2 setting still wins": "Codex 的 OpenAI 模型以文本向子代理派發任務(multi-agent V1),GPT 主代理可在 magpie 的其他模型上開子代理。僅對新會話生效;Codex 自身的 multi_agent_v2 設定優先",
"A GPT lead spawns subagents on magpie’s other models. New threads only; Codex’s own multi_agent_v2 still wins": "GPT 主代理可在 magpie 的其他模型上開子代理。僅對新會話生效;Codex 自身的 multi_agent_v2 優先",
"$ USD": "$ 美元",
"¥ CNY": "¥ 人民幣",
"What a cost — the Usage page's, the tray panel's, the TUI's and the CLI's — is shown as; a vendor's own balance, already in its own currency, is never converted": "用量頁、托盤面板、TUI 和命令列的費用按此幣種顯示;廠商餘額保持其原幣種,不換算",
@@ -7245,15 +7219,13 @@ const I18N = {
"General": "常規",
"Network and sharing": "網路與共享",
"Session terminal": "會話終端機",
"Used by the terminal button in Sessions; only apps registered for .command files appear": "用於會話列表中的終端機按鈕;僅顯示已註冊處理 .command 檔案的應用",
"The terminal a session opens in": "開啟會話時使用的終端機",
"System default ({name})": "系統預設({name})",
"{name} (fixed)": "固定使用 {name}",
"Unavailable app ({id})": "應用不可用({id})",
"Appearance": "外觀",
"Light or dark, or whatever the system is showing": "淺色、深色,或跟隨系統",
"Follows the Omarchy theme, as picked in Omarchy's menu": "跟隨 Omarchy 主題,在 Omarchy 選單裡切換",
"Language": "語言",
"Applies at once, no restart": "立即生效,無需重啟",
"Text size": "文字大小",
"Everything in magpie's windows, larger; {keys} too": "放大 magpie 窗口裡的一切;也可用 {keys}",
"Text size {n}%": "文字大小 {n}%",
@@ -9096,7 +9068,6 @@ const I18N = {
"Refresh fonts": "フォント一覧を更新",
"Couldn't read installed fonts": "インストール済みフォントを読み取れませんでした",
"Font unavailable; using system default": "フォントを利用できないため、システムの既定を使用中",
"Saved only on this computer": "このコンピューターにのみ保存",
"Aa 0123 · 中文": "Aa 0123 · 日本語",
"Give skills as": "スキルの渡し方",
"Links": "リンク",
@@ -9549,31 +9520,28 @@ const I18N = {
"Add it back": "再追加",
"Don't remind me": "今後表示しない",
"Hide this line; Add a provider still offers it back": "この行を隠します。「プロバイダを追加」からいつでも戻せます",
"Tray icon": "トレイアイコン",
"Click the tray icon to": "トレイアイコンのクリックで",
"Open the quick panel": "クイックパネルを開く",
"Open the main window": "メインウィンドウを開く",
"Bar icon": "バーアイコン",
"magpie’s icon beside Omarchy’s own in the bar; right-click opens the window": "Omarchy のバーで、Omarchy 自身のアイコンの横に magpie のアイコンを表示します。右クリックでウィンドウを開きます",
"Dock": "Dock",
"Show in Dock": "Dock に表示",
"Open at login": "ログイン時に起動",
"Start magpie in the tray when you log in, so agents find the gateway from the start": "ログイン時に magpie をトレイで起動し、エージェントが最初からゲートウェイを見つけられるようにします",
"move magpie to Applications first, then turn this on": "先に magpie を「アプリケーション」に移動してから、これをオンにしてください",
"Keep magpie in the Dock too, always or while its window is open, for Cmd-Tab and a menu bar too full to show its icon": "Cmd-Tab で切り替えたり、メニューバーがいっぱいでアイコンが表示されないときのために、magpie を Dock にも表示します(常に、またはウィンドウが開いている間)",
"Lightweight mode": "軽量モード",
"Keep awake while agents work": "エージェントの作業中はスリープしない",
"Prevent sleep": "スリープを防ぐ",
"Keeps this computer awake while magpie runs tasks": "magpie がタスクを実行している間、このコンピューターをスリープさせません",
"Keeps this computer and its screen awake while magpie runs tasks": "magpie がタスクを実行している間、このコンピューターと画面をスリープさせません",
"Detect agents in WSL": "WSL のエージェントを検出",
"Looks in running WSL distros for agents to set up, their sessions and Claude Code; off, WSL is never asked anything and the agents found there are no longer shown": "実行中の WSL ディストリビューションで、設定できるエージェント、そのセッション、Claude Code を探します。オフにすると WSL には一切問い合わせず、そこで見つかったエージェントも表示しません",
"Screen on too": "画面もオン",
"Keeps this computer from going to sleep and its display on while agents work through magpie and for ten minutes after": "エージェントが magpie 経由で作業している間とその後 10 分間、このコンピューターをスリープさせず、ディスプレイもオンのままにします",
"Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off": "エージェントが magpie 経由で作業している間とその後 10 分間、このコンピューターが自動でスリープしないようにします。ディスプレイはオフになることがあります",
"Gateway mode": "ゲートウェイモード",
"Only what a gateway for other computers needs: no Agents or Library, nor this computer's agents' settings": "他のコンピューターのゲートウェイに必要なものだけ:エージェント、ライブラリ、このコンピューターのエージェントの設定は表示しません",
"Now on: magpie web was started with --gateway": "現在オン:magpie web が --gateway で起動されています",
"Now on: no agents on this computer": "現在オン:このコンピューターにエージェントがありません",
"Now off: agents found on this computer": "現在オフ:このコンピューターにエージェントがあります",
"A closed panel or window frees its page after a minute, about 100 MB each, and loads it anew when opened": "閉じたパネルやウィンドウは 1 分後にページを解放し(各約 100 MB)、開いたときに読み込み直します",
"A closed panel or window frees about 100 MB after a minute; opening it loads it again": "閉じたパネルやウィンドウは 1 分後に約 100 MB を解放し、開くと読み込み直します",
"With window": "ウィンドウと連動",
"What clicking magpie’s icon in the menu bar or tray opens": "メニューバーまたはトレイの magpie アイコンをクリックしたときに開くもの",
"Quick panel": "クイックパネル",
"Main window": "メインウィンドウ",
"Proxy": "プロキシ",
"Requests to vendors and update checks go through {proxy}": "ベンダーへのリクエストとアップデート確認は {proxy} を経由します",
"Following the system proxy, {proxy}": "システムプロキシに従う:{proxy}",
@@ -9694,7 +9662,6 @@ const I18N = {
"Share used": "使用率",
"Amount": "金額",
"Provider in model names": "モデル名にプロバイダ",
"Agents’ lists put each model’s provider after its name, or not after names you set": "エージェントに渡すモデル一覧で、モデル名の後にプロバイダを付けます。自分で付けた名前には付けないこともできます",
"Not on names I set": "自分で付けた名前には付けない",
"Agents’ lists show “{label}”": "エージェントの一覧では「{label}」と表示されます",
"In agents’ lists": "エージェントの一覧での名前",
@@ -9703,8 +9670,8 @@ const I18N = {
"“· routing group” is set for every group above": "「· routing group」を付けるかは上で全グループ共通に設定します",
"Codex subagents on any model": "Codex のサブエージェントで任意のモデル",
"Long conversations": "長い会話",
"Codex and Claude Code compact a conversation at 272K tokens, or the size typed here, on a model with a larger window, unless its provider has a Compact at of its own; in Claude Code a Claude model runs to its own window, 1M for a [1m] one, as Anthropic runs it. The model’s full window lets any conversation grow further, with every turn slower and costlier": "ウィンドウが大きいモデルでは、Codex と Claude Code は 272K トークン(またはここに入力したサイズ)で会話を圧縮します。プロバイダーに独自の「圧縮しきい値」があればそちらが優先されます。Claude Code の Claude モデルは Anthropic と同じく自身のウィンドウ([1m] なら 1M)まで使います。モデルのウィンドウ全体を使うとどの会話もさらに伸ばせますが、ターンごとに遅く、高くなります",
"Full window": "ウィンドウ全体",
"Codex and Claude Code compact at 272K or the size typed; a full window makes turns slower and costlier": "Codex と Claude Code は 272K(または入力したサイズ)で圧縮します。ウィンドウ全体では各ターンが遅く高くなります",
"Compact at {n}": "{n} で圧縮",
"Codex thread titles": "Codex のスレッドタイトル",
"Codex’s own (ChatGPT)": "Codex 自身(ChatGPT)",
@@ -9712,16 +9679,9 @@ const I18N = {
"Codex auto-review model": "Codex 自動レビューのモデル",
"Codex’s own pick": "Codex に任せる",
"as Codex picks it": "Codex の既定どおり",
"Codex’s auto-review decides approvals on this model, whatever model the conversation is on": "Codex の自動レビュー(auto-review)は、会話のモデルにかかわらずこのモデルで承認を判断します",
"Codex memories model": "Codex メモリ整理のモデル",
"Codex sums threads up and folds them into its memories with this model, whatever model the conversation is on": "Codex は会話のモデルにかかわらず、このモデルでスレッドを要約し、メモリに整理します",
"Codex sums threads up and folds them into its memories with its own models, gpt-5.6-luna and gpt-5.6-terra, whatever model the conversation is on": "Codex は会話のモデルにかかわらず、自身の gpt-5.6-luna と gpt-5.6-terra でスレッドを要約し、メモリに整理します",
"Codex’s auto-review decides approvals on codex-auto-review when it has it, else on the conversation’s model at low effort": "Codex の自動レビュー(auto-review)は codex-auto-review があればそれで、なければ会話のモデル(low の推論)で承認を判断します",
"no title, nothing sent": "タイトルなし、送信なし",
"Codex asks its own model for each thread’s title through its ChatGPT sign-in, even while the conversation is on magpie’s models": "会話が magpie のモデルで行われていても、Codex は ChatGPT のサインインを通じて自身のモデルに各スレッドのタイトルを生成させます",
"Codex’s title requests are answered by magpie with no title and sent nowhere; new threads stay unnamed": "Codex のタイトルリクエストには magpie がタイトルなしで応答し、どこにも送りません。新しいスレッドは無題のままです",
"Codex’s title requests go to this model, not to its ChatGPT sign-in; the Usage and Routing views still show them as titles": "Codex のタイトルリクエストは ChatGPT のサインインではなくこのモデルに送られます。使用量とルーティングの画面では引き続きタイトルとして表示されます",
"Codex’s OpenAI models hand subagents their tasks as text (multi-agent V1), so a GPT lead can spawn them on magpie’s other models. New threads only; Codex’s own multi_agent_v2 setting still wins": "Codex の OpenAI モデルはサブエージェントにタスクをテキストで渡す(multi-agent V1)ため、GPT のリードが magpie の他のモデルでサブエージェントを起動できます。新しいスレッドのみ対象です。Codex 自身の multi_agent_v2 設定が優先されます",
"A GPT lead spawns subagents on magpie’s other models. New threads only; Codex’s own multi_agent_v2 still wins": "GPT のリードが magpie の他のモデルでサブエージェントを起動します。新しいスレッドのみ。Codex 自身の multi_agent_v2 が優先されます",
"$ USD": "$ 米ドル",
"¥ CNY": "¥ 人民元",
"What a cost — the Usage page's, the tray panel's, the TUI's and the CLI's — is shown as; a vendor's own balance, already in its own currency, is never converted": "費用(使用量ページ、トレイパネル、TUI、CLI のもの)をどの通貨で表示するか。ベンダー自身の残高はすでにその通貨建てなので、換算されません",
@@ -11678,15 +11638,13 @@ const I18N = {
"General": "一般",
"Network and sharing": "ネットワークと共有",
"Session terminal": "セッション用ターミナル",
"Used by the terminal button in Sessions; only apps registered for .command files appear": "「セッション」のターミナルボタンで使われます。.command ファイルに登録されたアプリのみ表示されます",
"The terminal a session opens in": "セッションを開くターミナル",
"System default ({name})": "システムのデフォルト({name})",
"{name} (fixed)": "{name}(固定)",
"Unavailable app ({id})": "利用できないアプリ({id})",
"Appearance": "外観",
"Light or dark, or whatever the system is showing": "ライト、ダーク、またはシステムの表示に合わせる",
"Follows the Omarchy theme, as picked in Omarchy's menu": "Omarchy のメニューで選んだ Omarchy テーマに従います",
"Language": "言語",
"Applies at once, no restart": "すぐに反映され、再起動は不要です",
"Text size": "文字サイズ",
"Everything in magpie's windows, larger; {keys} too": "magpie のウィンドウ内のすべてを拡大します。{keys} でも変更できます",
"Text size {n}%": "文字サイズ {n}%",
@@ -13526,7 +13484,6 @@ const I18N = {
"Refresh fonts": "Schriftliste aktualisieren",
"Couldn't read installed fonts": "Installierte Schriften konnten nicht gelesen werden",
"Font unavailable; using system default": "Schrift nicht verfügbar; Systemstandard wird verwendet",
"Saved only on this computer": "Nur auf diesem Computer gespeichert",
"Aa 0123 · 中文": "Aa 0123 · 中文",
"Give skills as": "Skills geben als",
"Links": "Links",
@@ -13979,31 +13936,28 @@ const I18N = {
"Add it back": "Wieder hinzufügen",
"Don't remind me": "Nicht mehr erinnern",
"Hide this line; Add a provider still offers it back": "Diese Zeile ausblenden; „Anbieter hinzufügen“ bietet es weiterhin an",
"Tray icon": "Tray-Symbol",
"Click the tray icon to": "Klick auf das Tray-Symbol",
"Open the quick panel": "Schnell-Panel öffnen",
"Open the main window": "Hauptfenster öffnen",
"Bar icon": "Leistensymbol",
"magpie’s icon beside Omarchy’s own in the bar; right-click opens the window": "magpie-Symbol neben den Omarchy-Symbolen in der Leiste; Rechtsklick öffnet das Fenster",
"Dock": "Dock",
"Show in Dock": "Im Dock zeigen",
"Open at login": "Bei Anmeldung öffnen",
"Start magpie in the tray when you log in, so agents find the gateway from the start": "magpie bei der Anmeldung im Tray starten, damit Agenten den Zugangspunkt von Anfang an finden",
"move magpie to Applications first, then turn this on": "magpie zuerst in „Programme“ verschieben, dann einschalten",
"Keep magpie in the Dock too, always or while its window is open, for Cmd-Tab and a menu bar too full to show its icon": "magpie auch im Dock halten, immer oder solange das Fenster offen ist, für Cmd-Tab und eine Menüleiste, die zu voll für das Symbol ist",
"Lightweight mode": "Ressourcensparmodus",
"Keep awake while agents work": "Wach halten, während Agenten arbeiten",
"Prevent sleep": "Ruhezustand verhindern",
"Keeps this computer awake while magpie runs tasks": "Hält diesen Computer wach, während magpie Aufgaben ausführt",
"Keeps this computer and its screen awake while magpie runs tasks": "Hält diesen Computer und den Bildschirm wach, während magpie Aufgaben ausführt",
"Detect agents in WSL": "Agenten in WSL erkennen",
"Looks in running WSL distros for agents to set up, their sessions and Claude Code; off, WSL is never asked anything and the agents found there are no longer shown": "Sucht in laufenden WSL-Distributionen nach einrichtbaren Agenten, ihren Sitzungen und Claude Code; aus, wird WSL nie etwas gefragt, und die dort gefundenen Agenten werden nicht mehr angezeigt",
"Screen on too": "Bildschirm auch an",
"Keeps this computer from going to sleep and its display on while agents work through magpie and for ten minutes after": "Verhindert, dass dieser Computer in den Ruhezustand geht, und hält den Bildschirm an, während Agenten über magpie arbeiten, und zehn Minuten danach",
"Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off": "Verhindert, dass dieser Computer von selbst in den Ruhezustand geht, während Agenten über magpie arbeiten, und zehn Minuten danach; der Bildschirm kann sich trotzdem ausschalten",
"Gateway mode": "Gateway-Modus",
"Only what a gateway for other computers needs: no Agents or Library, nor this computer's agents' settings": "Nur, was ein Gateway für andere Computer braucht: keine Agenten oder Bibliothek, keine Einstellungen der Agenten auf diesem Computer",
"Now on: magpie web was started with --gateway": "Jetzt an: magpie web wurde mit --gateway gestartet",
"Now on: no agents on this computer": "Jetzt an: keine Agenten auf diesem Computer",
"Now off: agents found on this computer": "Jetzt aus: Agenten auf diesem Computer gefunden",
"A closed panel or window frees its page after a minute, about 100 MB each, and loads it anew when opened": "Ein geschlossenes Panel oder Fenster gibt seine Seite nach einer Minute frei (je etwa 100 MB) und lädt sie beim Öffnen neu",
"A closed panel or window frees about 100 MB after a minute; opening it loads it again": "Ein geschlossenes Panel oder Fenster gibt nach einer Minute etwa 100 MB frei und lädt beim Öffnen neu",
"With window": "Mit Fenster",
"What clicking magpie’s icon in the menu bar or tray opens": "Was ein Klick auf das magpie-Symbol in Menüleiste oder Tray öffnet",
"Quick panel": "Schnell-Panel",
"Main window": "Hauptfenster",
"Proxy": "Proxy",
"Requests to vendors and update checks go through {proxy}": "Anfragen an Anbieter und Update-Prüfungen laufen über {proxy}",
"Following the system proxy, {proxy}": "Folgt dem System-Proxy, {proxy}",
@@ -14126,7 +14080,6 @@ const I18N = {
"Share used": "Verbrauchter Anteil",
"Amount": "Betrag",
"Provider in model names": "Anbieter in Modellnamen",
"Agents’ lists put each model’s provider after its name, or not after names you set": "Die Listen der Agenten setzen den Anbieter hinter jeden Modellnamen, oder nicht hinter selbst vergebene Namen",
"Not on names I set": "Nicht bei eigenen Namen",
"Agents’ lists show “{label}”": "In den Listen der Agenten: „{label}“",
"In agents’ lists": "In den Listen der Agenten",
@@ -14135,8 +14088,8 @@ const I18N = {
"“· routing group” is set for every group above": "„· routing group“ wird oben für alle Gruppen eingestellt",
"Codex subagents on any model": "Codex-Subagenten auf jedem Modell",
"Long conversations": "Lange Unterhaltungen",
"Codex and Claude Code compact a conversation at 272K tokens, or the size typed here, on a model with a larger window, unless its provider has a Compact at of its own; in Claude Code a Claude model runs to its own window, 1M for a [1m] one, as Anthropic runs it. The model’s full window lets any conversation grow further, with every turn slower and costlier": "Codex und Claude Code komprimieren eine Unterhaltung bei einem Modell mit größerem Kontextfenster ab 272K Token oder der hier eingegebenen Größe, sofern der Anbieter keinen eigenen Wert unter „Komprimieren ab“ hat; in Claude Code nutzt ein Claude-Modell sein eigenes Fenster, 1M bei einem [1m]-Modell, wie Anthropic es betreibt. Mit dem vollen Fenster des Modells wächst jede Unterhaltung weiter, wobei jede Runde langsamer und teurer wird",
"Full window": "Volles Fenster",
"Codex and Claude Code compact at 272K or the size typed; a full window makes turns slower and costlier": "Codex und Claude Code komprimieren bei 272K oder der Größe hier; volles Fenster: langsamer, teurer",
"Compact at {n}": "Bei {n} komprimieren",
"Codex thread titles": "Codex-Thread-Titel",
"Codex’s own (ChatGPT)": "Eigene von Codex (ChatGPT)",
@@ -14144,16 +14097,9 @@ const I18N = {
"Codex auto-review model": "Modell für Codex’ Auto-Review",
"Codex’s own pick": "Wie Codex es wählt",
"as Codex picks it": "Codex’ Standard",
"Codex’s auto-review decides approvals on this model, whatever model the conversation is on": "Codex’ Auto-Review entscheidet Freigaben mit diesem Modell, egal auf welchem Modell die Unterhaltung läuft",
"Codex memories model": "Codex-Modell für Erinnerungen",
"Codex sums threads up and folds them into its memories with this model, whatever model the conversation is on": "Codex fasst Threads mit diesem Modell zusammen und ordnet sie in seine Erinnerungen ein, egal auf welchem Modell die Unterhaltung läuft",
"Codex sums threads up and folds them into its memories with its own models, gpt-5.6-luna and gpt-5.6-terra, whatever model the conversation is on": "Codex fasst Threads mit seinen eigenen Modellen gpt-5.6-luna und gpt-5.6-terra zusammen und ordnet sie in seine Erinnerungen ein, egal auf welchem Modell die Unterhaltung läuft",
"Codex’s auto-review decides approvals on codex-auto-review when it has it, else on the conversation’s model at low effort": "Codex’ Auto-Review entscheidet Freigaben mit codex-auto-review, wenn vorhanden, sonst mit dem Modell der Unterhaltung bei niedrigem Aufwand",
"no title, nothing sent": "kein Titel, nichts gesendet",
"Codex asks its own model for each thread’s title through its ChatGPT sign-in, even while the conversation is on magpie’s models": "Codex fragt über seine ChatGPT-Anmeldung sein eigenes Modell nach dem Titel jedes Threads, auch wenn die Unterhaltung auf magpie-Modellen läuft",
"Codex’s title requests are answered by magpie with no title and sent nowhere; new threads stay unnamed": "Titelanfragen von Codex beantwortet magpie ohne Titel und leitet sie nirgends weiter; neue Threads bleiben unbenannt",
"Codex’s title requests go to this model, not to its ChatGPT sign-in; the Usage and Routing views still show them as titles": "Titelanfragen von Codex gehen an dieses Modell statt über die ChatGPT-Anmeldung; die Ansichten „Nutzung“ und „Weiterleitung“ zeigen sie weiterhin als Titel",
"Codex’s OpenAI models hand subagents their tasks as text (multi-agent V1), so a GPT lead can spawn them on magpie’s other models. New threads only; Codex’s own multi_agent_v2 setting still wins": "Die OpenAI-Modelle von Codex übergeben Subagenten ihre Aufgaben als Text (multi-agent V1), sodass ein leitendes GPT sie auf anderen magpie-Modellen starten kann. Nur neue Threads; die Codex-Einstellung multi_agent_v2 hat weiterhin Vorrang",
"A GPT lead spawns subagents on magpie’s other models. New threads only; Codex’s own multi_agent_v2 still wins": "Ein leitendes GPT startet Subagenten auf anderen magpie-Modellen. Nur neue Threads; Codex’ eigenes multi_agent_v2 hat Vorrang",
"$ USD": "$ USD",
"¥ CNY": "¥ CNY",
"What a cost — the Usage page's, the tray panel's, the TUI's and the CLI's — is shown as; a vendor's own balance, already in its own currency, is never converted": "Wie Kosten angezeigt werden — auf der Seite „Nutzung“, im Tray-Panel, in der TUI und in der CLI; das eigene Guthaben eines Anbieters, bereits in seiner Währung, wird nie umgerechnet",
@@ -16110,15 +16056,13 @@ const I18N = {
"General": "Allgemein",
"Network and sharing": "Netzwerk und Freigabe",
"Session terminal": "Sitzungs-Terminal",
"Used by the terminal button in Sessions; only apps registered for .command files appear": "Für den Terminal-Button unter „Sitzungen“; nur für .command-Dateien registrierte Apps erscheinen",
"The terminal a session opens in": "Das Terminal, in dem eine Sitzung öffnet",
"System default ({name})": "Systemstandard ({name})",
"{name} (fixed)": "{name} (fest)",
"Unavailable app ({id})": "Nicht verfügbare App ({id})",
"Appearance": "Darstellung",
"Light or dark, or whatever the system is showing": "Hell, dunkel oder wie das System",
"Follows the Omarchy theme, as picked in Omarchy's menu": "Folgt dem im Omarchy-Menü gewählten Omarchy-Theme",
"Language": "Sprache",
"Applies at once, no restart": "Wirkt sofort, ohne Neustart",
"Text size": "Textgröße",
"Everything in magpie's windows, larger; {keys} too": "Alles in den magpie-Fenstern größer; auch mit {keys}",
"Text size {n}%": "Textgröße {n} %",
+18 -18
View File
@@ -279,23 +279,23 @@
<section class="set-page" id="setPage-general" role="tabpanel" aria-labelledby="setTab-general">
<div class="list prefs">
<div class="row pref">
<div class="who"><div class="name" data-t>Appearance</div><div class="sub om-hide" data-t>Light or dark, or whatever the system is showing</div><div class="sub om-only" data-t>Follows the Omarchy theme, as picked in Omarchy's menu</div></div>
<div class="who"><div class="name" data-t>Appearance</div><div class="sub om-only" data-t>Follows the Omarchy theme, as picked in Omarchy's menu</div></div>
<div id="themeSegs" class="om-hide"></div><span class="om-only om-theme-name"></span>
</div>
<div class="row pref">
<div class="who"><div class="name" data-t>Language</div><div class="sub" data-t>Applies at once, no restart</div></div>
<div id="langSegs"></div>
<div class="who"><div class="name" data-t>Language</div></div>
<button type="button" id="langPick" class="sess-pick pref-pick" aria-label="Language" aria-haspopup="menu" aria-expanded="false"></button>
</div>
<div class="row pref" id="gatewayModeRow" hidden>
<div class="who"><div class="name" data-t>Gateway mode</div><div class="sub" id="gatewayModeSub"></div></div>
<div id="gatewayModeSegs"></div>
</div>
<div class="row pref" id="textSizeRow">
<div class="who"><div class="name" data-t>Text size</div><div class="sub" id="textSizeSub"></div></div>
<div class="who"><div class="name" data-t>Text size</div></div>
<div id="textSizeSegs"></div>
</div>
<div class="row pref font-row" id="uiFontRow" hidden>
<div class="who"><div class="name" data-t>Interface font</div><div class="sub font-note"></div></div>
<div class="who"><div class="name" data-t>Interface font</div><div class="sub font-note" hidden></div></div>
<div class="font-controls">
<button type="button" class="proto pick font-family" aria-haspopup="menu" aria-expanded="false"></button>
<button type="button" class="proto pick font-style" aria-haspopup="menu" aria-expanded="false"></button>
@@ -303,7 +303,7 @@
</div>
</div>
<div class="row pref font-row" id="codeFontRow" hidden>
<div class="who"><div class="name" data-t>Code font</div><div class="sub font-note"></div></div>
<div class="who"><div class="name" data-t>Code font</div><div class="sub font-note" hidden></div></div>
<div class="font-controls">
<button type="button" class="proto pick font-family" aria-haspopup="menu" aria-expanded="false"></button>
<button type="button" class="proto pick font-style" aria-haspopup="menu" aria-expanded="false"></button>
@@ -311,7 +311,7 @@
</div>
</div>
<div class="row pref">
<div class="who"><div class="name" data-t>Tray icon</div><div class="sub" data-t>What clicking magpie’s icon in the menu bar or tray opens</div></div>
<div class="who"><div class="name" data-t>Click the tray icon to</div></div>
<div id="traySegs"></div>
</div>
<div class="row pref" id="barIconRow" hidden>
@@ -319,43 +319,43 @@
<div id="barIconSegs"></div>
</div>
<div class="row pref">
<div class="who"><div class="name" data-t>Provider in model names</div><div class="sub wraps" data-t>Agents’ lists put each model’s provider after its name, or not after names you set</div></div>
<div class="who"><div class="name" data-t>Provider in model names</div></div>
<div id="plainNamesSegs"></div>
</div>
<div class="row pref">
<div class="who"><div class="name" data-t>Codex subagents on any model</div><div class="sub" data-t>Codex’s OpenAI models hand subagents their tasks as text (multi-agent V1), so a GPT lead can spawn them on magpie’s other models. New threads only; Codex’s own multi_agent_v2 setting still wins</div></div>
<div class="who"><div class="name" data-t>Codex subagents on any model</div><div class="sub" data-t>A GPT lead spawns subagents on magpie’s other models. New threads only; Codex’s own multi_agent_v2 still wins</div></div>
<div id="codexAgentsV1Segs"></div>
</div>
<div class="row pref">
<div class="who"><div class="name" data-t>Long conversations</div><div class="sub" data-t>Codex and Claude Code compact a conversation at 272K tokens, or the size typed here, on a model with a larger window, unless its provider has a Compact at of its own; in Claude Code a Claude model runs to its own window, 1M for a [1m] one, as Anthropic runs it. The model’s full window lets any conversation grow further, with every turn slower and costlier</div></div>
<div class="who"><div class="name" data-t>Long conversations</div><div class="sub" data-t>Codex and Claude Code compact at 272K or the size typed; a full window makes turns slower and costlier</div></div>
<div id="fullContextSegs"></div>
</div>
<div class="row pref" id="codexTitlesRow">
<div class="who"><div class="name" data-t>Codex thread titles</div><div class="sub" id="codexTitlesSub"></div></div>
<div class="who"><div class="name" data-t>Codex thread titles</div></div>
<div class="val" id="codexTitlesPick"></div>
</div>
<div class="row pref" id="codexAutoReviewRow">
<div class="who"><div class="name" data-t>Codex auto-review model</div><div class="sub" id="codexAutoReviewSub"></div></div>
<div class="who"><div class="name" data-t>Codex auto-review model</div></div>
<div class="val" id="codexAutoReviewPick"></div>
</div>
<div class="row pref" id="codexMemoriesRow" hidden>
<div class="who"><div class="name" data-t>Codex memories model</div><div class="sub" id="codexMemoriesSub"></div></div>
<div class="who"><div class="name" data-t>Codex memories model</div></div>
<div class="val" id="codexMemoriesPick"></div>
</div>
<div class="row pref">
<div class="who"><div class="name" data-t>Open at login</div><div class="sub" data-t>Start magpie in the tray when you log in, so agents find the gateway from the start</div></div>
<div class="who"><div class="name" data-t>Open at login</div></div>
<div id="loginSegs"></div>
</div>
<div class="row pref" id="dockRow" hidden>
<div class="who"><div class="name" data-t>Dock</div><div class="sub" data-t>Keep magpie in the Dock too, always or while its window is open, for Cmd-Tab and a menu bar too full to show its icon</div></div>
<div class="who"><div class="name" data-t>Show in Dock</div></div>
<div id="dockSegs"></div>
</div>
<div class="row pref" id="lightweightRow" hidden>
<div class="who"><div class="name" data-t>Lightweight mode</div><div class="sub" data-t>A closed panel or window frees its page after a minute, about 100 MB each, and loads it anew when opened</div></div>
<div class="who"><div class="name" data-t>Lightweight mode</div><div class="sub" data-t>A closed panel or window frees about 100 MB after a minute; opening it loads it again</div></div>
<div id="lightweightSegs"></div>
</div>
<div class="row pref" id="keepAwakeRow">
<div class="who"><div class="name" data-t>Keep awake while agents work</div><div class="sub" data-t>Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off</div></div>
<div class="who"><div class="name" data-t>Prevent sleep</div><div class="sub" data-t>Keeps this computer awake while magpie runs tasks</div></div>
<div id="keepAwakeSegs"></div>
</div>
<div class="row pref" id="wslAgentsRow" hidden>
@@ -363,7 +363,7 @@
<div id="wslAgentsSegs"></div>
</div>
<div class="row pref" id="sessionTerminalRow" hidden>
<div class="who"><div class="name" data-t>Session terminal</div><div class="sub" data-t>Used by the terminal button in Sessions; only apps registered for .command files appear</div></div>
<div class="who"><div class="name" data-t>Session terminal</div><div class="sub" data-t>The terminal a session opens in</div></div>
<button type="button" id="sessionTerminalSelect" class="sess-pick session-terminal-select" aria-label="Session terminal" aria-haspopup="menu" aria-expanded="false" data-ta></button>
</div>
</div>
+1 -1
View File
@@ -17,7 +17,7 @@ import (
)
// magpie out of the Dock, activated by its quick panel, opens its window
// and joins the Dock (Settings › Dock › while the window is open): it leads
// and joins the Dock (Settings › Show in Dock › while the window is open): it leads
// Command-Tab's order, so one Command-Tab away comes back to it (#1381). It
// joined while active and stayed last, behind every app, though in front.
// The order is the Mac's front-to-back list, which `lsappinfo` prints.
@@ -3,7 +3,7 @@
// runs on the conversation's model, with no way to pick a cheaper one): by
// default Codex's own pick; the app's menu (no native select) offers
// magpie's models and groups; a pick posts settings/codex-auto-review on its
// own, the row says what now happens, a refusal is said and the row keeps
// own, its button shows the choice under a name alone (1ooogle on X), a refusal is said and the row keeps
// what it had, and no click scrolls the Settings page.
// English and Chinese, Chromium and WebKit; no backend, the API is faked here.
const assert = require("node:assert/strict");
@@ -68,8 +68,8 @@ function server(lang, posted) {
}
const want = {
en: { name: "Codex auto-review model", own: "Codex’s own pick", subOwn: /codex-auto-review/, subModel: /on this model/ },
zh: { name: "Codex 自动审批模型", own: "由 Codex 决定", subOwn: /codex-auto-review/, subModel: /用这个模型/ },
en: { name: "Codex auto-review model", own: "Codex’s own pick" },
zh: { name: "Codex 自动审批模型", own: "由 Codex 决定" },
};
const view = (page) => page.locator("#view-settings").evaluate((v) => v.scrollTop);
@@ -99,7 +99,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await row.locator("select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), want[lang].name);
assert.equal((await pick.textContent()).trim(), want[lang].own, "Codex's own pick by default");
assert.match(await row.locator(".sub").textContent(), want[lang].subOwn);
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
// scrolled by a wheel till the row is mid-view, so a click that
// moved the page would show
@@ -123,7 +123,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.locator("#list li:not(.group)").filter({ hasText: "DeepSeek V4 Flash" }).first().click();
await page.locator("#codexAutoReviewPick button", { hasText: "DeepSeek V4 Flash" }).waitFor();
assert.deepEqual(posted, [["codex-auto-review", { model: "deepseek/deepseek-v4-flash" }]]);
assert.match(await row.locator(".sub").textContent(), want[lang].subModel);
assert.equal(await row.locator(".sub").count(), 0);
await page.waitForTimeout(300);
assert.equal(await view(page), before, "picking a model scrolled the page");
@@ -137,7 +137,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await choose(want[lang].own);
await page.locator("#codexAutoReviewPick button", { hasText: want[lang].own }).waitFor();
assert.deepEqual(posted.at(-1), ["codex-auto-review", { model: "" }]);
assert.match(await row.locator(".sub").textContent(), want[lang].subOwn);
assert.equal(await row.locator(".sub").count(), 0);
await page.waitForTimeout(300);
assert.equal(await view(page), before, "the picks scrolled the page");
assert(!posted.some(([k]) => k === "settings"), "set on its own, not with the other preferences");
@@ -2,7 +2,7 @@
// Settings' "Codex memories model" (#985, Hu9956: the model Codex writes its
// memories with was only the notebook square on Codex's card, beside the
// subagent squares, and wasn't found). The row sits under "Codex auto-review
// model" with a title and a line that says what happens; unset it is
// 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
@@ -72,10 +72,10 @@ function server(lang, sets, codex) {
// the words as i18n.js has them
const W = {
en: { name: "Codex memories model", own: "Codex’s own pick", subOwn: /gpt-5\.6-luna and gpt-5\.6-terra/, subSet: /with this model/, square: "Codex memories model: GPT-5.4 mini", def: "Default" },
zh: { name: "Codex 记忆整理模型", own: "由 Codex 决定", subOwn: /gpt-5\.6-luna 和 gpt-5\.6-terra/, subSet: /用这个模型/, square: "Codex 记忆整理模型:GPT-5.4 mini", def: "默认" },
ja: { name: "Codex メモリ整理のモデル", own: null, subOwn: /gpt-5\.6-luna と gpt-5\.6-terra/, subSet: /このモデルで/, square: null, def: null },
de: { name: "Codex-Modell für Erinnerungen", own: null, subOwn: /gpt-5\.6-luna und gpt-5\.6-terra/, subSet: /mit diesem Modell/, square: null, def: null },
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 },
};
const view = (page) => page.locator("#view-settings").evaluate((v) => v.scrollTop);
@@ -109,7 +109,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await row.locator("select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), w.name);
if (w.own) assert.equal((await pick.textContent()).trim(), w.own, "Codex's own pick by default");
assert.match(await row.locator(".sub").textContent(), w.subOwn);
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
// the title, its line and the button fit the row
const fit = await row.evaluate((r) => {
const box = r.getBoundingClientRect();
@@ -138,7 +138,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.locator("#pop #list li", { hasText: "GPT-5.4 mini" }).first().click();
await page.locator("#codexMemoriesPick button", { hasText: "GPT-5.4 mini" }).waitFor();
assert.deepEqual(sets, [{ agent: "codex", field: "memories", value: "gpt-5.4-mini" }]);
assert.match(await row.locator(".sub").textContent(), w.subSet);
assert.equal(await row.locator(".sub").count(), 0);
await page.waitForTimeout(300);
assert.equal(await view(page), before, "picking a model scrolled the page");
@@ -160,7 +160,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
// and Settings shows Codex's own again
await page.evaluate(() => show("settings"));
if (w.own) await page.locator("#codexMemoriesPick button", { hasText: w.own }).waitFor();
assert.match(await row.locator(".sub").textContent(), w.subOwn);
assert.equal(await row.locator(".sub").count(), 0);
assert.deepEqual(errors, []);
});
}
+7 -6
View File
@@ -3,7 +3,8 @@
// requests go through its own ChatGPT sign-in even on magpie's models): by
// default Codex's own (ChatGPT); the app's menu (no native select) offers
// Off and magpie's models; a pick posts settings/codex-titles on its own,
// the row says what now happens, and no click scrolls the Settings page.
// its button shows the choice under a name with no line of its own
// (1ooogle on X), and no click scrolls the Settings page.
// English and Chinese, Chromium and WebKit; no backend, the API is faked here.
const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
@@ -65,8 +66,8 @@ function server(lang, posted) {
}
const want = {
en: { name: "Codex thread titles", own: "Codex’s own (ChatGPT)", off: "Off", subOwn: /through its ChatGPT sign-in/, subOff: /sent nowhere/, subModel: /go to this model/ },
zh: { name: "Codex 会话标题", own: "Codex 自带(ChatGPT)", off: "关闭", subOwn: /ChatGPT 登录/, subOff: /不外发/, subModel: /改由此模型/ },
en: { name: "Codex thread titles", own: "Codex’s own (ChatGPT)", off: "Off" },
zh: { name: "Codex 会话标题", own: "Codex 自带(ChatGPT)", off: "关闭" },
};
const view = (page) => page.locator("#view-settings").evaluate((v) => v.scrollTop);
@@ -96,7 +97,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await page.locator("#codexTitlesRow select").count(), 0, "no native select");
assert.equal((await row.locator(".name").textContent()).trim(), want[lang].name);
assert.equal((await pick.textContent()).trim(), want[lang].own, "Codex's own by default");
assert.match(await row.locator(".sub").textContent(), want[lang].subOwn);
assert.equal(await row.locator(".sub").count(), 0, "the row says its name alone, its button the choice (1ooogle on X)");
// the chip's icon is the chip's size, not the row's 18–22px (duanckham on X)
assert.deepEqual(await pick.locator(".ic").evaluate((e) => [e.offsetWidth, e.offsetHeight]), [14, 14]);
@@ -117,7 +118,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.locator("#list li:not(.group)").filter({ hasText: want[lang].off }).first().click();
await page.locator("#codexTitlesPick button", { hasText: want[lang].off }).waitFor();
assert.deepEqual(posted, [["codex-titles", { model: "off" }]]);
assert.match(await row.locator(".sub").textContent(), want[lang].subOff);
assert.equal(await row.locator(".sub").count(), 0);
await page.waitForTimeout(300);
assert.equal(await view(page), before, "picking Off scrolled the page");
@@ -127,7 +128,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.locator("#list li:not(.group)").filter({ hasText: "DeepSeek V4 Flash" }).first().click();
await page.locator("#codexTitlesPick button", { hasText: "DeepSeek V4 Flash" }).waitFor();
assert.deepEqual(posted.at(-1), ["codex-titles", { model: "deepseek/deepseek-v4-flash" }]);
assert.match(await row.locator(".sub").textContent(), want[lang].subModel);
assert.equal(await row.locator(".sub").count(), 0);
// and back to Codex's own
await pick.click();
+1 -1
View File
@@ -178,7 +178,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.deepEqual(await tabs(page), ["agents", "sessions", "library", "providers", "routing", "gateway", "usage", "plugins"], where);
assert.deepEqual(await viewShown(page), ["view-agents"], where);
await page.locator("#prefs").click();
await page.waitForSelector("#langSegs .opt");
await page.waitForSelector("#langPick span");
assert.equal(await page.locator("#gatewayModeRow").isVisible(), web, `${where}: the switch`);
if (web) assert.match(await page.locator("#gatewayModeSub").textContent(), new RegExp(L[lang].off), where);
assert.deepEqual(errors, [], where);
+15 -12
View File
@@ -83,32 +83,35 @@ for (const [name, engine] of [["webkit", webkit], ["chromium", chromium]]) {
if (want === "zh") assert.deepEqual(got.units, ["1.33 亿", "6.8 万"]);
await page.close();
}
// Settings → Language holds six choices now: on a wide window they sit
// on one line, and on a narrow one they wrap inside the row rather
// than pushing the page sideways or cutting a name short
// Settings → Language is one menu button showing the language picked
// (1ooogle on X): it fits its row on a wide and a narrow window, and
// its menu lists all six, none cut short
for (const width of [1000, 440]) {
const page = await (await browser.newContext({ locale: "zh-TW", viewport: { width, height: 760 } })).newPage();
page.setDefaultTimeout(5000);
await page.route("**/*", serve("zh-TW"));
await page.goto("http://magpie.test/");
await page.locator("#prefs").click();
await page.locator("#langSegs .opt").first().waitFor();
await page.locator("#langPick span").first().waitFor();
const fit = await page.evaluate(() => {
const segs = document.querySelector("#langSegs"), row = segs.parentElement.getBoundingClientRect(), box = segs.getBoundingClientRect();
const b = document.querySelector("#langPick"), row = b.closest(".row").getBoundingClientRect(), box = b.getBoundingClientRect();
return {
inside: box.left >= row.left && box.right <= row.right + 0.5,
sideways: document.documentElement.scrollWidth > innerWidth,
cut: [...segs.querySelectorAll(".opt")].filter((o) => o.scrollWidth > o.clientWidth + 1).map((o) => o.textContent),
names: [...segs.querySelectorAll(".opt")].map((o) => o.textContent),
lines: new Set([...segs.querySelectorAll(".opt")].map((o) => Math.round(o.getBoundingClientRect().top))).size,
shown: b.textContent,
cut: b.querySelector("span").scrollWidth > b.querySelector("span").clientWidth + 1,
units: !document.querySelector("#unitsRow").hidden,
};
});
assert.deepEqual(fit.names, ["跟隨系統", "English", "简体中文", "繁體中文", "日本語", "Deutsch"]);
assert.ok(fit.inside && !fit.sideways, `${width}px: ${JSON.stringify(fit)}`);
assert.deepEqual(fit.cut, [], `${width}px`);
if (width === 1000) assert.equal(fit.lines, 1);
assert.equal(fit.shown, "繁體中文");
assert.ok(fit.inside && !fit.sideways && !fit.cut, `${width}px: ${JSON.stringify(fit)}`);
assert.ok(fit.units, "Number units (萬 / 億) is offered in Traditional Chinese too");
await page.locator("#langPick").click();
const items = page.locator(".proto-menu .pm-item");
await items.first().waitFor();
const menu = await items.evaluateAll((bs) => bs.map((b) => { const n = b.querySelector(".pm-name"); return { name: n.textContent, cut: n.scrollWidth > n.clientWidth + 1, inside: b.getBoundingClientRect().right <= innerWidth }; }));
assert.deepEqual(menu.map((m) => m.name), ["跟隨系統", "English", "简体中文", "繁體中文", "日本語", "Deutsch"]);
assert.ok(menu.every((m) => !m.cut && m.inside), `${width}px menu: ${JSON.stringify(menu)}`);
await page.close();
}
} finally { await browser.close(); }
+3 -1
View File
@@ -92,7 +92,9 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
for (const [id, label] of LANGS) {
await t.test(id, async () => {
await page.setViewportSize({ width: 830, height: 600 });
await page.locator("button", { hasText: new RegExp("^" + label + "$") }).first().click();
// Settings' language is one menu (1ooogle on X): opened, then the name picked
await page.locator("#langPick").click();
await page.locator(".proto-menu .pm-item", { hasText: new RegExp("^" + label + "$") }).first().click();
await page.waitForFunction((id) => locale === id, id);
await settled(page);
check(await header(page), `830px just switched to ${id}: ${JSON.stringify(await header(page))}`);
+6 -6
View File
@@ -1,7 +1,7 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// xiao_wang24004 on X: 能不能在里面加一个保持电脑任务常亮的选项呢?电脑在做任务
// 的过程中经常自动关闭了. Settings → General has a "Keep awake while agents
// work" row, off by default: On and Off are saved as keepAwake true and
// 的过程中经常自动关闭了. Settings → General has a "Prevent sleep" row
// (named so by 1ooogle on X), off by default: On and Off are saved as keepAwake true and
// false, the click moving nothing; another setting saved keeps it; a
// browser's page (magpie web, the gateway's own computer) shows it too.
// #975 (Hu9956: an agent recording the screen found it locked): a third
@@ -17,10 +17,10 @@ const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");
const assets = path.resolve(__dirname, "../assets");
const words = {
en: { name: "Keep awake while agents work", sub: "Keeps this computer from going to sleep by itself while agents work through magpie and for ten minutes after; the display may still turn off", on: "On", off: "Off", display: "Screen on too", displaySub: "Keeps this computer from going to sleep and its display on while agents work through magpie and for ten minutes after" },
zh: { name: "防止睡眠(Agent 工作时)", sub: "Agent 通过 magpie 工作时及之后十分钟内,阻止这台电脑自动睡眠;屏幕仍可能关闭", on: "开启", off: "关闭", display: "屏幕也常亮", displaySub: "Agent 通过 magpie 工作时及之后十分钟内,阻止这台电脑睡眠,屏幕也保持常亮、不锁屏" },
ja: { name: "エージェントの作業中はスリープしない", sub: "エージェントが magpie 経由で作業している間とその後 10 分間、このコンピューターが自動でスリープしないようにします。ディスプレイはオフになることがあります", on: "オン", off: "オフ", display: "画面もオン", displaySub: "エージェントが magpie 経由で作業している間とその後 10 分間、このコンピューターをスリープさせず、ディスプレイもオンのままにします" },
de: { name: "Wach halten, während Agenten arbeiten", sub: "Verhindert, dass dieser Computer von selbst in den Ruhezustand geht, während Agenten über magpie arbeiten, und zehn Minuten danach; der Bildschirm kann sich trotzdem ausschalten", on: "An", off: "Aus", display: "Bildschirm auch an", displaySub: "Verhindert, dass dieser Computer in den Ruhezustand geht, und hält den Bildschirm an, während Agenten über magpie arbeiten, und zehn Minuten danach" },
en: { name: "Prevent sleep", sub: "Keeps this computer awake while magpie runs tasks", on: "On", off: "Off", display: "Screen on too", displaySub: "Keeps this computer and its screen awake while magpie runs tasks" },
zh: { name: "防止休眠", sub: "在 magpie 运行任务时,让电脑保持唤醒状态", on: "开启", off: "关闭", display: "屏幕也常亮", displaySub: "在 magpie 运行任务时,让电脑和屏幕保持唤醒状态" },
ja: { name: "スリープを防ぐ", sub: "magpie がタスクを実行している間、このコンピューターをスリープさせません", on: "オン", off: "オフ", display: "画面もオン", displaySub: "magpie がタスクを実行している間、このコンピューターと画面をスリープさせません" },
de: { name: "Ruhezustand verhindern", sub: "Hält diesen Computer wach, während magpie Aufgaben ausführt", on: "An", off: "Aus", display: "Bildschirm auch an", displaySub: "Hält diesen Computer und den Bildschirm wach, während magpie Aufgaben ausführt" },
};
function serve(lang, web, posted, st) {
+2 -2
View File
@@ -13,8 +13,8 @@ const { watchSettingsReads, settingsDrawn } = require("./reader.cjs");
const assets = path.resolve(__dirname, "../assets");
const words = {
en: { name: "Lightweight mode", sub: "A closed panel or window frees its page after a minute, about 100 MB each, and loads it anew when opened", on: "On", off: "Off" },
zh: { name: "轻量模式", sub: "面板或窗口关闭约一分钟后释放其网页(每个约 100 MB),再次打开时重新加载", on: "开启", off: "关闭" },
en: { name: "Lightweight mode", sub: "A closed panel or window frees about 100 MB after a minute; opening it loads it again", on: "On", off: "Off" },
zh: { name: "轻量模式", sub: "面板或窗口关闭一分钟后释放约 100 MB,再次打开时重新加载", on: "开启", off: "关闭" },
};
function serve(lang, web, posted, st) {
+4 -4
View File
@@ -54,8 +54,8 @@ function server(lang, posted) {
}
const want = {
en: { labels: ["Off", "Not on names I set", "On"], sub: /^Agents’ lists put each model’s provider after its name, or not after names you set$/ },
zh: { labels: ["关闭", "自定义名称不带供应商", "开启"], sub: /^Agent 的模型列表在模型名后带上供应商,可设为自定义名称不带$/ },
en: { labels: ["Off", "Not on names I set", "On"] },
zh: { labels: ["关闭", "自定义名称不带供应商", "开启"] },
};
const view = (page) => page.locator("#view-settings").evaluate((v) => v.scrollTop);
@@ -82,8 +82,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
const segs = page.locator("#plainNamesSegs .opt");
await segs.first().waitFor();
const row = page.locator(".row.pref", { has: page.locator("#plainNamesSegs") });
assert.match(await row.locator(".sub").textContent(), want[lang].sub);
assert.equal(await row.locator(".sub").evaluate((e) => e.scrollWidth <= e.clientWidth), true, "the hint is cut short");
// the name says enough: no line under it (1ooogle on X)
assert.equal(await row.locator(".sub").count(), 0);
assert.deepEqual((await segs.allTextContents()).map((s) => s.trim()), want[lang].labels);
const own = segs.nth(1);
assert.equal(await own.evaluate((b) => b.classList.contains("on")), true, "plainOwnNames lights the middle one");
+2 -2
View File
@@ -119,7 +119,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.locator("#barIconSegs .opt").first().waitFor();
assert.equal((await page.locator(".om-theme-name").textContent()).trim(), "tokyo-night");
assert.equal(await page.locator("#themeSegs").isVisible(), false, "the theme is Omarchy's to pick");
assert.equal(await page.locator("#langSegs .opt").first().evaluate((b) => getComputedStyle(b).borderTopLeftRadius), "0px", "square");
assert.equal(await page.locator("#textSizeSegs .opt").first().evaluate((b) => getComputedStyle(b).borderTopLeftRadius), "0px", "square");
assert.equal((await page.locator("#barIconRow .name").textContent()).trim(), barName);
// On, then Off: each posted, the pick drawn, the page not moved
@@ -156,7 +156,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await page.route("**/*", server(lang, theme, { available: false, on: false }, asked, posted));
await page.goto("http://magpie.test/");
await page.locator("#prefs").click();
await page.locator("#langSegs .opt").first().waitFor();
await page.locator("#langPick span").first().waitFor();
await page.waitForTimeout(300);
assert(asked.includes("GET /api/omarchy/widget"));
assert.equal(await page.locator("#barIconRow").isVisible(), false);
+3 -3
View File
@@ -60,8 +60,8 @@ function server(lang, posted) {
}
const want = {
en: { name: "Provider in model names", sub: /provider after its name/, off: "Off", own: "Not on names I set", on: "On" },
zh: { name: "模型名带供应商", sub: /可设为自定义名称不带/, off: "关闭", own: "自定义名称不带供应商", on: "开启" },
en: { name: "Provider in model names", off: "Off", own: "Not on names I set", on: "On" },
zh: { name: "模型名带供应商", off: "关闭", own: "自定义名称不带供应商", on: "开启" },
};
const view = (page) => page.locator("#view-settings").evaluate((v) => v.scrollTop);
@@ -89,7 +89,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await segs.first().waitFor();
const row = page.locator(".row.pref", { has: page.locator("#plainNamesSegs") });
assert.equal((await row.locator(".name").textContent()).trim(), want[lang].name);
assert.match(await row.locator(".sub").textContent(), want[lang].sub);
assert.equal(await row.locator(".sub").count(), 0, "the name says enough (1ooogle on X)");
assert.deepEqual((await segs.allTextContents()).map((s) => s.trim()), [want[lang].off, want[lang].own, want[lang].on]);
assert.equal(await segs.nth(2).evaluate((b) => b.classList.contains("on")), true, "on by default");
+1 -1
View File
@@ -101,7 +101,7 @@ for (const engine of process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await watchSettingsReads(page);
await page.goto("http://magpie.test/?view=settings");
await settingsDrawn(page); // rows found are the ones that stay (#1659)
const description = page.locator(".row.pref .sub").filter({ hasText: /\S/ }).first();
const description = page.locator(".row.pref .sub:visible").filter({ hasText: /\S/ }).first(); // a shown one: Appearance has none now (1ooogle on X)
await description.waitFor();
for (const theme of ["light", "dark"]) {
await page.evaluate((value) => { document.documentElement.dataset.theme = value; }, theme);
@@ -0,0 +1,135 @@
// Run with Node's test runner and Playwright on the module path; see README.md.
// 1ooogle on X redrew Settings → General the way macOS System Settings reads:
// a row says its name alone where the name says enough, a line under it only
// where it tells something the name can't, and Language is one menu button
// showing the language picked, not six segments. In every language, at
// 1000px and 440px, in both engines, on a Mac (the Dock and Session terminal
// rows show only there), with the API faked:
// - the rows whose names say enough have no line under them, and the lines
// kept are each one line, not cut short on a wide window;
// - 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.
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(__dirname, "../assets");
const names = { en: "English", zh: "简体中文", "zh-TW": "繁體中文", ja: "日本語", de: "Deutsch" };
const appearance = { en: "Appearance", zh: "外观", "zh-TW": "外觀", ja: "外観", de: "Darstellung" };
const system = { en: "System", zh: "跟随系统", "zh-TW": "跟隨系統", ja: "システム", de: "System" };
// the rows whose name says enough, found by the control they hold
const bare = ["#themeSegs", "#langPick", "#textSizeSegs", "#traySegs", "#plainNamesSegs", "#codexTitlesPick", "#codexAutoReviewPick", "#loginSegs", "#dockSegs"];
// the rows that keep a line, one each
const kept = ["#fullContextSegs", "#lightweightSegs", "#keepAwakeSegs", "#sessionTerminalRow .sess-pick"];
function serve(lang, posted, st) {
const settings = () => ({ lang, theme: "light", searchVendors: [], searchAPIs: [], ...st });
return async (r) => {
const url = new URL(r.request().url());
const json = (data, status = 200) => r.fulfill({ status, json: data });
if (url.pathname === "/boot.js") return r.fulfill({ contentType: "text/javascript", body: `window.bootPrefs = {lang:"${lang}",theme:"light",web:false};` });
if (url.pathname === "/wails/runtime.js") return r.fulfill({ contentType: "text/javascript", body: "export const Window = {};" });
if (url.pathname === "/api/state") return json({ agents: [], profiles: [], settings: settings() });
if (url.pathname === "/api/settings") {
if (r.request().method() === "POST") {
const b = JSON.parse(r.request().postData());
posted.push(b);
Object.assign(st, b);
}
return json(settings());
}
if (url.pathname === "/api/providers") return json({ providers: [], presets: [], excluded: [], gateway: { running: true, window: true, url: "http://127.0.0.1:3999" } });
if (url.pathname === "/api/groups") return json({ models: [], groups: [], pools: [] });
if (url.pathname === "/api/plugins") return json({ plugins: [] });
if (url.pathname === "/api/usage/quotas") return json([]);
if (url.pathname.startsWith("/api/")) return json({});
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 r.fulfill({ body: await fs.readFile(file), 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 [1000, 440]) {
test(`${engine} ${lang} ${width}px: Settings → General says each name alone where it says enough, Language one menu`, 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: 760 } })).newPage();
page.setDefaultTimeout(5000);
const errors = [];
page.on("pageerror", (e) => errors.push(e.message));
await page.addInitScript(() => Object.defineProperty(navigator, "platform", { get: () => "MacIntel" }));
const posted = [], st = {};
await page.route("**/*", serve(lang, posted, st));
await watchSettingsReads(page);
await page.goto("http://magpie.test/?view=settings&tab=general");
await settingsDrawn(page);
await page.locator("#langPick span").waitFor();
const rows = await page.evaluate(([bare, kept]) => {
const row = (sel) => document.querySelector(sel)?.closest(".row");
return {
bare: bare.map((sel) => { const r = row(sel); return [sel, !r ? "missing" : r.hidden ? "hidden" : [...r.querySelectorAll(".sub")].filter((s) => s.getClientRects().length && s.textContent.trim()).map((s) => s.textContent)]; }),
kept: kept.map((sel) => {
const r = row(sel), s = r?.querySelector(".sub");
return [sel, !r || r.hidden ? "missing" : !s ? "no line" : { text: s.textContent, lines: Math.round(s.getBoundingClientRect().height / parseFloat(getComputedStyle(s).lineHeight || 16)), cut: s.scrollWidth > s.clientWidth + 1 }];
}),
stripes: [...document.querySelectorAll("#setPage-general .row")].filter((r) => parseFloat(getComputedStyle(r).borderLeftWidth) > 1).length,
sideways: document.documentElement.scrollWidth > innerWidth,
};
}, [bare, kept]);
for (const [sel, subs] of rows.bare) assert.deepEqual(subs, [], `${sel}'s row says its name alone`);
for (const [sel, sub] of rows.kept) {
assert.equal(typeof sub, "object", `${sel}: ${sub}`);
assert.ok(sub.text.trim() && sub.lines <= 1, `${sel}: ${JSON.stringify(sub)}`);
if (width === 1000) assert.equal(sub.cut, false, `${sel}'s line is cut short: ${sub.text}`);
}
assert.equal(rows.stripes, 0, "a row has a stripe down its left");
assert.equal(rows.sideways, false, "the page scrolls sideways");
// Language: one button showing the language, the app's menu listing all six
const pick = page.locator("#langPick");
assert.equal(await pick.evaluate((b) => b.tagName), "BUTTON");
assert.equal(await page.locator("#setPage-general select").count(), 0, "no native <select>");
assert.equal(await pick.innerText(), names[lang]);
const fits = await pick.evaluate((b) => { const r = b.closest(".row").getBoundingClientRect(), x = b.getBoundingClientRect(), s = b.querySelector("span"); return x.right <= r.right + 0.5 && x.left >= r.left && s.scrollWidth <= s.clientWidth + 1; });
assert.ok(fits, "the language button doesn't fit its row");
// the click moves nothing: the button stays under the pointer, even as
// the page drawn in another language grows above it (the view scrolls
// to hold it, as every click on Settings does)
const where = () => pick.evaluate((b) => { const v = document.querySelector("#view-settings"); return { top: b.getBoundingClientRect().top, inPage: b.getBoundingClientRect().top - b.closest(".set-page, section, [id^=setPage-]").getBoundingClientRect().top, scrolled: v.scrollTop }; });
const before = await where();
const b = await pick.boundingBox();
await page.mouse.click(b.x + b.width / 2, b.y + b.height / 2);
const items = page.locator(".proto-menu .pm-item");
await items.first().waitFor();
assert.equal(await pick.getAttribute("aria-expanded"), "true");
const menu = await items.evaluateAll((bs) => bs.map((b) => ({ name: b.querySelector(".pm-name").textContent, on: b.classList.contains("on"), inside: b.getBoundingClientRect().right <= innerWidth && b.getBoundingClientRect().left >= 0 })));
assert.deepEqual(menu.map((m) => m.name), [system[lang], "English", "简体中文", "繁體中文", "日本語", "Deutsch"]);
assert.deepEqual(menu.filter((m) => m.on).map((m) => m.name), [names[lang]]);
assert.ok(menu.every((m) => m.inside), `the menu runs off the window: ${JSON.stringify(menu)}`);
// pick another language: saved, and the page drawn in it
const to = lang === "ja" ? "de" : "ja";
const item = items.nth(["system", "en", "zh", "zh-TW", "ja", "de"].indexOf(to));
const ib = await item.boundingBox();
await page.mouse.click(ib.x + ib.width / 2, ib.y + ib.height / 2);
for (let i = 0; i < 50 && posted.at(-1)?.lang !== to; i++) await page.waitForTimeout(50);
assert.equal(posted.at(-1)?.lang, to, `posted ${JSON.stringify(posted)}`);
await page.waitForFunction(([n]) => document.querySelector("#langPick")?.textContent === n, [names[to]]);
const head = page.locator("#setPage-general .row .name").first();
for (let i = 0; i < 50 && (await head.innerText()) !== appearance[to]; i++) await page.waitForTimeout(50);
assert.equal(await head.innerText(), appearance[to]);
assert.equal(await page.locator(".proto-menu").count(), 0, "the menu stays open");
const after = await where();
assert.ok(Math.abs(after.inPage - before.inPage) <= 1, `the rows above the language moved: ${JSON.stringify([before, after])}`);
// a view at its top can't scroll up to hold it as the header above shrinks
if (after.scrolled > 0) assert.ok(Math.abs(after.top - before.top) <= 1, `the click moved the language button: ${JSON.stringify([before, after])}`);
assert.deepEqual(errors, []);
});
}
}
+1 -1
View File
@@ -114,7 +114,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
let s = await state(page);
assert.deepEqual([s.parts, s.tabs, s.none], [["general"], false, ""]);
assert(await seen(page, "#themeSegs"), "Appearance's row shows");
assert.equal(await seen(page, "#langSegs"), false, "Language's row doesn't");
assert.equal(await seen(page, "#langPick"), false, "Language's row doesn't");
assert.equal(await page.locator("#setPage-general").getAttribute("data-part"), await tr("General"));
assert.equal(await page.locator("#setPage-general").evaluate((p) => getComputedStyle(p, "::before").content), JSON.stringify(await tr("General")));
assert.deepEqual(await overflow(page), []);
+4 -2
View File
@@ -140,8 +140,10 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal((await page.locator("#textSizeRow .name").textContent()).trim(), name);
assert.deepEqual((await segs.allTextContents()).map((s) => s.trim()), ["100%", "110%", "125%", "150%"]);
assert.equal(await segs.nth(0).evaluate((b) => b.classList.contains("on")), true, "100% starts picked");
const sub = await page.locator("#textSizeSub").textContent();
assert(sub.includes(mod === "Meta" ? "⌘0" : "Ctrl+0"), sub);
// the name alone (1ooogle on X), the keys in the choices' tooltip
assert.equal(await page.locator("#textSizeRow .sub").count(), 0);
const tip = await page.locator("#textSizeSegs").getAttribute("title");
assert(tip.includes(mod === "Meta" ? "⌘0" : "Ctrl+0"), tip);
// scrolled a little (a real wheel), picking 125% moves nothing
await page.locator("#textSizeSegs").hover();