Files
magpie/docs
yetoneandhhh2210 94c70a2dd9 gui: the tray's Allowances cards say "Resets 14:26", not a bare ↻ that read as a button, and each card has the Usage page's own refresh (#840, hhh2210)
In the tray panel the first reset deadline was drawn as "↻ 14:26": text
with no click handler, which reads as a refresh to click (hhh2210 clicked
it). It now uses resetText, "Resets 14:26" / "重置于 14:26", as the
Usage page does; the other windows keep "Weekly Oct 31".

The tray cards also had no per-card refresh. They now get the main
window's quotaRefresh, the same single-card API and response-order
guard, at the start of the line under the account (the deadline, the
error, "Unlimited", or a balance's name): opened as the card is hovered
or the button is focused, spinning while it reads, closed taking no room
(the balance row's flex gap is closed with it). renderPanelQuota puts the
focus back on the button after the redraw. A failed read keeps the
figures and says the error in the footer, as on the Usage page.

Based on hhh2210's fork commit 9ea883ffb. Kept: the reset label, the
refresh on every tray card kind, the focus kept through the redraw, the
test's fixtures. Trimmed for the owner's UI restraint: the always-visible
24px button and the new "Updated N ago" row on every card (now hover-
revealed in the existing line, as on the Usage page), and the new status
texts (reading / cached, no new data / refresh failed / Claude's 30s
interval), which the Usage page's own refresh doesn't have either. No new
strings: "Resets {when}" and "Refresh this card" exist in every language.

Run (macOS arm64, Playwright 1.62.0, Chromium and WebKit):
- panel-quota-refresh.test.cjs, rewritten for this behaviour: 20/20,
  en/zh/zh-TW/ja/de at 440 and 360px tray widths.
- Broken by hand, each red with its own message: the ↻ label back ("the
  deadline says 重置于, got ↻ 14:31"); no refresh in the deadline line
  ("has its own refresh"); no focus restore ("the redraw keeps the
  focus"); no .pq-card:hover rule (hover never opens it); the error card
  without one ("kimi has its own refresh"); without the .pq-bn margin the
  closed button moved the balance's logo ("relay's closed refresh moves
  nothing").
- 68 GUI files that open the tray's Allowances or the Usage refresh
  (every mode=panel file reading usage/quotas, usage-card-refresh,
  quota-balance-error, usage-remote-*, quota-read-at): 943/944. The one
  red, usage-fold chromium "the view didn't scroll" 184 !== 180, is red
  alone on origin/main 95e7c6bcc too and is filed as #2163.
- No Go change.

Full suite: SUITE_LINE

Co-authored-by: hhh2210 <hzy2210@gmail.com>
2026-10-15 23:08:01 +08:00
..