Follow-up to ggbdpq's change before this one. Looking for an app-side
cause behind the WebKit zh red found none. With ?view=providers the
view comes before lastView, and renderProviders draws #movable
synchronously once /api/providers is read. Run alone, the notice is up
20 to 40ms after the load event. What the 5s wait covered is the boot
that follows goto's load event: /api/state, then /api/providers, then
the rows. Under the whole suite's load that boot ran past a limit meant
for one action on a loaded page.
ggbdpq's 15s had no basis beyond being longer. The boot is the second
half of the navigation, so it gets the navigation's minute, which #4470
gave every page.goto. The waits inside a loaded page keep 5s. The
pageerror filter matched "due to access control checks" anywhere, in
either engine. It is now anchored to WebKit and to "Fetch API cannot
load …", as title-bar-tools and usage-fold have it (#1350).
Broken by hand on mote: with /api/providers held 6s in the test's
serve, webkit zh is red at a 5s wait ("locator.waitFor: Timeout 5000ms
exceeded … #movable .deprecation") and green at this 60s.
Run at the pushed head on mote (load ~115):
- deprecated-subscriptions.test.cjs, chromium and webkit, en and zh:
4/4 (13 files, 189 cases, 187 pass. The 2 reds are signin-proxy's webkit zh and zh-TW at 380px, red alone at origin/main 41b5c0f19 (#4643). internal/gui/assets is the same at 573b21f4b).
- go test ./... -timeout 45m on mote with this branch on 41b5c0f19: 83 packages ok. internal/gui is red on TestSettingsSaveKeepsWhatItDoesNotSend (#4514) and TestMainWindowCorners (#3949), both red alone at 41b5c0f19 too, and on TestColdTurnsTaken (#4510). internal/update is red on TestRelaunchOpenTriedAgain (#3881). The last two pass alone at 41b5c0f19 and here. Rebased on f856d381a: agent, gateway, plugin, provider and sessions ok, gui red on #4514 and #3949 only, gofmt -l clean, go vet ok for linux (nogui), windows and darwin. Rebased on bb478f0e5: agent and gateway ok, gui the same. The last rebase, onto 573b21f4b, brings in only internal/gui/providers*.go and internal/provider/models.go, which this branch doesn't touch
Not tried: the whole GUI suite. Nothing here makes the app's boot
faster; under load it is as slow as before.
Under the whole suite's load, webkit zh once waited past the 5s default
for the deprecation notice after the reload of Providers (#3484): a page
load serves the files one by one, then /api/state is read before
/api/providers before the rows, and the red passed alone right after.
The notice and badge waits after a load get 15s; a load itself now has
the 60s navigation timeout (#4470), and the waits inside a loaded page
keep the quick 5s.
The injected 6s /api/providers read that reproduces the red also showed
a second snag on the same path: a reload kills the page's own
background reads (the web update poll, What's new), and webkit reports
each killed fetch as a page error on the page it leaves, which the
errors assertion would have tripped on in just such a slow run. With
every response faked here, that wording only ever means a killed read,
so it is not counted as a page error.
Landed (yetone): the next commit times the boot as the navigation and
anchors the filter to WebKit's wording.
Generated-by: GLM-5.3-Flash (ZCode)
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).