jasonchia58 on X (macOS, v0.1.3119): the number at the top right of
Library → RTK's chart (1.6M) stopped changing, while the total under the
chart kept growing. That number is the bars' scale: the busiest day's
(or week's) input in the range, shown bare since 5b43bdd61. It changes
only when a day passes the old busiest, so it read as a stuck total.
Nothing on main changed it since 3119.
It now says "peak day 1.2M" / "peak week 1.2M" (zh 单日最高, zh-TW 單日最高,
ja 1日の最大, de Stärkster Tag), in the library plugin's own words, and
a range with nothing in it shows none. The total stays under the chart.
The Usage page's charts have the same bare peak (plugins/usage/page.js
875 and 4315); filed as #6517, not changed here.
Tests:
- internal/library/testdata/rtk-gain-daily.json is real rtk 1.0.1
`rtk gain --daily --format json` output from a sandbox HOME;
TestRTKGainRealDaily parses it and checks the days add up to the
summary.
- library-rtk-chart.test.cjs feeds those days (moved to end yesterday)
through a faked /api/library/rtk, chromium and webkit, en/zh/zh-TW/ja/de
at 980 and 420px: the head says the peak, the busiest bar is the one
at full height, the foot is the total; an empty 30-day range has no
peak.
Run on mica (base 5b25d7e9e, then again after the rebase onto
49d7adef7: gofmt, the provider and library tests, library-rtk-chart,
library-rtk-gain, i18n-keys, i18n-en-no-cjk all pass): gofmt -l clean; go test
./internal/library ok; GOOS=darwin/windows go vet and GOOS=linux go vet
-tags nogui of internal/{provider,library,gui} ok; GUI files
library-rtk-chart, library-rtk-gain, library-rtk-admin,
library-rtk-nohook, i18n-keys, i18n-en-no-cjk all pass (both engines).
Broken by hand: the old head (bare tokens(peak)) makes all 12
library-rtk-chart subtests red.
Also run: go test -tags nogui ./internal/gui ./internal/provider: red
only on TestCoreScriptBudget (1,268,751 > 1,268,645, the same number
#6518 records at base 5b25d7e9e; this change adds no core script) and
TestHostBuildsNoList (#6479); editor-hints webkit red as in #6156.
Not run: the full Go suite and the whole GUI suite.