Files
magpie/internal
yetone 9be1bc4562 gui: Settings' menu-bar allowance picker lists a key's plan and balance as one row, not two "Command Code" rows ticked together (#1658, MizuIro-H)
658fbdc14 merged a key's plan and balance into one card on the Usage
page and the tray panel (keyCards), but the picker under Settings ›
Allowances › Shown beside the icon still built its rows from the
unmerged quotas. MizuIro-H's Command Code key reports a plan card and a
balance card, neither with a user, so both rows were "Command Code" with
the same trayCardID ("commandcode"), and ticking one showed both ticked.

The picker now takes keyCards' list, as the Usage page does. A balance
keyCards leaves on its own (a stale stand-in) whose id another row
already has is left out: the menu bar resolves an id to the first card
that has it (trayPick), so a second row of that id could only ever tick
the first. A failed balance was already left out (it has an error).

Run:
- tray-usages.test.cjs: a new test from the reporter's `magpie quota
  --json` (Codex, Command Code plan + balance with no user, SudoCode,
  DeepSeek) plus a plan with a stale balance, in Chromium and WebKit, en,
  zh, zh-TW, ja, de: each card is one row, ticking Command Code ticks
  that row alone and saves ["commandcode"]. With the old app.js all 10
  fail: the names list has "Command Code" and "Kimi Code" twice.
- every tray*.test.cjs and key-balance-card.test.cjs, both engines,
  --test-concurrency=4: 60 pass, 0 fail.
- Not run: the real Windows tray with a real Command Code key.
2026-10-13 05:21:04 +08:00
..
settings: keep awake can keep the display on too (#975, Hu9956: magpie's keep-awake held the system up, but the screen still went black and locked, and their agents record the screen to check their work, which a locked screen stops) — Settings › General's "Keep awake while agents work" row now has three segments, Off / On / Screen on too, saved as keepAwake and the new keepAwakeDisplay (default off, so On and every existing settings.json behave as before). awake.Keep takes a Level (Off, System, Display) in place of a bool; a level changed while held releases and takes the hold anew. On a Mac the display level runs caffeinate -i -d -w <pid> (pmset -g assertions on a caffeinate of the same flags shows PreventUserIdleDisplaySleep beside PreventUserIdleSystemSleep); on Windows SetThreadExecutionState gets ES_DISPLAY_REQUIRED too; on Linux logind's idle inhibitor (systemd-inhibit --what=idle:sleep, unchanged) is all there is, and whether the screen stays on is up to the desktop. keepAwakeDisplay is this computer's own (KeepOwn) and goes in prefsKeep, so another setting's save keeps it. The row's line says the display stays on when it's chosen; it keeps its English in data-en, so a language change re-translates it. zh/ja/de strings added. No TUI or CLI has keep-awake, so none changed. TestKeepDisplay (taken once, taken anew with the display, not again at the same level, back to System, released at Off), TestCaffeinateArgs, TestExecutionState (GOOS=windows test build) and TestKeepAwakeKeptAndOwn cover it; go test ./internal/awake ./internal/settings ./internal/gui ./internal/gateway pass, -race -count=5 on awake. keep-awake.test.cjs now runs en/zh/ja/de at 900px and 440px in Chromium and WebKit (display posts keepAwake+keepAwakeDisplay true, the line changes, another setting's save keeps it, segments fit the row, On and Off clear it, no click moves the page): 32/32 twice; gui-ja, gui-de, i18n-keys and click-scroll pass. go vet (darwin, windows, linux), darwin, linux (nogui) and windows builds pass. Not tried with an agent recording the screen; the reporter is asked to confirm.
2026-10-06 15:33:28 +08:00
…
…