Opening Usage called quotasOpened() whatever tab it opened on, so a
switch to the page on its Requests or Sessions tab started an asked
read of every vendor's allowance and the allowance history beside the
tab's own read, and the frame the switch drew waited on all of it.
Only the Overview shows the allowances; it now alone asks for them.
Clicking the Overview subtab still asks (loadUsage(true)).
allowance-open-read: leaving the page on Requests and coming back past
the 30s gap asks no vendor and no history; clicking the Overview then
asks once.
Run on mote at this tree, rebased on origin/main 96115018c (its one
new commit, #4072, touches the gateway keys page and CSS only; the
list below ran again after that rebase):
- node --test allowance-open-read, claude-usage-asked, refresh-page,
usage-refresh, usage-refresh-flight, usage-stale-answer, quota-reads,
quota-refresh-order, usage-quota-head, usage-loops, i18n-keys
(chromium and webkit, en and zh): pass 123, fail 0.
- go test -tags nogui -run Budget ./internal/gui: ok.
- Broken by hand (back to `if (asked) quotasOpened()`): the four
allowance-open-read Usage-page runs go red, 5 !== 4.
- usage-ledger's 'newest live route needs no return-to-live button' is
red in both engines, the same alone on a clean origin/main 11cbf4de1
copy; filed as #3104 and #4078.
Not tried: part two of #4064 (Routing's frame loop while an agent
runs) is not in this commit.
Reported-by: xisdumpling (#4064)