Commit Graph
5 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 4701ed9812 gui tests: the Routing request-pick tests measure the row once the day's click has settled
routing-proxy failed 2 to 3 runs in 8 in Chromium alone, and
routing-zcode-blocked 1 in 2, with "picking the request moved the page".
That rate goes back at least 800 commits, so no single commit turned it
red. Traced: the row's top was read right after the day's last request row
appeared. Those rows grow #rt above the list (294 -> 471 px), and the
day button's click is held in place by scrolling the view (219 px) for 4s
(held.until in app.js), but the ResizeObserver that does it runs before the
next paint, after the test's read. So `was` was taken from a frame no
user sees (the day button read 431 against 389 where it was clicked and
where it is painted), and the request click then measured the correction.
The app keeps its guarantee; the test measured too early.

The same read sat in ten tests: remote-group-served, routing-blocked,
-burst-speed, -kind, -proxy, -served, -shape, -upstream, -wb-refused and
-zcode-blocked. Each now reads the row once its top is the same on two
animation frames in a row. routing-failed-open already waited for that.

Run: routing-proxy and routing-zcode-blocked six times each in Chromium
(0 failures each, against 3/8 and 1/2 before). All ten files in Chromium
and WebKit, en and zh, pass. With the click hold switched off in the
served app.js (keepHeld and heldSizes) and a pick that scrolls the view by
60px, routing-proxy fails 2/2 in both engines.
2026-10-11 04:56:33 +08:00
yetone 116a85f270 gui tests: the Routing page's tests pick a day from the date bar, not the By request button (#860 flake) — remote-group-served's zh case timed out 2 in 9 after 5464a362, but it did so as often before it: under the same load old and new each passed 20 of 21 (18 of 18 run one at a time). The By request / By session buttons are .rt-day too, so .rt-day nth(1) could be the pressed By request button, which WebKit sometimes never calls stable, and the click timed out. remote-group-served and 11 other routing tests now click .rt-days .rt-day, as click-scroll and purpose-filter do. remote-group-served zh in WebKit: 18 of 18 under three loops at once; the 12 tests and purpose-filter, click-scroll pass on WebKit except routing-served, whose tooltip assertion fails the same on origin/main. go vet and go test -tags nogui ./internal/gui/ under a temp HOME pass. 2026-10-05 13:57:37 +08:00
FanbuzandClaude Opus 5.5 3ce0a0bf27 fix: 收敛中文界面文案 (#846)
删去中文提示里的过程叙述和动机解释,保留数字、条件和后果;同步更新相关测试的中文断言。

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 10:27:19 +08:00
yetone 4ead7c84a3 gateway: Codex's Responses Lite tools reach SuperGrok and every other backend, and a group moves on when a member can't read a request (#350) — Codex sends a Lite model's tools as an additional_tools input item, its own functions in a "functions" namespace; magpie relayed the item to xAI, which 422s on it (unknown item type), and translated routes (Cursor, Anthropic, Chat…) dropped it, so the model had no tools. Outside OpenAI the item's tools now go in tools, the functions namespace opened into plain tools and earlier calls un-namespaced; OpenAI and the ChatGPT account still get Codex's own form. A 400/422 over the request's shape (failed to deserialize, unknown item type/parameter…) now moves to the group's next member, each asked once, the member not resting; the Routing page says so. TestAdditionalToolsRelayed, TestAdditionalToolsTranslated and TestGroupFailsOverARequestShape fail without the change; routing-shape.test.cjs (Chromium, WebKit, en/zh) added. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; click-scroll, old-webkit, routing-wb-refused pass. 2026-10-01 01:05:49 +08:00