The Usage page's account cards told a window's whole ("Whole ≈ N tokens
· ≈ $X") only where it could be reckoned honestly, and said nothing
elsewhere, so a reader couldn't tell a window magpie can't reckon from
a fault (#2045 asked for "数据不足" there).
The server now says why on each window of an account's own card that
isn't reckoned (QuotaWindow.HoldsWhy):
- low: under 5% used (HoldsFloor);
- clock: no reset clock, so no known start;
- log: the window began before magpie's request log;
- none: magpie routed nothing the window counts in it;
- credits: a call in it may have been paid from credits or extra usage
(#2010's dry runs).
Windows whose whole is never told (a pool, a family, money aside, an
error card, another magpie's) carry no reason and say nothing, as
before. WithWindowHolds now also fills reasons when no window at all can
be reckoned; the caller's cards are still left unwritten.
The GUI shows a muted "Whole: not enough data" on the reset's line, with
the reason in its tooltip, in all five languages. A reason it doesn't
know says nothing. History cards are unchanged.
Run:
- go test ./internal/usage ./internal/gui: pass. The window-holds tests
check each reason, that reckoned windows carry none, and that the
caller's cards stay unwritten. Not writing HoldsWhy turns 3 tests red.
- quota-holds.test.cjs in Chromium and WebKit, en/zh/zh-TW/ja/de, at
360, 420, 440, 1000 and 1100: the line, its reason, muted, not cut,
inside its card. Removing the GUI branch turns it red. Screenshots at
420 in zh and de looked at.
- i18n-keys, quota-curve, keep-login, quota-name-translated in both
engines: pass.
- gofmt -l clean; go vet darwin, linux (-tags nogui), windows; linux and
windows builds.
Not tried: a real account's card in the running app.