Commit Graph
3 Commits
Author SHA1 Message Date
yetone f90414f884 usage: the chart tests know the Traffic metric (ca5e537ec)
ca5e537ec added Traffic as the Requests chart's fifth metric, and two GUI
files it reaches were red after it, in Chromium and WebKit:
- usage-ledger-chart listed the metrics as four. It now lists Traffic
  (流量) too.
- usage-speed-tip at 420 wide: the five metrics wrap the chart-kind toggle
  under them, so the chart starts lower and its first column sat under
  the table's scroller pinned at the window's bottom (elementFromPoint
  was #ledHScroll), and the hover never reached it. The page wraps
  cleanly; the test now scrolls with the wheel until the column is clear
  of the bottom, waiting on that, not a duration. A scrollIntoView did
  not move the page (scrollY stayed 0).

Run (mote, at this tree on e364d27fc):
- usage-ledger-chart and usage-speed-tip: 28/28, Chromium and WebKit.
- Every usage*/ledger*/chart*/trend* GUI file (1529 tests): 55 red. The
  parent e364d27fc, without ca5e537ec: 54 red, the same tests, each
  filed: usage-agents-hide (#3414), usage-fold (#3415), usage-ledger
  "the Usage page's Requests" (#5048), usage-speed-all-models (#5834).
  The one more was usage-focus-steady chromium zh under the concurrent
  run (#3501); alone it is 3/3 green at this tree and at e364d27fc, and
  the live rate's poll touches only its own .led-rate line, none of the
  chart nodes that test watches.
- ca5e537ec's full go test ./... -timeout 45m (run at its tree before
  the rebase) had two reds, both fixed there: internal/cli
  TestEveryRouteHasACommandOrIsNamed (notYet names the route), and
  internal/gui TestCoreScriptBudget (green on the pushed base, where
  main's own app.js change made room). Every other package ok.
2026-11-10 09:17:54 +08:00
yetone ce8b67de37 gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called
page.goto with no timeout of its own, so Playwright held the first load
of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a
busy box (a whole-suite run at load 130-160) that load took longer and
goto timed out. The same pattern is in 988 GUI test files (1174 pages):
every one of them now also sets setDefaultNavigationTimeout(60000) on
the same page, right after its default, so goto, reload and waitForURL
wait on the load itself with room, while clicks and waits keep their
short bar. group-from-model-add's own 20s navigation bar is raised to the
same minute. claude-switch-only also gives its first provider row (drawn
from the page's first reads) a minute before clicking it.

nav-timeout.test.cjs (no browser) reads every GUI test file and names
each page given a default under a minute without a navigation timeout of
at least a minute, so a new file can't bring the pattern back.

What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from
other sessions):
- node --check on every file in internal/gui/tests: all parse.
- nav-timeout.test.cjs against origin/main's test files: red (names the
  1174 pages); against this tree: its only reds were my own probe copies
  of the old files, since removed.
- By hand: claude-switch-only with app.js served 7s late (a busy box's
  first load), --test-name-pattern "1100 en": origin/main's file 4 of 4
  red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green.
- claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420:
  32 of 32. group-from-model-add, usage-access-key-card and i18n-keys:
  green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red
  on a 5s waitForFunction at line 115 (a wait after load, not the
  navigation), at load ~230.

Not tried: the whole GUI suite (about 1000 files; the change is one
mechanical line per page), Windows or mote (mote's browsers, #4125).
2026-10-31 02:09:18 +08:00
yetone 73b2845500 gui: the Usage speed chart's tooltip shows each model's name whole, its speed and first token in columns (#2343, tsuixl)
Requests tab, Speed chart: the tooltip cut model names to "claude-sonnet-5..."
(.tip max-width 260px, names ellipsized), put each model's tok/s and TTFT
into one run of text, and wrapped the period's line. In speed mode the
tooltip is now a grid: swatch, the name in full (wrapping only when it
can't fit, never cut), the speed, and the first-token time, each in its
own column, so the numbers line up row to row; the "All · N requests" line
uses the same columns. Up to 400px wide and never wider than the chart.
The other metrics' tooltips are unchanged.

Run:
- New internal/gui/tests/usage-speed-tip.test.cjs (three long model
  names, en/zh, 1100 and 420 wide): chromium + webkit, 10 pass.
- Broken by hand: the test pointed at origin/main's assets
  (MAGPIE_SPEED_TIP_ASSETS) fails every subtest with
  "claude-sonnet-5-20260929-thinking is cut short".
- Neighbours, both engines: usage-ttft-rounding 6/6, usage-ledger-chart
  18/18, usage-speed 6/6, usage-speed-count 52/52, usage-chart-axis 10/10,
  usage-chart-dates 8/8, usage-ledger 34/34.
- Screenshots of the tooltip looked at in chromium en 1100 and webkit zh 420.
- No new strings, so zh-TW/ja/de have nothing new; their suites not run.
- No Go changed; go vet/build not run (disk near full).
- Not run: the whole GUI suite, Wails/WebKitGTK/Windows.

Full suite: SUITE_LINE
2026-10-15 23:08:01 +08:00