Files
magpie/internal/gui/assets/plugins/usage
yetone 34ad18ed86 gui: a session's row helpers move from app.js to the Usage page's script (#3367)
TestCoreScriptBudget was red on main since db48697d6 (app.js 1,338,090
over its 1,337,735 budget), and 673651e8d took app.js to 1,338,819 and
the core's scripts to 1,530,579 (budget 1,529,495). The budget is not
raised.

What moved: sessModelNames, wslBadge, sessModelsText, sessUsageDetail
and viaText, unchanged, from app.js into plugins/usage/page.js's
"sessions" section. Nothing in app.js calls them. Their callers are
plugins/usage/page.js (the Usage page's Sessions tab) and
plugins/sessions/client.js (the Sessions page), which calls them only
from inside its mount/render callbacks, after page.js has loaded
(index.html loads page.js after app.js and before start.js, which
mounts the pages). Their words stay in i18n.js, since both pages say
them.

Bytes (at this commit):
- app.js: 1,338,819 -> 1,336,507 (budget 1,337,735; 1,228 under)
- core scripts: 1,530,579 -> 1,528,267 (budget 1,529,495; 1,228 under)
- plugins/usage/page.js: 170,601 -> 173,032, +2,431 with the section's comment (not core)

Run at 673651e8d + this change (origin/main fetched, unmoved):
- go test -tags nogui ./internal/gui/...: ok (TestCoreScriptBudget, the
  i18n and guard tests included)
- GUI, node --test, Chromium and WebKit, playwright 1.62.0: 39 files,
  467/467 pass: every sessions-*, session-*, usage-sessions*,
  usage-session-speed, usage-unpriced-*, sess-agent-strip,
  account-mask-sessions, i18n-keys, old-webkit, mobile-web, phone-web
  and web-page test.
- gofmt -l: none; go vet ./internal/gui/... on darwin, linux (nogui)
  and windows: ok.

Not run: the whole GUI suite (other sessions were queued on the
machine's suite turn), and no Go code changed, so no full go test ./....
2026-10-23 17:41:11 +08:00
..