ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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). |
||
|
|
6915c8cdea |
agents: a model list's button says its ticks: all, one or two by name, or how many of how many (NG_shiyu on X)
NG_shiyu on X: the closed model field reads 「路由组,模型+数字」 on one row and just 「路由」 on another, while the menu opened shows every model either way. Why: two different controls stand in that place. An agent whose own model menu is the list picked here (ZCode, Claude Desktop, Cursor Private Inference, WorkBuddy, T3 Code, ...: listsMenu) has a multi-select list, and menuSaid named its first two ticked models and "+N". Routing groups are listed first, so with every model on it read "Never stuck, DeepSeek Pro +2": like a pick of one group and one model. Every other agent's start picker names the one model or group it starts on, e.g. a group named 路由. Neither said "all". Decided: the list's button (and the panel row's words) says what its ticks are, as the open checklist shows them and as the Models entry already words it (fillModelsEntry): - every model ticked: "All N models"; - one or two ticked: their names (蓝猫's few-picked case, |
||
|
|
ede1e32aec |
agent, gui: ZCode's row picks which of magpie's models its picker lists, as Pencil's, T3 Code's, WorkBuddy's and Copilot in JetBrains' do now (#1508, NovaTrailX)
settings.hiddenModels had no "zcode", and ZCode's ~/.zcode/v2/config.json and provider_config.json listed every model. The files magpie writes for ZCode already leave out what is hidden for it (magpieModels(id) reads provider.CatalogFor), but its row had no list to hide one in: ZCode's only field puts magpie in its own picker, with no option among the catalog, and the Agents page gives a models line and menu only to an agent that has one (takesCatalog) or ListsModels (Cursor Private Inference). Audit of every agent row: each agent with a field among the catalog (viaMagpie) already had the list. Those whose only field puts magpie's models in their own picker had none: zcode, pencil, t3code, workbuddy, workbuddy-ai and copilot-jetbrains. They now set ListsModels; Claude Desktop's tier pickers list the catalog once connected, and cursor-local had it already. - agent: ListsModels on those six, its doc says when it applies. - gui/api.go: the row's JSON says menu (ListsModels), so app.js gives it the models button as it does Claude Desktop's and Cursor's, rather than a hard-coded set of ids. Tests: - TestEveryPickerOfMagpiesModelsCanBeNarrowed: any built-in agent that puts magpie in a picker with no option among the catalog and no ListsModels fails, so a new agent can't miss it. - TestZCodeListsOnlyThePicked: from a config the user edited by hand (own providers, theme, rules, a manual rule for one of magpie's models, ui lang), hiding one model takes it out of both files at the next sync and showing it puts it back; the user's entries stay at every step. - TestZCodeModelList: through the GUI handlers: connect, the row has menu and 2/2, hide one, settings.hiddenModels.zcode is set, the row reads 1/2, and after SyncCatalog both files list only the other. - tests/zcode-models.test.cjs: ZCode's row in en, zh, zh-TW, ja, de, in the window (1100px) and the tray panel (420px), Chromium and WebKit: the line, the menu button, unticking one posts it and the count drops, ticking it back; no scroll, no <select>, no overflow. 20/20. Without ZCode's ListsModels, the first and third fail (tried); without a.menu in app.js, all 20 GUI cases fail (tried). All in a sandbox HOME; the live ~/.zcode was never touched. Run: go test -tags nogui ./internal/agent ./internal/gui; gofmt -l; GOOS=linux and GOOS=windows go vet -tags nogui ./internal/agent ./internal/gui; node --test on zcode-models, agent-model*, agent-models-*, agent-notice-lang, click-scroll, cursor-local-*, gui-de/ja/zh-tw and i18n-keys, both engines: all pass (three load timeouts under a machine load of ~140 passed rerun alone). go test -tags nogui -timeout 40m ./... on the rebased tree: every package ok but internal/gateway, whose TestQueuedStreamKeptAliveForTheMinute hit its 1.5s read deadline at a machine load of ~130; it passes -count=3 run alone, and this change touches nothing it runs. |