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).
plugin-move's "moves to its plugin for good" scrolls the editor with
30px wheel steps 80ms apart and records scrollTop as the place the move
must keep. In WebKit the last step can still be landing when it is read:
367, then 397 600ms later, with nothing pressed yet. The move kept the
editor where it was, and the test called it moved ("the failure moved
the editor", 397 !== 367). On main the editor's Advanced section ends
sooner, so the timing happened to work there. #4145's Reply headers field
makes the editor taller, and webkit en and zh went red 2 of 2 alone at
that head on WSL.
The place is now read once two reads 150ms apart agree. This waits on
the state, not a duration.
Run (wsl-run, magpie-desktop, Playwright 1.62.0) at this commit plus #4145:
- plugin-move.test.cjs alone, chromium and webkit, en and zh: 8 of 8.
- A diagnostic print showed top 367 / 600ms later 397 / end 397 in
webkit en, and 235 / 265 / 265 in zh. Chromium settles at once.
- Broken by hand: scrolling the editor 40px between the press and the
failure turns all 4 "for good" subtests red with "the failure moved
the editor".
- Alone on origin/main c201fe226 without this change: 8 of 8.
The owner, 10-16: 陆续把内置Provider下线掉…一定要下线完毕. The plugins now do
what the built-ins did (the parity batch up to 53009f81a), so the built-ins
are retired:
- MoveRetiring moves every subscription with a mover (retiring is
MovableIDs, the list was empty) that still has built-in accounts, from
the gateway's hourly loop, six hours after a failed try as before.
- A user who moved back is moved again. Only a move back made by removing
or turning off the plugin (Migration.Left) is left as it is.
- There is no move back from the GUI or the CLI. provider/moveback and
`magpie plugins move-back` answer that the built-ins are retired. A
moved subscription's editor says it stays on its plugin and shows no
button, and the success line no longer offers to go back. New strings
in zh, zh-TW, ja and de; the three unused ones are gone ("Moving back…"
stays, for removing a plugin).
- AGENTS.md and docs/subsystems/provider-plugins.md say so.
Tests:
- TestMoveRetiring's subtests check that a moved-back subscription is
moved again and an off or removed plugin's is not.
- TestMoveBackRefused goes red on the old handler.
- plugin-move.test.cjs checks that a moved Zed has no button and says it
stays.
What was run, at 63be47717 with this change:
- go test -tags nogui ./... -count=1 -timeout 90m: 65 packages ok. The
gateway was red on TestUsageKeepsTimeToFirstToken (#2575, new) and
TestVisionWaitIsntTheDescribersTime (#2444) at load ~260. Neither file
is touched here, and both pass alone with -count=3.
- gofmt -l is clean; GOOS=linux and GOOS=windows go vet of provider, gui
and cli pass.
- GUI, both engines: plugin-move, plugin-move-unserved and i18n-keys pass
23 of 23.
- The other plugin-*.test.cjs files go red under parallel load as they do
on untouched main (#1544, commented with the runs). Serially, then alone,
they pass 28 of 28.
The redraw comes from renderProviders, for example when an account's
allowance read lands (loginUsageOf). It drew a subscription's "Move to
the plugin" field again from the provider alone. Midway through a move,
the button then said "Move to the plugin" again and took presses: a
second move could start while the first ran. A failure that came after
the redraw was said into the old field, which was gone, so the user saw
nothing.
renderMove now keeps the running move's label, and a failure's reason,
per provider in moveSaid. A redraw draws both again. A failure that lands
after a redraw redraws the providers, so the reason shows in the field
on screen.
Found while chasing #2431 (plugin-move's editor scrolls 23px in WebKit).
That shift was not reproduced: 16 loaded WebKit runs were green, and so
were injected late usage, late icons, a busy main thread and a forced
chain. The findings are on the issue. This doesn't close#2431.
plugin-move.test.cjs now redraws mid-move and after a failure.
- Broken by hand: without moveSaid it is red 4 of 4, both engines.
The errors are "a redraw mid-move forgot the move" and "a redraw
forgot why the move failed".
- With the fix: 8 of 8 green, 3 runs.
Review: a failure said is kept only while the move's state is the one it
failed from, so a move that lands another way (the hourly hand-over)
doesn't keep showing it. plugin-move*, fonts: 56/56 in both engines after.
Full suite: node --test --test-concurrency=4 internal/gui/tests/*.test.cjs
(chromium and webkit) on a61a6f954 with all three of these commits'
changes: 10655 tests, 10616 pass, 39 fail, all in 16 top-level tests.
Each of their files was then run alone:
- green alone on origin/main 008571462 and on this tree (load):
import-link-gemini, market-have, plugin-page, readable-focus, text-size.
- red alone on main too, filed or commented:
- quota-count-wrap and quota-name-translated: #2228
- s3-sync: #2448
- usage-agents-hide: #2276
- usage-checkin: #2142
- usage-fold: #2163
- tray-usages: #2453, new
After rebasing onto 008571462, these were run again on this tree, alone:
- green: fonts, key-balance-card, plugin-move, i18n-keys.
- still red, the same as main: quota-name-translated, quota-count-wrap, tray-usages.
The full GUI run was not repeated after the rebase.
go test ./internal/gui on 008571462 plus these changes, sandbox HOME:
FAIL. The only failure is TestPanelJoinsFullScreenSpaces, which is #2450
and is red on main too. TestCoreScriptBudget passes.
The owner: "Provider表单太复杂了…有一些可以折叠在高级里面". Headers,
proxy, concurrency and RPM limits, prices, context and output windows,
native compaction and fallback now sit in an "Advanced" fold beside the
key and models. It opens on its own when any of them is set, keeps the
state it was left in across the editor's redraws (keyed by the provider
being edited), and a Save refused on a field inside it opens it and
focuses that field. A signed-in account's editor folds the same.
Strings in zh, zh-TW, ja and de.
Motion ("整个弹窗高度的改变也应该是丝滑的动画"): the fold grows and
shrinks on one spring-like curve, its rows fading in, its arrow turning,
and the dialog's height follows on the same curve both ways; clicked
again mid-way it turns back from where it is. Reduce motion: at once.
Every dialog holds its place: the element last pressed or focused stays
where it was while the dialog grows or shrinks (a relative top plus a
max-height cap), so the button under the pointer doesn't run away. Where
there is no room above, only a pressed button below the fields shortens
them through the cap; nothing a click does scrolls the fields
(models-fold, names-fold). An element mid-scale (a Copy button's pop) is
measured by its parent (key-copy). The names list holds its height while
drawNames rebuilds it, so WebKit doesn't clamp the editor's scroll mid
rebuild (provider-detect, "Ask on one API moved" 64→190).
Tests: provider-advanced-fold (new, 5 languages × 2 engines, 420px);
about 21 editor tests open Advanced before reaching a folded field;
balance-method and plugin-move find the fold by its class; detect-draft
allows 0.5px. appScriptBudget 1,250,000 and coreScriptBudget 1,426,000
(1,232,466 and 1,405,937 with this).
Run: go test ./internal/gui/ ok. Every GUI file (771) in a full run,
4 at a time; its reds, rerun alone at this head, both engines:
key-copy 8/0, models-fold 4/0, names-fold 8/0, balance-method 42/0,
provider-detect 4/0, plus provider-remove 16/0, plugin-move 8/0,
provider-detect-draft 20/0, provider-advanced-fold 50/0,
provider-add-models 4/0. Red on origin/main as well, filed: #2435
(agent-connect-no-models, fixed in cf21b71ff), #2439 (fonts), #2443
(key-balance-card), #2228 (quota-count-wrap, quota-name-translated),
#1905 (routing-wb-restricted), #2448 (s3-sync); mobile-web and
library-workbuddy-trust red only under load, noted on #1544;
readable-focus and text-size fixed on main in 1a16fc0b5 and d3ca90afc.
The header's .seg drew a grey track behind its tabs; now only the open tab's white thumb marks it (the account-mode .am-seg keeps its own). A Plugins card offering a built-in's accounts had a solid purple bar of its own at the card's foot, "Move my 2 Command Code Plan accounts", which broke onto two lines; it is now the tinted pill beside the name that Install is, reading "Move" / "迁移", its title saying whose accounts and how many and what moving does. In the Agents list the grip in a row's left margin (#479) was drawn on every row all the time, and hovering the logo turned it into a second grip; the margin grip now shows only for the row under the pointer, the one being dragged, or a handle with its menu open or the keyboard on it (kept in a rule of its own, for Safari 15), and the logo stays the logo. Dragging or clicking the grip still does what the logo does.
agent-grip now checks no grip is drawn with the pointer away, the hovered row's alone is, and the logo has no grip of its own; plugin-move-overflow checks the move button sits in the card's top row on one line. agent-grip, account-arrange, agent-layout, the agent-models tests, brand, header-centre, header-zoom-fit, phone-web, strip-scrollbar, old-webkit and the plugin tests pass in Chromium and WebKit, except plugin-move's known Chromium flake and click-scroll, which fail the same way on unchanged main on this loaded machine. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build and go test -tags nogui ./internal/gui/... pass.