Skip to content

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

gui: Check in now says what the press came to, not "refreshed" (#3326)

yetonea77b5b4fc9eb
diff --git a/docs/subsystems/provider-plugins.md b/docs/subsystems/provider-plugins.md
index a97afc1fd..650d30b7a 100644
--- a/docs/subsystems/provider-plugins.md
+++ b/docs/subsystems/provider-plugins.md
@@ -44,7 +44,7 @@ A plugin can press its vendor's daily check-in (签到) itself: its `auth` hook
The hook returns `{outcome, credit?, streak?, message?}`. `outcome` is one of `claimed` (checked in now), `done` (already in today), `ineligible`, `inactive` (no check-in event now), `captcha` or `failed`. A throw, or an outcome not in that list, is `failed` with the reason. `captcha` means the vendor wants a captcha: magpie never solves one, and says "check in in its own app" instead. A plugin must not solve captchas either.
-[`plugin_checkin.go`](../../internal/provider/plugin_checkin.go) runs these through the same `checkiner` as the built-in check-ins ([`checkin.go`](../../internal/provider/checkin.go)): each signed-in, in-use account once a Beijing day, the first look 2 minutes after start and then every 30 minutes, a `failed` asked again after 30 minutes, every other outcome settled for the day. A `done`, `inactive` or `ineligible` answered before noon Beijing (`checkinSureHour`) for an account magpie hasn't seen claim that Beijing day is provisional (`provisional`, #3326): a vendor whose day turns at UTC midnight (08:00 Beijing) or later still answers yesterday's "already" at 00:00, and magpie took it for today's and never asked again. The loop asks it again 30 minutes after the answer, until a claim or an answer from noon on, so at most 24 more asks a day and none once magpie claims; a press (`soon`) asks it again at once, whatever the hour, since the vendor's answer is what the press is for. A claim stamps `Claimed`, carried over while later answers that day say done, so a done after magpie's own claim is settled. Such a record is sent with `again: true` (`shown`, never kept), and the card, Settings, TUI and CLI say the vendor said already checked in and magpie asks again later, not "Checked in today", and the card keeps *Check in now*. A vendor whose day turns after noon Beijing (a US day) is not covered. The Qoder and Qoder CN plugins are the exception, as magpie's own Qoder check-in is (`recheck`, `pluginRechecks`, #2696): a campaign can open mid-day (Qoder CN's ran 10:00 to 09:59 the next day), so the loop asks again 30 minutes after the last answer whatever it was, and *Check in now* asks at once, and their card keeps *Check in now* for an `inactive` result. Every other plugin keeps the day's result. Results are kept in `plugin-checkin.json` by `provider|<sign-in key>` (`pluginCheckinKey`: the key `plugin-auth.json` keeps the sign-in under, `autoclaw` or `autoclaw#x1y2z3`), never by the display name: two sign-ins can share a name (AutoClaw's default can't be changed), and keyed by it only the first of them was ever checked in, by the loop or *Check in now* (plugins#254). The sign-in key holds over a refresh and over signing in to the same account again (`settle` in `host.js` puts it back under its key); a sign-in made after one was signed out the same day may take the freed key, and with it that day's result. An entry kept by `provider|<display name>` before then is carried over once the plugin's accounts are listed (`adoptLegacyPluginCheckins`): a check-in goes to the first sign-in in use of that name, the one the old key asked, and only to it, so its namesakes are asked and none twice; an `Off` in `settings.CheckinOff` goes to every sign-in of that name, since none of them was checked in while it was off. A `plugin-checkin.json` that can't be read or parsed is left as it is and carried over once it reads; until then no plugin account is checked in, and each says why (`readCheckins`, as for every vendor's check-in file). A failure is recorded as failed and never resets an account, a key or a previous day's result. Each account's Usage card has the check-in row (`checkinBy: "plugin:<provider>"`), and Settings → Usage has a Plugins tab with a Daily check-in switch per provider (`settings.PluginCheckins`, `POST /api/settings/plugin-checkin {provider, on}`; *Check in now* is `POST /api/usage/plugin-checkin {provider}`). `magpie accounts checkin` and `c` on the TUI's Usage page include them. Every check-in, built-in or a plugin's, also skips an account listed in `settings.CheckinOff` by its file key (#1902): `checkinNow` asks nothing for it, by the loop or a press, `CheckinAccounts()` lists each account with its own `on` for Settings (`checkinAccounts`, a row each under the vendor's switch when it has two or more, `POST /api/settings/checkin-account {key, on}`), and its card carries `checkinOff`.
+[`plugin_checkin.go`](../../internal/provider/plugin_checkin.go) runs these through the same `checkiner` as the built-in check-ins ([`checkin.go`](../../internal/provider/checkin.go)): each signed-in, in-use account once a Beijing day, the first look 2 minutes after start and then every 30 minutes, a `failed` asked again after 30 minutes, every other outcome settled for the day. A `done`, `inactive` or `ineligible` answered before noon Beijing (`checkinSureHour`) for an account magpie hasn't seen claim that Beijing day is provisional (`provisional`, #3326): a vendor whose day turns at UTC midnight (08:00 Beijing) or later still answers yesterday's "already" at 00:00, and magpie took it for today's and never asked again. The loop asks it again 30 minutes after the answer, until a claim or an answer from noon on, so at most 24 more asks a day and none once magpie claims; a press (`soon`) asks it again at once, whatever the hour, since the vendor's answer is what the press is for. A claim stamps `Claimed`, carried over while later answers that day say done, so a done after magpie's own claim is settled. Such a record is sent with `again: true` (`shown`, never kept), and the card, Settings, TUI and CLI say the vendor said already checked in and magpie asks again later, not "Checked in today", and the card keeps *Check in now*. A vendor whose day turns after noon Beijing (a US day) is not covered. The Qoder and Qoder CN plugins are the exception, as magpie's own Qoder check-in is (`recheck`, `pluginRechecks`, #2696): a campaign can open mid-day (Qoder CN's ran 10:00 to 09:59 the next day), so the loop asks again 30 minutes after the last answer whatever it was, and *Check in now* asks at once, and their card keeps *Check in now* for an `inactive` result. Every other plugin keeps the day's result. Results are kept in `plugin-checkin.json` by `provider|<sign-in key>` (`pluginCheckinKey`: the key `plugin-auth.json` keeps the sign-in under, `autoclaw` or `autoclaw#x1y2z3`), never by the display name: two sign-ins can share a name (AutoClaw's default can't be changed), and keyed by it only the first of them was ever checked in, by the loop or *Check in now* (plugins#254). The sign-in key holds over a refresh and over signing in to the same account again (`settle` in `host.js` puts it back under its key); a sign-in made after one was signed out the same day may take the freed key, and with it that day's result. An entry kept by `provider|<display name>` before then is carried over once the plugin's accounts are listed (`adoptLegacyPluginCheckins`): a check-in goes to the first sign-in in use of that name, the one the old key asked, and only to it, so its namesakes are asked and none twice; an `Off` in `settings.CheckinOff` goes to every sign-in of that name, since none of them was checked in while it was off. A `plugin-checkin.json` that can't be read or parsed is left as it is and carried over once it reads; until then no plugin account is checked in, and each says why (`readCheckins`, as for every vendor's check-in file). A failure is recorded as failed and never resets an account, a key or a previous day's result. Each account's Usage card has the check-in row (`checkinBy: "plugin:<provider>"`), and Settings → Usage has a Plugins tab with a Daily check-in switch per provider (`settings.PluginCheckins`, `POST /api/settings/plugin-checkin {provider, on}`; *Check in now* is `POST /api/usage/plugin-checkin {provider}`). The press says what it came to, a count per kind (`checkinPressSaid`, #3326): claimed now with the credits, already checked in today, not available yet (`inactive`, `ineligible`, or an `again` answer), to check in in the vendor's own app, failed; a result is claimed now only when it carries `asked` (`Asked`, sent but never kept), so an account claimed earlier today counts as already. `magpie accounts checkin` and `c` on the TUI's Usage page include them. Every check-in, built-in or a plugin's, also skips an account listed in `settings.CheckinOff` by its file key (#1902): `checkinNow` asks nothing for it, by the loop or a press, `CheckinAccounts()` lists each account with its own `on` for Settings (`checkinAccounts`, a row each under the vendor's switch when it has two or more, `POST /api/settings/checkin-account {key, on}`), and its card carries `checkinOff`.
The switch is off by default. For a provider whose vendor magpie checked in through the plugin's fetch before (WorkBuddy, Trae CN, MiniMax Code, Qoder), it follows that vendor's existing switch until set on its own, and magpie's own check-in leaves that provider's accounts to the plugin (`pluginChecksIn`), so an account is never checked in twice.
diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js
index 4aaf9072f..071ac399a 100644
--- a/internal/gui/assets/app.js
+++ b/internal/gui/assets/app.js
@@ -17783,8 +17783,8 @@ function checkinRow(q, first, subs) {
now.classList.add("busy");
try {
const rs = await api("usage/" + vendor.api, vendor.plugin ? { provider: vendor.plugin } : {});
- const bad = (rs || []).filter((x) => x.outcome === "failed").length;
- status(bad ? t("Check-in failed for {n} account(s)", { n: bad }) : t("Check-in status refreshed"), bad ? "err" : "ok");
+ const said = checkinPressSaid(rs);
+ status(said.text, said.bad ? "err" : "ok");
} catch (err) {
status(err.message, "err");
}
@@ -17795,6 +17795,22 @@ function checkinRow(q, first, subs) {
return row;
}
+// checkinPressSaid: what a press came to, a count per kind (#3326)
+function checkinPressSaid(rs) {
+ const n = {};
+ let cr = 0;
+ for (const r of rs || []) {
+ const o = r.outcome, k = r.again || o === "inactive" || o === "ineligible" ? "Not available yet: {n}"
+ : o === "claimed" && r.asked ? "Claimed: {n}"
+ : o === "claimed" || o === "done" ? "Already checked in today: {n}"
+ : o === "captcha" || o === "own-app" ? "Check in in its own app: {n}" : "Check-in failed for {n} account(s)";
+ n[k] = (n[k] || 0) + 1;
+ if (r.asked && o === "claimed") cr += r.credit || 0;
+ }
+ const bad = n["Check-in failed for {n} account(s)"] || 0;
+ return { bad, text: Object.keys(n).map((k) => t(k === "Claimed: {n}" && cr ? "Claimed: {n} (+{credits} credits)" : k, { n: n[k], credits: Math.round(cr * 100) / 100 })).join(" · ") || t("Check-in status refreshed") };
+}
+
// checkinVendorName is the vendor of check-in r by name: a plugin's as
// it says, a built-in check-in's own, else fallback.
function checkinVendorName(r, fallback) {
diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js
index 56c6b2acd..1f0f7c48d 100644
--- a/internal/gui/assets/i18n.js
+++ b/internal/gui/assets/i18n.js
@@ -1143,6 +1143,11 @@ const I18N = {
"As claiming the daily credits in Qoder does": "和在 Qoder 里领取每日积分一样",
"Check-in failed for {n} account(s)": "{n} 个账号签到失败",
"Check-in status refreshed": "签到状态已刷新",
+ "Claimed: {n} (+{credits} credits)": "已领取:{n}(+{credits} 积分)",
+ "Claimed: {n}": "已领取:{n}",
+ "Already checked in today: {n}": "今日已签到过:{n}",
+ "Not available yet: {n}": "暂不可签到:{n}",
+ "Check in in its own app: {n}": "需在其自家应用签到:{n}",
"Emails, phone numbers, ID and bank card numbers too": "邮箱、手机号、身份证号和银行卡号也一并脱敏",
"Social Security numbers": "美国社会安全号",
"US SSNs, in the ranges that are given out": "美国 SSN,只认实际会发放的号段",
@@ -5032,6 +5037,11 @@ const I18N = {
"As claiming the daily credits in Qoder does": "和在 Qoder 裡領取每日積分一樣",
"Check-in failed for {n} account(s)": "{n} 個帳號簽到失敗",
"Check-in status refreshed": "簽到狀態已重新整理",
+ "Claimed: {n} (+{credits} credits)": "已領取:{n}(+{credits} 點數)",
+ "Claimed: {n}": "已領取:{n}",
+ "Already checked in today: {n}": "今日已簽到過:{n}",
+ "Not available yet: {n}": "暫不可簽到:{n}",
+ "Check in in its own app: {n}": "需在其自家應用程式簽到:{n}",
"Emails, phone numbers, ID and bank card numbers too": "郵箱、手機號、身份證號和銀行卡號也一併脫敏",
"Social Security numbers": "美國社會安全碼",
"US SSNs, in the ranges that are given out": "美國 SSN,只認實際會發放的號段",
@@ -8891,6 +8901,11 @@ const I18N = {
"As claiming the daily credits in Qoder does": "Qoder で毎日のクレジットを受け取るのと同じです",
"Check-in failed for {n} account(s)": "{n} 件のアカウントでチェックインに失敗しました",
"Check-in status refreshed": "チェックイン状態を更新しました",
+ "Claimed: {n} (+{credits} credits)": "受け取り済み:{n}(+{credits} クレジット)",
+ "Claimed: {n}": "受け取り済み:{n}",
+ "Already checked in today: {n}": "今日はすでにチェックイン済み:{n}",
+ "Not available yet: {n}": "まだチェックインできません:{n}",
+ "Check in in its own app: {n}": "各サービスのアプリでチェックイン:{n}",
"Emails, phone numbers, ID and bank card numbers too": "メールアドレス、電話番号、ID 番号、銀行カード番号もマスクします",
"Social Security numbers": "社会保障番号",
"US SSNs, in the ranges that are given out": "米国の SSN。実際に発行される範囲のものだけ",
@@ -12780,6 +12795,11 @@ const I18N = {
"As claiming the daily credits in Qoder does": "Wie das Abholen der täglichen Credits in Qoder",
"Check-in failed for {n} account(s)": "Check-in für {n} Konto/Konten fehlgeschlagen",
"Check-in status refreshed": "Check-in-Status aktualisiert",
+ "Claimed: {n} (+{credits} credits)": "Eingelöst: {n} (+{credits} Credits)",
+ "Claimed: {n}": "Eingelöst: {n}",
+ "Already checked in today: {n}": "Heute bereits eingecheckt: {n}",
+ "Not available yet: {n}": "Noch nicht verfügbar: {n}",
+ "Check in in its own app: {n}": "In der eigenen App einchecken: {n}",
"Emails, phone numbers, ID and bank card numbers too": "Auch E-Mail-Adressen, Telefonnummern, Ausweis- und Bankkartennummern",
"Social Security numbers": "Sozialversicherungsnummern",
"US SSNs, in the ranges that are given out": "US-SSNs, nur in den Bereichen, die vergeben werden",
diff --git a/internal/gui/core_budget_test.go b/internal/gui/core_budget_test.go
index 6fed24fb3..9a07dd780 100644
--- a/internal/gui/core_budget_test.go
+++ b/internal/gui/core_budget_test.go
@@ -15,8 +15,8 @@ import (
// so a page can't quietly grow back into the core; a change that needs more
// raises them and says why in its commit.
const (
- appScriptBudget = 1_337_735 // app.js: 1,198,239 after Usage left (P2); 1,218,098 with the 10-15 fixes to pages still in the core; 1,232,466 with the provider editor's Advanced fold and every dialog holding its place, the core's own (10-16); 1,250,533 with the quota refresh kept through redraws, the core's own since the tray panel draws it too, plus 1.5% (#2397); 1,269,083 with Free first's option in the provider editor's ROUTINGS, which the Routing page reads too, plus 1.5%; 1,272,726 with the Providers page drawing its last list at once (#1519), the core's page, and the Routing trace's account names read without Object.entries (#1481), plus 1.5%; a dialog growing out of the row that opened it and folding back into it, the core's own since every page's dialogs open through it (10-20); Codex's and Claude Code's own settings moved from Settings into the agent's row on the Agents page, the core's own since the tray panel and the window both draw them (10-20); 1,314,432 with Settings › Privacy's record of what was masked (its summary, the records view and the local model's controls), which belongs to Settings, the core's own, plus 1.5%; 1,336,481 with a provider's Names & levels saying Provider in model names is Settings' and opening it there (joe), and Settings' Image recognition saying where a custom provider's model is marked (nexnull), both in the core's own pages, with no room added (10-23); 1,337,633 with Settings › Models › Replies' Intent classifier timeout (#2934, reyoung), Settings' own row, drawn by waitRow, which the Image generation timeout's row now shares, with no room added; 1,337,735 with the provider editor's link naming a partner's page by its own host (siteHost) instead of usemagpie.ai's /go link, the core's own editor, with no room added (10-23)
- coreScriptBudget = 1_529_495 // every core script: 1,358,034 after Usage left; 1,380,003 with them; 1,405,937 with the fold; 1,426,102 with 10-16's core work (the GitHub list loading, the move to plugins, Settings › Long conversations), plus 1.5% (#2612); 1,447,368 with loadBack, the window's one state read per return, which every page needs and so is the core's own (1,446,845 before it, 155 bytes under), plus 1.5%; OpenCode Zen's card saying OpenCode tells no key its balance adds ~390 bytes inside it; 1,472,589 with the dialog that grows out of its row and the agents' own settings in their rows, on main's 10-20 core work (the Providers page's last list, the Routing trace's names), plus 1.5% (10-20); 1,506,192 with Settings › Privacy's record of what was masked, plus 1.5%; 1,529,393 with the Intent classifier timeout row (#2934), with no room added; 1,529,495 with the editor's partner link host, with no room added
+ appScriptBudget = 1_338_084 // app.js: 1,198,239 after Usage left (P2); 1,218,098 with the 10-15 fixes to pages still in the core; 1,232,466 with the provider editor's Advanced fold and every dialog holding its place, the core's own (10-16); 1,250,533 with the quota refresh kept through redraws, the core's own since the tray panel draws it too, plus 1.5% (#2397); 1,269,083 with Free first's option in the provider editor's ROUTINGS, which the Routing page reads too, plus 1.5%; 1,272,726 with the Providers page drawing its last list at once (#1519), the core's page, and the Routing trace's account names read without Object.entries (#1481), plus 1.5%; a dialog growing out of the row that opened it and folding back into it, the core's own since every page's dialogs open through it (10-20); Codex's and Claude Code's own settings moved from Settings into the agent's row on the Agents page, the core's own since the tray panel and the window both draw them (10-20); 1,314,432 with Settings › Privacy's record of what was masked (its summary, the records view and the local model's controls), which belongs to Settings, the core's own, plus 1.5%; 1,336,481 with a provider's Names & levels saying Provider in model names is Settings' and opening it there (joe), and Settings' Image recognition saying where a custom provider's model is marked (nexnull), both in the core's own pages, with no room added (10-23); 1,337,633 with Settings › Models › Replies' Intent classifier timeout (#2934, reyoung), Settings' own row, drawn by waitRow, which the Image generation timeout's row now shares, with no room added; 1,337,735 with the provider editor's link naming a partner's page by its own host (siteHost) instead of usemagpie.ai's /go link, the core's own editor, with no room added (10-23); 1,338,084 with Check in now saying what the press came to (claimed +credits, already today, not available yet) where it said "refreshed" (#3326), the check-in row the tray panel draws too, the core's own, with no room added (10-23)
+ coreScriptBudget = 1_529_844 // every core script: 1,358,034 after Usage left; 1,380,003 with them; 1,405,937 with the fold; 1,426,102 with 10-16's core work (the GitHub list loading, the move to plugins, Settings › Long conversations), plus 1.5% (#2612); 1,447,368 with loadBack, the window's one state read per return, which every page needs and so is the core's own (1,446,845 before it, 155 bytes under), plus 1.5%; OpenCode Zen's card saying OpenCode tells no key its balance adds ~390 bytes inside it; 1,472,589 with the dialog that grows out of its row and the agents' own settings in their rows, on main's 10-20 core work (the Providers page's last list, the Routing trace's names), plus 1.5% (10-20); 1,506,192 with Settings › Privacy's record of what was masked, plus 1.5%; 1,529,393 with the Intent classifier timeout row (#2934), with no room added; 1,529,495 with the editor's partner link host, with no room added; 1,529,844 with Check in now's press summary (#3326), with no room added
)
func TestCoreScriptBudget(t *testing.T) {
diff --git a/internal/gui/tests/checkin-early-done.test.cjs b/internal/gui/tests/checkin-early-done.test.cjs
index 79c5562bf..ba2cd8481 100644
--- a/internal/gui/tests/checkin-early-done.test.cjs
+++ b/internal/gui/tests/checkin-early-done.test.cjs
@@ -5,7 +5,9 @@
// magpie asks again (again: true) is not shown as today's check-in: its
// card says the vendor said already, magpie asks again later, and keeps
// Check in now, whose press asks the vendor. A done answer magpie keeps
-// (no again) is still "Checked in today" with no press. English,
+// (no again) is still "Checked in today" with no press. The press says
+// what came of it: claimed now (+credits), already checked in today, not
+// available yet, failed. English,
// Simplified and Traditional Chinese, Japanese and German, the window and
// the panel's 440px; the API is faked here.
const assert = require("node:assert/strict");
@@ -37,7 +39,7 @@ function serve(lang, asked) {
if (url.pathname === "/api/settings") return json(settings);
if (url.pathname === "/api/usage/plugin-checkin") {
asked.push(route.request().postDataJSON());
- return json([{ outcome: "claimed", credit: 200 }]);
+ return json([{ user: "hu", outcome: "claimed", credit: 200, asked: true }]);
}
if (url.pathname === "/api/providers") return json({ providers: [], presets: [], excluded: [], gateway: { running: true, window: true } });
if (url.pathname === "/api/usage/quotas") return json(quotas());
@@ -57,6 +59,13 @@ const again = {
ja: "AutoClaw CN はチェックイン済みと答えましたが、まだ日付が切り替わっていない可能性があるため、magpie は後でもう一度確認します",
de: "AutoClaw CN meldet bereits eingecheckt; sein Tag hat vielleicht noch nicht gewechselt, daher fragt magpie später erneut",
};
+const said = {
+ en: { claimed: "Claimed: 1 (+200 credits)", already2: "Already checked in today: 2", notYet3: "Not available yet: 3", mixed: "Claimed: 2 (+150 credits) · Already checked in today: 1 · Check-in failed for 1 account(s)" },
+ zh: { claimed: "已领取:1(+200 积分)", already2: "今日已签到过:2", notYet3: "暂不可签到:3", mixed: "已领取:2(+150 积分) · 今日已签到过:1 · 1 个账号签到失败" },
+ "zh-TW": { claimed: "已領取:1(+200 點數)", already2: "今日已簽到過:2", notYet3: "暫不可簽到:3", mixed: "已領取:2(+150 點數) · 今日已簽到過:1 · 1 個帳號簽到失敗" },
+ ja: { claimed: "受け取り済み:1(+200 クレジット)", already2: "今日はすでにチェックイン済み:2", notYet3: "まだチェックインできません:3", mixed: "受け取り済み:2(+150 クレジット) · 今日はすでにチェックイン済み:1 · 1 件のアカウントでチェックインに失敗しました" },
+ de: { claimed: "Eingelöst: 1 (+200 Credits)", already2: "Heute bereits eingecheckt: 2", notYet3: "Noch nicht verfügbar: 3", mixed: "Eingelöst: 2 (+150 Credits) · Heute bereits eingecheckt: 1 · Check-in für 1 Konto/Konten fehlgeschlagen" },
+};
const done = { en: "Checked in today +50", zh: "今日已签到 +50", "zh-TW": "今日已簽到 +50", ja: "今日はチェックイン済み +50", de: "Heute eingecheckt +50" };
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
@@ -87,8 +96,14 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
assert.equal(await now.count(), 1, "an answer magpie asks again keeps Check in now");
await reach(page, now);
await now.click();
- await page.waitForFunction(() => document.querySelector("#status")?.textContent);
+ await page.waitForFunction((want) => document.querySelector("#status")?.textContent === want, said[lang].claimed);
assert.deepEqual(asked, [{ provider: "autoclaw-cn" }], "the press asks the vendor");
+ // what a press says, each kind (the coordinator's ask on #3326)
+ const say = (rs) => page.evaluate((rs) => checkinPressSaid(rs).text, rs);
+ assert.equal(await say([{ outcome: "claimed", credit: 200 }, { outcome: "done" }]), said[lang].already2);
+ assert.equal(await say([{ outcome: "done", again: true }, { outcome: "inactive" }, { outcome: "ineligible" }]), said[lang].notYet3);
+ assert.equal(await say([{ outcome: "claimed", credit: 100, asked: true }, { outcome: "claimed", credit: 50, asked: true }, { outcome: "done" }, { outcome: "failed" }]), said[lang].mixed);
+ assert.equal(await page.evaluate(() => checkinPressSaid([{ outcome: "failed" }]).bad), 1);
assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth), "no sideways scroll");
assert.deepEqual(errors, []);
});
diff --git a/internal/gui/tests/qoder-checkin-recheck.test.cjs b/internal/gui/tests/qoder-checkin-recheck.test.cjs
index 06e3818ef..33d29dc60 100644
--- a/internal/gui/tests/qoder-checkin-recheck.test.cjs
+++ b/internal/gui/tests/qoder-checkin-recheck.test.cjs
@@ -3,10 +3,10 @@
// so magpie asks Qoder's check-in again, the built-in's and the Qoder and
// Qoder CN plugins', on a press. A Qoder account whose check-in found no
// campaign (inactive) today keeps Check in now on its card, built-in
-// (checkinBy "qoder") and plugin ("plugin:qoder-cn") alike, and the press
-// says the check-in was refreshed rather than "Checked in", since it may
-// still find none. Another vendor's inactive, a plugin's included, is
-// settled for the day and has no press. After LoKi's patch on the issue.
+// (checkinBy "qoder") and plugin ("plugin:qoder-cn") alike, and a press
+// that finds none again says it is not available yet rather than
+// "Checked in" (#3326). Another vendor's inactive, a plugin's included,
+// is settled for the day and has no press. After LoKi's patch on the issue.
// English, Simplified and Traditional Chinese, Japanese and German, the
// window and the panel's 440px; the API is faked here.
const assert = require("node:assert/strict");
@@ -53,7 +53,7 @@ function serve(lang, asked) {
};
}
-const refreshed = { en: "Check-in status refreshed", zh: "签到状态已刷新", "zh-TW": "簽到狀態已重新整理", ja: "チェックイン状態を更新しました", de: "Check-in-Status aktualisiert" };
+const refreshed = { en: "Not available yet: 1", zh: "暂不可签到:1", "zh-TW": "暫不可簽到:1", ja: "まだチェックインできません:1", de: "Noch nicht verfügbar: 1" };
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
for (const lang of ["en", "zh", "zh-TW", "ja", "de"]) {
diff --git a/internal/provider/workbuddy_checkin.go b/internal/provider/workbuddy_checkin.go
index d421bf443..82eefbd60 100644
--- a/internal/provider/workbuddy_checkin.go
+++ b/internal/provider/workbuddy_checkin.go
@@ -120,8 +120,10 @@ type WorkBuddyCheckin struct {
// Vendor is a plugin's provider by name, for a check-in By
// "plugin:<id>"; never kept.
Vendor string `json:"vendor,omitempty"`
- // Asked is true of one checked in on this run, not one read back.
- Asked bool `json:"-"`
+ // Asked is true of one checked in on this run, not one read back;
+ // sent so a press can tell a claim now from one earlier today.
+ // Never kept: the file is written before it is set.
+ Asked bool `json:"asked,omitempty"`
// Claimed is when magpie last saw the account's credits claimed,
// carried over while later answers that day say done: a done after
// magpie's own claim is the day's, one before it may be yesterday's