The Usage page's bar chart tooltip wrote each row, the sum and the
request count in full (31,846,455 · 32,292,989). It now uses the page's
compact formatter: K/M in every language, 万/亿 (萬/億 in zh-TW) when
Chinese units are on. Cost and speed keep their long forms.
usage-compact-counts.test.cjs gets a chart point with the reporter's
numbers and hovers it in every language, at 1100px and 420px.
Run on mote:
- usage-compact-counts, chromium and webkit: 15/15 each.
- Related GUI files in both engines (gui-de/ja/zh-tw, i18n-keys,
number-units, panel-units-follow, panel-usage, quota-curve,
usage-chart-*, usage-ledger*, usage-speed*, usage-ttft-rounding,
usage-compact-counts, usage-model-at-provider, usage-sum-whole,
click-scroll): 674/681. The 7 reds are i18n-keys "a plugin's words
are its own" (#5332, #5426) and usage-ledger "newest live route needs
no return-to-live button" in both engines (#3104). Both are red the
same way at origin/main 1493acb46 without this change.
- TestCoreScriptBudget at the pushed head: under budget, not raised.
Broken by hand: with the old app.js the new test is red 0/15
("the tooltip says [31,846,455, 446,534, 32,292,989 · 123,456 requests]").
Not tried: the whole GUI suite; the real app with a live ledger.
skyhuang1994 on Discord: long token and request counts on Usage and
Routing are hard to read at a glance. They now go through fmtN (K/M/B,
in Chinese 万/亿), with the exact grouped number (ledNum) as the title,
so hovering shows it. A count that fmtN already writes in full gets no
title.
- Usage (plugins/usage/page.js): the Requests table's input, output and
cache cells (output keeps its reasoning line, cache write its TTLs
under the exact number), the Requests block, retried, the sources
tile and the ledger's sum line. sameRead moves here from app.js,
beside loadSessions, its only reader.
- app.js: the Tokens and Requests blocks (blk takes a title), the
ledger's call count, the rank's values and "{n} requests".
- Routing (plugins/routing/client.js): the day menu's note, the "more
days" name, the day rows and the stats.
Core scripts: 22 bytes smaller than their base (1533979 at this head;
TestCoreScriptBudget stays red on #5139 as on main, not worse).
Tests: usage-compact-counts.test.cjs is new (Usage and Routing, every
language, chromium and webkit, 420 and 1100px). panel-usage's rank
value expects "900K" with title "900,000"; ledger-cache-unknown's
counted cells expect fmtN text with ledNum as the title.
Run (mote-run):
- at ded9e4a62 (on c03dee7e3): TestCoreScriptBudget 1533979 (red, #5139),
usage-compact-counts, ledger-cache-unknown, panel-usage, i18n-keys:
50/50.
- at c533a569d (on 69eb93e0a): 136 GUI files (usage-*, ledger-*,
panel-usage, i18n-keys, routing day/stats files) 1868/1917. The reds,
rest-try-now (#5035, #2564), usage-agents-hide (#2276), usage-fold
(#3415), usage-ledger (#5048), ledger-swipe (#5223), usage-computers
(#5224), are red the same or worse on origin/main 0a5dc40ab in a
4-file run under the same load; c533a569d's 4-file run had a subset.
- at 56fff616a (on d5d48f4f9): 206 GUI files; besides the above,
tray-cell-click (#5215) red the same on origin/main 009076a2a.
Broken by hand: page.js, client.js and app.js put back to main's ->
usage-compact-counts and ledger-cache-unknown 0 pass / 42 fail;
restored.
Not tried: the real app with real usage data, the Linux WebKitGTK app,
Windows.