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.