ac4af582301a4e8a29245dbba767eba31334ddf9
4
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). |
||
|
|
0f6defe78b |
gui: on a Mac a region or agent strip scrolls with no bar, so a click right after a scroll picks the option under it (#1620)
tencent-cloud.test.cjs was red in WebKit now and then: a region clicked
was not picked. The cause, found by scrolling the strip from the test and
clicking 30ms later: on a Mac page (body.mac) WebKit shows its overlay
scrollbar over the lower half of a scrolled strip for a moment, and
elementsFromPoint at an option's centre returned the strip, not the
option. A press there goes to the bar's track, which pages the strip
sideways (smoothly, 198 -> 44) and picks nothing. A reader on a Mac who
scrolls the regions and clicks at once meets the same miss.
On a Mac these strips (.segs.regions, Connect's segs, #sessAgent) now
scroll with no bar, as a Mac's own tab strips do (scrollbar-width: none,
::-webkit-scrollbar display none). Other systems keep their thin bar.
z-index, isolation and position on the options didn't help; only hiding
the bar did.
Tests:
- tencent-cloud.test.cjs: new "a region clicked right after the strip
scrolled is the one picked", 480x1200 (the strip in the window; it
checks so), 10 rounds over 5 scroll positions. Without the CSS WebKit
missed 39 of 50 clicks (40 of 50 on origin/main
|
||
|
|
c05dd8b6fb |
provider: Tencent Cloud has Token Plan 企业版 as a region, Enterprise plan · China and · Global (#1574, undirectlookable)
#1574 asks for Tencent Cloud Token Plan's usage through TokenHub's DescribeTokenPlan API (api/1823/132270). That API covers Token Plan 企业版, the team plan, only. magpie's Tencent Cloud preset knew the personal plan (api.lkeap.cloud.tencent.com/plan) and TokenHub's pay as you go, not the enterprise plan, so a provider at it had nowhere to sit. The preset gains two regions, after the old three so imports and links are unchanged: - enterprise: https://tokenhub.tencentmaas.com/plan/v3 (chat completions and Responses) and /plan/anthropic, Guangzhou. - enterprise-intl: the same paths on tokenhub-intl.tencentmaas.com, Singapore. Both use the plan's docs (product/1823/130659, 131173 for the 轻享套餐, same endpoints) and the Token Plan console as the key page. Their model lists are the doc's tables for each site, with the three GLM models it says went away on 2026-10-09 left out, and without the deepseek/… ids. An entry imported at those endpoints, a magpie://import link with region=enterprise(-intl) and a provider moved there in the editor land on the region; TokenHub's pay as you go at the same hosts stays at its own. The site's import pages (en, zh, ja) list the two regions, and the region names are translated in zh, zh-TW, ja and de. Run: go test ./internal/provider (TestTencentCloud, TestTencentCloudEnterprisePlan, red before the regions), gofmt; GUI tencent-cloud.test.cjs in Chromium and WebKit, en and zh, 8/8. Not tried with a real enterprise plan key: we have no Tencent Cloud account. |
||
|
|
209dc69b59 | providers: Tencent Cloud is one preset, its regions Plan · China, Pay as you go · China and Pay as you go · Global (Discord, Jorben: Tencent Cloud's Token Plan, TokenHub and TokenHub China were three tiles of one vendor) — tencent-token-plan, tencent-tokenhub-cn and tencent-tokenhub become tencent-cloud's regions plan, cn and intl, as Xiaomi MiMo's are, each made as its own preset made it: the plan's /plan endpoints with no Responses, its own models and no catalog; TokenHub's hosts with Responses, models.dev's tencent-tokenhub and its own keys page and docs. A region now carries its Website, Catalog and Models, and a saved provider's region is found by its endpoints (regionOf, by exact URL before path, since TokenHub China and global share their paths): normalize gives it that region's keys page, docs and catalog (a catalog the user picked is kept), and planModels its models. The old ids are aliases, as qianfan-token-plan is of baidu-qianfan: Preset and FromPreset take them, FromPreset builds at their region, normalize rewrites a saved provider's preset to tencent-cloud, and a provider's own id never changes, so its key, models, routing groups, usage and prices stay where they were; magpie://import links by an old id land at its region, and region= now also gives a region's docs and catalog. Imports from other apps match a region's endpoints. The editor's docs link follows the region picked with the segmented control, en and zh ("按量 · 中国", "按量 · 国际"); the add sheet has one Tencent Cloud tile; the site's import docs list tencent-cloud with its regions and import.html still names the old ids. TestTencentCloud (each region, old ids, FromPreset, imports, import links) and TestTencentCloudOldPresetsKeepWorking (a providers.json saved by an older magpie under all three old presets, with a routing group over them, read, re-saved as the editor saves and switched between regions) fail on the old code; TestTencentTokenHubRoutes routes through old ids and tencent-cloud alike. tencent-cloud.test.cjs (WebKit en and zh: one tile, the three regions, no select, the docs and Get a key links following the region, an old id's provider opening at its region and saved under its id) fails on the old app.js; add-sheet, zhipu-team, system-one, strip-scrollbar and click-scroll pass (Chromium doesn't launch in this sandbox). Not tried with a Tencent account. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. |