Commit Graph
3 Commits
Author SHA1 Message Date
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 0146800334 gui tests: a signed-out account's buttons are measured with the reason in one read, once laid out (#3642)
The test measured the row and its reason line first, then scrolled each
button into view and measured that button later. The editor's account row
is still settling when .aq-none appears: its content moves 2px within a
frame (measured), and at 420 in Chinese Remove wraps under Sign in again,
5px above the reason. A reflow between the two reads put a button against
where the reason had been a moment before. That is the "移除 is under the
reason" red in #3642: chromium zh 420, a different subtest per run, at the
base too.

The row, the reason and both buttons are now read in one evaluate, once
two reads 50ms apart agree (2s at most). The assertions are unchanged:
no overlap, inside the row, above the reason.

Run at this head (origin/main 158888d04):
- Injected a late reflow: a 26px block inserted above the buttons 30ms and
  120ms after .aq-none appears. The old test: 5 of 13 red in chromium, with
  "移除 is under the reason" and "Remove/Sign in again is under the
  reason", the reported failure. The new test: 13 of 13.
- Broken by hand: the reason pulled 20px up over the buttons
  (.aq margin-top -20px). The new test goes red with "… is under the
  reason" in every language and width.
- plugin-signed-out-account.test.cjs, chromium and webkit: 26 of 26.
- Not reproduced unaided: the red needed load at the time it was seen, and
  later runs at load 15 to 75 were green before this change too. The exact
  late reflow was not caught. The animations slowed tenfold (CDP
  Animation.setPlaybackRate) and a delayed usage reply did not bring the
  red back.

Not run: the whole GUI suite.

Fixes #3642
2026-10-26 03:49:25 +08:00
yetone e6f81585c4 gui: a plugin's signed-out account keeps Sign in again and Remove (#1363)
iamyhzhao: Grok, moved onto its plugin, reads as signed out after a
restart, and the row then has no Remove and no way to sign in again; the
only way out was moving to the built-in and back.

The account in use first never had a Remove, and a lapsed plugin account
in use still read as "In use" with the reason where Remove sits. Now a
plugin's account whose sign-in its vendor refused (marked lapsed, or its
allowance read saying the sign-in is gone, as signInGone reads it) shows
"Sign-in required", Sign in again (the plugin's sign-in) and Remove (asked
first, then login/forget), whatever else it is (in use, the agent's own).
Remove on a signed-out row shows without a hover. No new strings.

Run: new internal/gui/tests/plugin-signed-out-account.test.cjs in
Chromium and WebKit, en and zh, 420 and 1100 wide (26 pass); with this
app.js/app.css reverted it fails 18 (only the healthy-account cases
pass). account-*, own-signin-remove, saved-signedout-remove,
plugin-moved-signin, claude-auth-status, click-scroll, routing-account-*,
usage-accounts* and the rest of the 18 related files: 158 pass.
Not tried in the real window or with a real Grok account. A built-in
(non-plugin) account in use and lapsed is not changed.
2026-10-09 09:49:03 +08:00