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).
Peterpig set a custom provider's Base URL to http://127.0.0.1:7863/v1;
the link at the top right of its editor opened https://127.0.0.1:7863
and Chrome showed ERR_SSL_PROTOCOL_ERROR.
Cause: with no website, drawEditor built the link as "https://" + p.host.
p.host is provider.Host(), a display host with the scheme already cut
off, so every provider's scheme was guessed as https. hostSite now takes
the scheme from the base the host was read from (chat, responses,
anthropic, gemini, decide, matched the way provider.HostOf reads a host),
and keeps https only when no base spells the host: a subscription moved
onto its plugin shows the vendor host it had while its base is
plugin://<id>. A plugin's own provider (host without a dot or a port)
still gets no link.
Siblings checked: every api("open") call in app.js takes a full URL from
the Go side or a preset (keysUrl, website, sign-in URLs); none builds one
from a host. POST /api/open passes http:// through. The other
"https://" + host spots in app.js (hostOf, twoKeyHeaders' host check,
the S3 endpoint label) only read a host for display or matching, never
open it. provider.faviconSites looks for an icon on https only, but it
refuses local hosts first, so the reporter's case doesn't reach it.
Ran:
- new internal/gui/tests/editor-site-scheme.test.cjs (reporter's
127.0.0.1:7863 http base, a LAN http base in upper case, an https
base, a moved subscription, a plugin provider; clicks the link and
checks what is opened), en and zh at 420px: BROWSER=chromium and
BROWSER=webkit, pass 2/2 each.
- Put the old "https://" + p.host line back by hand: red in both
engines, actual 'https://127.0.0.1:7863' vs expected
'http://127.0.0.1:7863'. Fix restored, green again.
- tencent-cloud, copilot-ghe, zcode-site, ux-safety .test.cjs (other
tests over the editor head and its site link), chromium and webkit:
all pass.
- go test -tags nogui -p 1 ./internal/gui -run 'TestPageFilesRevalidate|
TestPageNamesItsFilesByContent|TestCoreScriptBudget|TestWebCompresses|
TestVersionedFilesKept|TestDatesFollowGUILanguage': ok.
- No Go file changed, so no gofmt/vet run.
Not tried: the real macOS app clicking the link (the browser opened is
the system's; the URL handed to it is what the test checks).
Full suite: SUITE_LINE