11 Commits
Author SHA1 Message Date
yetone 8278ccf290 gui tests: plugin-move scrolls Zed's editor with the wheel and presses Move where it is — the test set .ebody's scrollTop to 120, which took the Move button out of sight, so Playwright's click scrolled the body back first (120 → 60 or 0, "the failure moved the editor", Chromium, failing in zh on 6e623d16 and in both languages after). It now wheels only as far as the button stays in sight, and presses it with the mouse, checking it is in sight; "the failure/the move moved the editor" are unchanged. Passes in Chromium and WebKit, en and zh, twice. 2026-10-06 05:56:47 +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 70a6c72a2c gui: built-in subscriptions that have a community plugin are marked Deprecated, with the reason — some subscriptions are reached in ways their vendors' terms may not allow, so to keep magpie itself from being banned they are being decoupled from magpie and run by community plugins instead. The provider list's quiet "can run on community plugins" line is now a deprecation notice (an amber card with the plugin mark: the deprecated signed-in subscriptions, the reason, that moving keeps accounts, models and agents, and Review in Plugins — or Review the move for one — beside Not now, which hides it until another deprecated subscription signs in). Their rows, their Add tiles (signed in or not; /api/providers' new movable lists every built-in with a plugin, from provider.MovableIDs) and the editor's Runs on field carry an outlined Deprecated badge whose tooltip gives the reason; the Add sheet's Subscriptions end with a line saying why, with Browse plugins. A subscription already on its plugin, or one with no plugin, carries none. deprecated-subscriptions.test.cjs (Chromium and WebKit, en and zh: the badges, their reason, none on a moved or keyed provider, the notice, Not now staying hidden), plugin-move and plugin-movable-review updated to the notice. add-button, add-sheet, mobile-web, old-webkit, plugin-move-overflow, plugin-moved-signin, plugin-market, plugin-signin, plugin-plan, provider-search, provider-picks-stay, providers-off-fold pass (click-scroll's 5 failures fail on main as well). go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./internal/provider/ ./internal/gui/ pass. 2026-10-02 11:39:05 +08:00
yetone ec10d3bd98 gui: the header tabs lose their grey track, a Plugins card's move is one word beside the name, and an agent row's grip shows only under the pointer (the user: 这个 tab 栏的背景灰色条有点丑 · 这里的紫色按钮也有点丑,而且还有的变成了两行 · 排序 icon 只在 hover 到这个条目的时候显示,logo hover 的排序 icon 可以删掉)
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.
2026-10-02 10:31:43 +08:00
yetone cfd67225c8 plugins: the Plugins page is drawn in parts, Installed at once and npm's figures after (#488: the page showed skeletons for seconds, even on Installed) — the page waited on /api/plugins/market, which answered only once the plugin host, the registry fetch and an npm request for every package (two each, 8s apiece, all at once, kept an hour in memory only) had all come back, so the slowest package decided when anything was drawn. The page now asks for each part on its own, as the Library page does: Installed is drawn from GET /api/plugins as soon as it answers; Discover's cards from the new GET /api/plugins/listings (the registry, with its cached and built-in copies), each with what npm said last; and versions, weekly downloads and an installed plugin's "v… out" fill in from the new GET /api/plugins/npm?names=…, never waited on (a card's button waits, disabled, until npm has said whether it has the package). npm is asked at most six packages at a time and for no more than 8s in all; a package it answers late is what it said last, and its answer is kept for the next time. What npm said is kept on disk (~/.cache/magpie/plugin-npm.json) beside the registry's copy, so a magpie just started shows it before asking, and GET /api/plugins gives each plugin's newest version from it. /api/plugins/market still answers the whole market as before. Once loaded the page shows what it did. TestNPMInfoKeptOnDisk, TestNPMInfoDeadline, TestNPMInfoAtOnce, TestPluginMarketInParts and plugin-progressive.test.cjs (Chromium, WebKit; en, zh; Installed while the market is held pending) fail without the change; plugin-local, plugin-updates, plugin-market, plugin-move, plugin-move-overflow, plugin-release, plugin-git, plugin-key-hint, plugin-plan, list-sort, click-scroll, old-webkit pass. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-02 08:20:32 +08:00
yetone 623307e978 i18n(zh): plainer words where they read as slang, the rest kept (#465) — the provider editor's Forget (dropping the vendor's fetched list) is 清除, not 忘掉; the Providers page's Take a look is 查看, not 看看; an account's forget tooltip says magpie 移除 its sign-in, as its siblings do; and the routing explanations that said {who} 先上 say 排第一, as every other "goes first" there already does. A session's details named its id line 整个会话, the routing affinity option's word for "Session": the line now uses the Session ID key (会话 ID, as the usage ledger's detail has it), and 整个会话 stays where it means the whole session, beside 一轮之内. 知道了 (OK) and 还有 {n} 个 (+{n} more) are kept: standard and clear where they show. plugin-move and provider-picks-stay assert the new words; sessions-manage and sessions-overview fail without the id line's label. plugin-move, provider-picks-stay, sessions-manage, sessions-overview, routing-steady, routing-manual, click-scroll, old-webkit pass (Chromium, WebKit, en, zh); go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-02 02:50:38 +08:00
GinWU db0a3344f4 gui: a Plugins card's move button has a row of its own and says how many accounts it moves — on the Plugins tab, a card that offers a built-in's accounts put "Move my {name} accounts ({n})" in its top row beside the plugin's name; the button doesn't shrink (.pm-act is flex: none, nowrap), so in a two- or three-column window "Move my Grok (SuperGrok) accounts (1)" ran past the card's right edge, and Kiro's shorter one squeezed its name to "K…" and cut "magpie community". The move button (and its "Moving…") now has a row of its own at the card's foot, full width, wrapping if it must; Install, Sign in and the rest stay in the top row. Its words say what the number is: "Move my 1 Grok (SuperGrok) account", "Move my 2 Zed accounts", 「迁移我的 1 个 Grok (SuperGrok) 账号」. plugin-move-overflow.test.cjs (Chromium, WebKit, en/zh, 920/600/480px with the column count checked) fails without the change at 920 and 600px; plugin-move, plugin-market, market-have, old-webkit, plugin-moved-signin, plugin-release, plugin-signin pass (plugin-market's "typing keeps the field" fails now and then on main here too). Go not run: only CSS, JS and strings changed. (#398) 2026-10-01 14:56:25 +08:00
yetone f5a2b5d406 gui: a moved provider's editor reads as the built-in's — its model list dated, its agent's own sign-in said, its move a button (要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — after a move the list said "magpie's list · Refresh asks the vendor" where the built-in said "vendor list · 9m ago"; it is now dated by when the plugin last listed it, in the editor and in magpie providers. "Command Code itself stays signed in as it is." is kept for Devin, ZCode, WorkBuddy, Kiro and Command Code, whose agents keep their own sign-in through the move; and Move to the plugin / Use the built-in again is drawn as a button, not a line of text. plugin-move.test.cjs fails without the kept line. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; plugin-move, click-scroll, old-webkit, plugin-market, plugin-signin, nokey-editor pass. 2026-10-01 11:15:27 +08:00
yetone 93c3cde024 gui: moving a built-in onto its plugin says what it is doing and why it didn't go, where the user is (记得把整套迁移逻辑做得丝滑优雅精致优美简单方便易用 / 要保证插件订阅 provider 跟内置的订阅 provider所有逻辑都要一模一样) — the Plugins tab opened as the page (?view=plugins) stayed blank; Move to the plugin greyed out for up to 18 s, then closed the editor, its error far off in the footer in English, and the button never came back. The button now says "Installing the plugin and checking each account…", a failure is said under it in the reader's language (npm unreachable, every account lapsed, models the plugin doesn't serve) with Try again, and a move that goes through turns the field over in the editor still open where it was, with a toast of the accounts and models it took. Runs on reads "magpie's built-in · or the community Zed plugin", the npm package in its tooltip; a quiet line over the list names the built-ins a plugin can run (Take a look · Not now); a plugin's card offers "Move my Zed accounts (2)", its installed row "Move Zed here" and "Zed: on magpie's built-in" rather than a signed-out plugin, and switching it on again offers the move back in the row. Accounts: a lapsed-only provider shows Signed out, not a green pill; plan chips read "Zed Pro", not "Zed Zed Pro", and a long one isn't cut; the "{agent} itself stays signed in" line is kept for a moved built-in whose agent keeps its own sign-in, named as the agent, and dropped where none is its own. The vendor list's age is said in the reader's language ("8m ago" in the zh UI). plugin-move.test.cjs (Chromium, WebKit, en/zh) fails without each of: the Plugins tab loading on ?view=plugins, Try again, the inline reason, the editor staying open, the progress text, the card's move. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; plugin-move, click-scroll, old-webkit, plugin-market, plugin-signin, nokey-editor pass. 2026-10-01 11:15:25 +08:00
yetone 04722aa9d5 gui: a moved built-in's editor shows no plugin:// endpoints (插件版…保持一模一样) — Zed moved onto its plugin listed plugin://zed/v1 under Endpoints with a Test button that could only fail; a plugin's provider is reached inside magpie, so neither shows. plugin-move.test.cjs (Chromium, WebKit, en/zh) fails without the change. 2026-10-01 04:04:23 +08:00
yetone 3bec6c0e40 providers: a built-in subscription moves onto its community plugin and back, its accounts with it (the user: 慢慢下掉内置的那些 Subscription Provider…不要让用户一升级完之后,突然发现他的所有服务都不可用了) — eleven built-ins (Zed, Qoder, Factory, MiMo, Devin, Grok, Command Code Plan, Cursor, Kiro, WorkBuddy, ZCode) each get a mover to their @magpie-community package. A move installs the plugin (updated when older than the mover needs), hands it every account in the plugin's shape, checks the plugin lists models for them, and only then lets the plugin serve the same provider id, so agents' model ids don't change; any failure rolls back and the built-in keeps serving. The built-in's accounts are kept as a backup, and "Run built-in again" (magpie plugin move-back <id>) takes the plugin's current sign-ins back, never copying a rotating token: they are taken out of the plugin in one step, and an account the built-in renewed meanwhile keeps its newer token. An account only the plugin can hold (Cursor's browser sign-in) stays with it. The provider editor shows "Runs on" with the button, a failed move's reason, and the CLI has magpie plugin move / move-back. Automatic moves (Retiring) are wired in but the list stays empty until the packages are on npm. Checked with real accounts in a sandbox HOME: Command Code Plan and Devin moved, answered a chat through the gateway on the plugin, moved back and answered again on the built-in. TestMove*, TestPutBackKeepsNewer, the movers' round-trip tests and plugin-move.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; click-scroll, old-webkit pass. 2026-09-30 21:21:58 +08:00