codex: the takeover note names the phone connection the Codex app loses, beside Keep on ChatGPT (Mugenrikka on X)

Mugenrikka on X: once the Codex quota was used up, Codex opened through
magpie stopped connecting to the phone and the account's profile could
no longer be opened.

Cause. This is the used-up takeover (#540, codex.out): with the active
ChatGPT account held, magpie becomes Codex's provider without
requires_openai_auth, so the app-server's getAuthStatus/account/read
answer no account (codex-rs app-server get_account builds the account
from the provider). ChatGPT.app 26.1029's main process then takes the
host as an "execution-storage" identity, not a "chatgpt" one (its
early-bootstrap: authMethod chatgpt/chatgptAuthTokens -> chatgpt;
authMethod null and requiresOpenaiAuth false -> execution-storage), and
"Connect your phone" (remote control) and the profile go with it. magpie
never touches auth.json; the sign-in is still there.

Nothing can keep both. With requires_openai_auth = true the app reads
the account again, but its composer gate then greys Send for every
model while the account's /wham/usage says not allowed (checked in
b3a57b3d8 against the 26.1029 bundle), which is what the takeover
exists to get past; lifting that would mean faking the account's usage,
which magpie doesn't do. The owner's call (247794c61) is that sending
comes first. The way to keep the phone and the profile is already there:
Keep on ChatGPT on the takeover note (the sign-in's Always ChatGPT), or
keeping Codex signed in to that account (a5e3972a7), at the cost of a
grey Send till the reset.

What was wrong in magpie: the takeover note listed what is off (chats,
projects, browser use, cloud tasks, account, usage, Log out) but not the
phone connection, so nothing told the user why the phone stopped or that
Keep on ChatGPT has it back. The note at the reset, which says what the
app lacks until its app-server restarts, didn't name it either.

Change: both notes name the phone connection, in en, zh, zh-TW, ja, de.
codex.go's openaiAuth comment and agent-wiring.md say what the app does.

Tests: codex-app-out.test.cjs checks the hover and the opened row name
the phone connection; codex-app-back.test.cjs checks the reset note does.
Red on the old assets (new tests, HEAD's app.js and i18n.js, mote):
120 of 144 fail, "the hover says what is off, browser use and the phone
connection too" and "the row opened names the phone connection".

Run on mote at this tree (base b0d634b85): node --test of
codex-app-*, i18n-*, gui-* (de, ja, zh-tw) and codex-signin-always,
Chromium and WebKit, every language, 980 and 440px: 271 of 271 pass.
gofmt -l internal/agent clean; go vet ./internal/agent ok; go test
-tags nogui ./internal/gui ok (TestCoreScriptBudget included). The Go
change is a comment only.

Not tried: a real used-up account in the Codex app with a paired phone
(none at hand); what the app does was read from ChatGPT.app 26.1029's
bundle and codex-rs's app-server, not watched happen.
This commit is contained in:
yetone
2026-11-15 18:38:00 +08:00
parent b0d634b850
commit 4a4424ea84
6 changed files with 35 additions and 25 deletions
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -631,7 +631,11 @@ func codexIn(at place) *Agent {
// no token for a provider that is magpie, and the Codex app (ChatGPT.app
// 26.1021) switches to an identity of no account: its ChatGPT mode's
// chats and projects ("Work") are gone, as are Chrome control and cloud
// tasks, while magpie's models still answer (Qyburn3 on X). With it the
// tasks, while magpie's models still answer (Qyburn3 on X), and so is
// "Connect your phone" (remote control) and the profile: ChatGPT.app
// 26.1029 takes a getAuthStatus with no authMethod and
// requiresOpenaiAuth false as an "execution-storage" identity, not a
// ChatGPT one (Mugenrikka on X). With it the
// app keeps the account, and Codex still sends magpie's key
// (experimental_bearer_token) to magpie, no ChatGPT-Account-ID, its
// tools the same (image_gen kept): tried with ChatGPT.app 26.1021 and
+2 -2
View File
@@ -2042,7 +2042,7 @@ function appOutSaid(a) {
let s = o.user
? t("{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.", { user: o.user, agent: a.name })
: t("{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.", { agent: a.name });
s += " " + t("Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.", { agent: a.name });
s += " " + t("Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its phone connection, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.", { agent: a.name });
if (o.stuck) s += " " + t("magpie couldn't restart the {agent} app's app-server: quit the app and open it again to send.", { agent: a.name });
return s + " " + t("Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.", { agent: a.name });
}
@@ -2050,7 +2050,7 @@ function appOutSaid(a) {
// appBackSaid: Codex back on its ChatGPT account after the reset, its app
// on the app-server that read no account as it started (mail, 11-04)
function appBackSaid(a) {
return t("magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.", { agent: a.name });
return t("magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage, no phone connection and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.", { agent: a.name });
}
// appBackRestart: the Codex app's app-server restarted, so it reads its
+8 -8
View File
@@ -2507,10 +2507,10 @@ const I18N = {
"On magpie until the reset · ChatGPT allowance used up": "由 magpie 接管至额度重置 · ChatGPT 额度已用完",
"{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "{user} 的 ChatGPT 额度已用完,重置前由 magpie 接管 {agent} 的对话。",
"{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "{agent} 的 ChatGPT 额度已用完,重置前由 magpie 接管它的对话。",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "在此之前,{agent} 应用的 ChatGPT 功能暂时关闭:ChatGPT 聊天和项目、浏览器操作(Chrome 控制)、云端任务、账号、用量显示和退出登录。额度重置后,等应用的 app-server 重启就会恢复;届时这一行会提供重启按钮。",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its phone connection, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "在此之前,{agent} 应用的 ChatGPT 功能暂时关闭:ChatGPT 聊天和项目、浏览器操作(Chrome 控制)、云端任务、手机连接、账号、用量显示和退出登录。额度重置后,等应用的 app-server 重启就会恢复;届时这一行会提供重启按钮。",
"The {agent} app hit an error · quit it and open it again": "{agent} 应用出错了 · 请退出后重新打开",
"Back on ChatGPT · restart the {agent} app to see its account": "已回到 ChatGPT · 重启 {agent} 应用才能看到账号",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "额度重置后,magpie 已把 ChatGPT 账号还给 {agent}。但 {agent} 应用仍在用 magpie 接管期间启动的 app-server,所以在它重启前看不到账号、用量以及 ChatGPT 项目和对话。点“重启”即可立即重启;窗口保持不变。",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage, no phone connection and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "额度重置后,magpie 已把 ChatGPT 账号还给 {agent}。但 {agent} 应用仍在用 magpie 接管期间启动的 app-server,所以在它重启前看不到账号、用量、手机连接以及 ChatGPT 项目和对话。点“重启”即可立即重启;窗口保持不变。",
"Only its app-server restarts, for its ChatGPT account; its window stays. A running turn stops.": "只重启它的 app-server,以读取 ChatGPT 账号;窗口保持不变。正在运行的回合会停止。",
"Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "点「保持 ChatGPT」(即登录方式里的「始终 ChatGPT」)可让 {agent} 留在它的 ChatGPT 账号上:额度重置前它会显示自己的额度用尽提示,magpie 不再接管。",
"Keep on ChatGPT": "保持 ChatGPT",
@@ -7824,10 +7824,10 @@ const I18N = {
"On magpie until the reset · ChatGPT allowance used up": "由 magpie 接管至額度重設 · ChatGPT 額度已用完",
"{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "{user} 的 ChatGPT 額度已用完,重設前由 magpie 接管 {agent} 的對話。",
"{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "{agent} 的 ChatGPT 額度已用完,重設前由 magpie 接管它的對話。",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "在此之前,{agent} 應用的 ChatGPT 功能暫時關閉:ChatGPT 聊天和專案、瀏覽器操作(Chrome 控制)、雲端任務、帳號、用量顯示和登出。額度重設後,等應用的 app-server 重新啟動就會恢復;屆時這一行會提供重新啟動按鈕。",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its phone connection, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "在此之前,{agent} 應用的 ChatGPT 功能暫時關閉:ChatGPT 聊天和專案、瀏覽器操作(Chrome 控制)、雲端任務、手機連線、帳號、用量顯示和登出。額度重設後,等應用的 app-server 重新啟動就會恢復;屆時這一行會提供重新啟動按鈕。",
"The {agent} app hit an error · quit it and open it again": "{agent} 應用程式出錯了 · 請結束後重新開啟",
"Back on ChatGPT · restart the {agent} app to see its account": "已回到 ChatGPT · 重新啟動 {agent} 應用才能看到帳號",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "額度重設後,magpie 已把 ChatGPT 帳號還給 {agent}。但 {agent} 應用仍在使用 magpie 接管期間啟動的 app-server,所以在它重新啟動前看不到帳號、用量以及 ChatGPT 專案和對話。點「重啟」即可立即重新啟動;視窗保持不變。",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage, no phone connection and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "額度重設後,magpie 已把 ChatGPT 帳號還給 {agent}。但 {agent} 應用仍在使用 magpie 接管期間啟動的 app-server,所以在它重新啟動前看不到帳號、用量、手機連線以及 ChatGPT 專案和對話。點「重啟」即可立即重新啟動;視窗保持不變。",
"Only its app-server restarts, for its ChatGPT account; its window stays. A running turn stops.": "只重新啟動它的 app-server,以讀取 ChatGPT 帳號;視窗保持不變。正在執行的回合會停止。",
"Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "點「保持 ChatGPT」(即登入方式裡的「始終 ChatGPT」)可讓 {agent} 留在它的 ChatGPT 帳號上:額度重設前它會顯示自己的額度用盡提示,magpie 不再接管。",
"Keep on ChatGPT": "保持 ChatGPT",
@@ -13116,10 +13116,10 @@ const I18N = {
"On magpie until the reset · ChatGPT allowance used up": "リセットまで magpie が処理 · ChatGPT の利用枠を使い切りました",
"{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "{user} の ChatGPT の利用枠を使い切ったため、リセットまで magpie が {agent} のターンを処理します。",
"{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "{agent} の ChatGPT の利用枠を使い切ったため、リセットまで magpie がそのターンを処理します。",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "それまで {agent} アプリの ChatGPT 機能(ChatGPT のチャットとプロジェクト、ブラウザ操作(Chrome の操作)、クラウドタスク、アカウント、使用量の表示、ログアウト)はオフになります。リセット後、アプリの app-server が再起動すると戻ります。そのときこの行に再起動ボタンが出ます。",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its phone connection, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "それまで {agent} アプリの ChatGPT 機能(ChatGPT のチャットとプロジェクト、ブラウザ操作(Chrome の操作)、クラウドタスク、スマートフォンとの接続、アカウント、使用量の表示、ログアウト)はオフになります。リセット後、アプリの app-server が再起動すると戻ります。そのときこの行に再起動ボタンが出ます。",
"The {agent} app hit an error · quit it and open it again": "{agent} アプリでエラーが発生しました · 終了してもう一度開いてください",
"Back on ChatGPT · restart the {agent} app to see its account": "ChatGPT に戻りました · アカウントを表示するには {agent} アプリを再起動",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "リセット後、magpie は {agent} に ChatGPT アカウントを戻しました。ただし {agent} アプリは magpie が代わりに応答していた間に起動した app-server のままなので、再起動するまでアカウント、使用量、ChatGPT のプロジェクトとチャットは表示されません。「再起動」ですぐに再起動します。ウィンドウはそのままです。",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage, no phone connection and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "リセット後、magpie は {agent} に ChatGPT アカウントを戻しました。ただし {agent} アプリは magpie が代わりに応答していた間に起動した app-server のままなので、再起動するまでアカウント、使用量、スマートフォンとの接続、ChatGPT のプロジェクトとチャットは表示されません。「再起動」ですぐに再起動します。ウィンドウはそのままです。",
"Only its app-server restarts, for its ChatGPT account; its window stays. A running turn stops.": "app-server だけを再起動して ChatGPT アカウントを読み込ませます。ウィンドウはそのままです。実行中のターンは止まります。",
"Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "「ChatGPT のまま」(サインインの「常に ChatGPT」)を選ぶと {agent} は ChatGPT アカウントのままになります。リセットまではそのアプリ自身の上限メッセージが表示され、magpie は引き継ぎません。",
"Keep on ChatGPT": "ChatGPT のまま",
@@ -18439,10 +18439,10 @@ const I18N = {
"On magpie until the reset · ChatGPT allowance used up": "Über magpie bis zum Zurücksetzen · ChatGPT-Kontingent aufgebraucht",
"{user}'s ChatGPT allowance is used up, so magpie serves {agent}'s turns until it resets.": "Das ChatGPT-Kontingent von {user} ist aufgebraucht, daher bedient magpie die Anfragen von {agent}, bis es zurückgesetzt wird.",
"{agent}'s ChatGPT allowance is used up, so magpie serves its turns until it resets.": "Das ChatGPT-Kontingent von {agent} ist aufgebraucht, daher bedient magpie seine Anfragen, bis es zurückgesetzt wird.",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "Bis dahin ist die ChatGPT-Seite der {agent}-App aus: ihre ChatGPT-Chats und -Projekte, Browser-Nutzung (ihre Chrome-Steuerung), Cloud-Aufgaben, ihr Konto, ihre Nutzungsanzeige und Abmelden. Nach dem Zurücksetzen kommt sie wieder, sobald der App-Server der App neu startet: Diese Zeile bietet dann den Neustart an.",
"Till then the {agent} app's ChatGPT side is off: its ChatGPT chats and projects, browser use (its Chrome control), cloud tasks, its phone connection, its account, its usage meter and Log out. They come back after the reset, once the app's app-server restarts: this row offers the restart then.": "Bis dahin ist die ChatGPT-Seite der {agent}-App aus: ihre ChatGPT-Chats und -Projekte, Browser-Nutzung (ihre Chrome-Steuerung), Cloud-Aufgaben, die Verbindung zum Handy, ihr Konto, ihre Nutzungsanzeige und Abmelden. Nach dem Zurücksetzen kommt sie wieder, sobald der App-Server der App neu startet: Diese Zeile bietet dann den Neustart an.",
"The {agent} app hit an error · quit it and open it again": "Die {agent}-App hat einen Fehler · beende sie und öffne sie erneut",
"Back on ChatGPT · restart the {agent} app to see its account": "Wieder bei ChatGPT · {agent}-App neu starten, um das Konto zu sehen",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "magpie hat {agent} nach dem Zurücksetzen sein ChatGPT-Konto zurückgegeben. Die {agent}-App läuft noch auf dem App-Server, den sie startete, während magpie sie bediente, und zeigt darum kein Konto, keine Nutzung und keine ihrer ChatGPT-Projekte oder -Chats, bis dieser neu startet. „Neu starten“ erledigt das jetzt; das Fenster bleibt offen.",
"magpie gave {agent} back its ChatGPT account after the reset. The {agent} app still runs on the app-server it started while magpie served it, so it shows no account, no usage, no phone connection and none of its ChatGPT projects or chats until that restarts. Restart does it now; its window stays.": "magpie hat {agent} nach dem Zurücksetzen sein ChatGPT-Konto zurückgegeben. Die {agent}-App läuft noch auf dem App-Server, den sie startete, während magpie sie bediente, und zeigt darum kein Konto, keine Nutzung, keine Verbindung zum Handy und keine ihrer ChatGPT-Projekte oder -Chats, bis dieser neu startet. „Neu starten“ erledigt das jetzt; das Fenster bleibt offen.",
"Only its app-server restarts, for its ChatGPT account; its window stays. A running turn stops.": "Nur sein App-Server startet neu, um sein ChatGPT-Konto zu lesen; das Fenster bleibt offen. Ein laufender Turn wird angehalten.",
"Keep on ChatGPT (its sign-in's Always ChatGPT) leaves {agent} on its ChatGPT account instead: it shows its own limit message till the reset, and magpie no longer takes it over.": "„Bei ChatGPT bleiben“ (bei der Anmeldung „Immer ChatGPT“) lässt {agent} stattdessen bei seinem ChatGPT-Konto: Bis zum Zurücksetzen zeigt es seine eigene Limit-Meldung, und magpie übernimmt nicht mehr.",
"Keep on ChatGPT": "Bei ChatGPT bleiben",
+7 -5
View File
@@ -22,11 +22,11 @@ const codex = (appBack) => ({
});
const words = {
en: { line: "Back on ChatGPT", why: "no usage", proj: "projects", restart: "Restart", done: "Codex app-server restarted" },
zh: { line: "已回到 ChatGPT", why: "用量", proj: "项目", restart: "重启", done: "Codex 的 app-server 已重启" },
"zh-TW": { line: "已回到 ChatGPT", why: "用量", proj: "專案", restart: "重啟", done: "Codex 的 app-server 已重新啟動" },
ja: { line: "ChatGPT に戻りました", why: "使用量", proj: "プロジェクト", restart: "再起動", done: "Codex の app-server を再起動しました" },
de: { line: "Wieder bei ChatGPT", why: "keine Nutzung", proj: "Projekte", restart: "Neu starten", done: "App-Server von Codex neu gestartet" },
en: { line: "Back on ChatGPT", why: "no usage", proj: "projects", phone: "no phone connection", restart: "Restart", done: "Codex app-server restarted" },
zh: { line: "已回到 ChatGPT", why: "用量", proj: "项目", phone: "手机连接", restart: "重启", done: "Codex 的 app-server 已重启" },
"zh-TW": { line: "已回到 ChatGPT", why: "用量", proj: "專案", phone: "手機連線", restart: "重啟", done: "Codex 的 app-server 已重新啟動" },
ja: { line: "ChatGPT に戻りました", why: "使用量", proj: "プロジェクト", phone: "スマートフォンとの接続", restart: "再起動", done: "Codex の app-server を再起動しました" },
de: { line: "Wieder bei ChatGPT", why: "keine Nutzung", proj: "Projekte", phone: "Verbindung zum Handy", restart: "Neu starten", done: "App-Server von Codex neu gestartet" },
};
function serve(lang, posts) {
@@ -93,6 +93,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.ok(s.includes(w.why), "the row opened says why: " + s);
// what the reporter missed: the app's ChatGPT projects (Herzz____ on X)
assert.ok(s.includes(w.proj), "the row opened names the projects: " + s);
// and the phone connection, which comes back with the account (Mugenrikka on X)
assert.ok(s.includes(w.phone), "the row opened names the phone connection: " + s);
assert.doesNotMatch(s, /\{\w+\}/);
go = page.locator(`${row} .ag-app-back + .ag-vl button`);
await page.waitForFunction(() => {
+12 -8
View File
@@ -9,7 +9,11 @@
// names browser use, which the Codex app's Chrome control loses with
// magpie its provider, and the row opened offers Keep on ChatGPT right
// there, posted as the sign-in's Always ChatGPT (eddie.zhan on Discord:
// browser use said it had no permission). Every language, both engines,
// browser use said it had no permission). It names the phone connection
// too: the Codex app ties "Connect your phone" to its ChatGPT account, which
// it doesn't read while magpie is the provider (Mugenrikka on X: the phone
// stopped connecting and the profile was gone, with nothing saying why or
// that Keep on ChatGPT has them back). Every language, both engines,
// wide and narrow. No backend, the API is faked.
const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
@@ -26,11 +30,11 @@ const codex = (appOut) => ({
});
const words = {
en: { until: "On magpie until", reset: "On magpie until the reset", stuck: "quit and reopen the Codex app", off: "cloud tasks", browser: "browser use", keep: "Keep on ChatGPT" },
zh: { until: "由 magpie 接管至", reset: "由 magpie 接管至额度重置", stuck: "退出并重新打开 Codex 应用", off: "云端任务", browser: "浏览器操作", keep: "保持 ChatGPT" },
"zh-TW": { until: "由 magpie 接管至", reset: "由 magpie 接管至額度重設", stuck: "結束並重新開啟 Codex 應用", off: "雲端任務", browser: "瀏覽器操作", keep: "保持 ChatGPT" },
ja: { until: "まで magpie が処理", reset: "リセットまで magpie が処理", stuck: "Codex アプリを終了して開き直して", off: "クラウドタスク", browser: "ブラウザ操作", keep: "ChatGPT のまま" },
de: { until: "Über magpie bis", reset: "Über magpie bis zum Zurücksetzen", stuck: "beende die Codex-App", off: "Cloud-Aufgaben", browser: "Browser-Nutzung", keep: "Bei ChatGPT bleiben" },
en: { until: "On magpie until", reset: "On magpie until the reset", stuck: "quit and reopen the Codex app", off: "cloud tasks", browser: "browser use", phone: "its phone connection", keep: "Keep on ChatGPT" },
zh: { until: "由 magpie 接管至", reset: "由 magpie 接管至额度重置", stuck: "退出并重新打开 Codex 应用", off: "云端任务", browser: "浏览器操作", phone: "手机连接", keep: "保持 ChatGPT" },
"zh-TW": { until: "由 magpie 接管至", reset: "由 magpie 接管至額度重設", stuck: "結束並重新開啟 Codex 應用", off: "雲端任務", browser: "瀏覽器操作", phone: "手機連線", keep: "保持 ChatGPT" },
ja: { until: "まで magpie が処理", reset: "リセットまで magpie が処理", stuck: "Codex アプリを終了して開き直して", off: "クラウドタスク", browser: "ブラウザ操作", phone: "スマートフォンとの接続", keep: "ChatGPT のまま" },
de: { until: "Über magpie bis", reset: "Über magpie bis zum Zurücksetzen", stuck: "beende die Codex-App", off: "Cloud-Aufgaben", browser: "Browser-Nutzung", phone: "Verbindung zum Handy", keep: "Bei ChatGPT bleiben" },
};
function serve(lang, agents, sets = []) {
@@ -86,7 +90,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.ok(text.includes(w[kind]), `${JSON.stringify(text)} lacks ${JSON.stringify(w[kind])}`);
assert.doesNotMatch(text, /\{\w+\}/);
const title = await page.locator(`${row} .ag-st-t`).getAttribute("title");
assert.ok(title && title.includes(w.off) && title.includes(w.browser), "the hover says what is off, browser use too: " + title);
assert.ok(title && title.includes(w.off) && title.includes(w.browser) && title.includes(w.phone), "the hover says what is off, browser use and the phone connection too: " + title);
assert.ok(title.includes(w.keep), "the hover names Keep on ChatGPT: " + title);
assert.ok(title.includes("spent@example.com"), "the hover names the account: " + title);
assert.doesNotMatch(title, /\{\w+\}/);
@@ -95,7 +99,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
const said = page.locator(`${row} .ag-app-out`);
await said.waitFor();
const s = await said.textContent();
assert.ok(s.includes(w.off) && s.includes(w.browser), "the row opened says what is off, browser use too: " + s);
assert.ok(s.includes(w.off) && s.includes(w.browser) && s.includes(w.phone), "the row opened says what is off, browser use and the phone connection too: " + s);
assert.doesNotMatch(s, /\{\w+\}/);
const side = await page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
assert.ok(side <= 1, "scrolls sideways: " + side);