Commit Graph
2 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 aa766289bf gui: a routing group switched on no longer folds away the one provider's models
shiqi_40904 on Discord (#general, 10-27): with Codex as the provider,
switching a routing group of their own on made models go missing from an
agent's model list, and switching it off brought them back.

The cause is in the agent model list dialog. A section with more than 8
models starts folded when the list has more than one section, so that
several providers can be told apart. The Routing groups section counted as
one. With only Codex serving there is one section and Codex's 10 models
show. Switch a group on and there are two sections, so Codex's 10 start
folded under a "Codex 10 / 10" header with no rows. Nothing was missing on
the server side: /api/state's options and counts for every agent only
gained the group (27 -> 28 in the sandbox).

Now only provider sections count toward folding. With two or more
providers the long ones still start folded, as before
(agent-models.test.cjs is unchanged and passes).

Run (worktree at origin/main 5e3dd1d52 + this commit):
- Sandbox: HOME under scratchpad, magpie built from this tree with -tags
  dev, Codex upstream faked on 127.0.0.1:3713, app on 3711/3712, found
  groups off, a second provider off, Codex connected. Before: group mygpt
  off -> Codex 10 rows; on -> Routing groups 1 row, Codex 0 rows. After:
  on -> Routing groups 1 row (MyGPT), Codex 10 rows; off -> Codex 10 rows.
  With the second provider back on, both providers still start folded.
- New agent-models-group-on.test.cjs, chromium + webkit, en + zh, group
  off and on: 8/8 pass. Broken by hand (old rule put back): the 4
  "group on" cases fail on "every Codex model is on the screen".
- GUI files that reach the dialog (agent-connect-all-hidden,
  agent-models*, agent-model-groups, codex-model-order,
  desktop-model-menu, cursor-local-models, grip-inset,
  popover-mac-chrome, zcode-models) + i18n-keys: 286/286 pass.
- go test -timeout 45m ./internal/gui/: all ok except
  TestMainWindowCorners. Both of its SDK subtests were killed at the 40s
  deadline at load ~175 (#1936, #2645). Run alone afterwards: ok in 43.7s.
  No Go files changed, so gofmt and vet have nothing new to check.

Not tried: the whole GUI suite (~900 files, at load 150-175; the change
reads no new API and adds no strings). Codex's own /model inside the
Codex app, which this list doesn't decide. Nor the reporter's separate
note that GPT 6.1 sol was missing in Codex itself.

Reported-by: shiqi_40904 (Discord)
2026-10-27 11:00:23 +08:00