liuzhengdong99 on X: 用量界面每张卡片取数的时间不一致,导致卡片渲染时高度一直
跳动——滑到上面看某张卡片,视图会被拽回下面. The allowance cards come in
at different times: each vendor's read (the page asks again every 1.5s
while X-Magpie-Reading says a read is under way), then the curves'
history. Every answer redraws the cards (renderQuotas), and packUsage
grows the ones above the card being read. Nothing kept that card in
place: the view's scroll guard (keepInView) only knew elements by node,
and the cards are new nodes on each draw, so the browser's anchoring was
the only thing holding them. It anchored on nodes that were being
replaced, and the reader ended up dragged down.
Fix:
- The Overview keeps the card being read in place: the highest card (or
part of the page under the cards) that starts in sight, found again by
its data-key after a redraw (keepInView's new `only` mode with pinnedAt),
and followed after every packUsage (followPin). The browser's own
anchoring stays on while nothing is kept: at the page's top, on
another tab, and while the cards are dragged or moved by keys (unpin,
so a dropped card lands where its slot showed).
- Placeholders from the last known height: each card's height drawn in
full is kept by its key (localStorage magpie.usageCardTall, 1s
debounce, 200 keys at most). A card still waiting on its read or its
curve (usageWaiting: quotasReading, the new flag loadQuotas sets, or
no history answer yet) is packed and held at least that tall, in the
column count the cards were last whole in at that width. On the next
start, no card in sight moves.
- loadQuotaHist counts its first answer even when it is empty, so a
user with no history isn't left waiting (found by usage-pack: the
cards held their first packing at 560px).
No new animation, nothing scrolls the page on its own (click-scroll
passes), and the layout is unchanged once the cards are in.
Run (mica, Playwright 1.62.0, Chromium + WebKit):
- usage-cards-steady.test.cjs (new): 20 tests, all 5 languages, 1100px
and 420px. On the old assets (MAGPIE_ASSETS) it was red 8 of 8 in en
and ja. With the hold disabled, the second visit goes red.
- At ee079814b + this change (then rebased onto 1c29e2c7d, which changes
only app.css, redact.css and a new contrast test; script budgets
measured again, unchanged): go test ./internal/gui/ (budgets included),
gofmt, and usage-pack, usage-cards-steady, usage-drag, usage-arrange,
click-scroll and i18n-keys: go ok (300s), 64 of 64 GUI tests pass.
- Every usage-*, quota-*, view-*, account-arrange, click-scroll,
i18n-keys and gui-de/ja/zh-TW file (151 files), run before the empty-history fix and the last
rebase, head vs origin/main.
No red at head is new. The reds that are also on base: account-arrange
(#6010), quota-count-wrap (#3404), quota-curve (#6789),
quota-refresh-order (#6180), quota-credits (#6807), usage-ledger
(#5048, #6003), routing-* (#7016), gui-ja (#7144),
view-trackpad-coast (#4724), view-wheel-unheard (#5158), plus the
whole-suite reds in #6975 and #6934. usage-pack and usage-drag went
red at head along the way and are fixed here.
Not tried: the real app (WebKitGTK on Linux, WebView2 on Windows,
WKWebView on macOS) and the full GUI suite.
visamzh on X: in a Routing group, the same model can no longer be added a
second time at another reasoning effort (gpt-6.2-sol at xhigh and at high).
It used to work.
Cause: 74c67785c (#907, 10-05) ticked a model in the Add a model picker
when any member had its base, so sol showed ticked for sol:xhigh. A click
on sol then took sol:xhigh out instead of adding sol, so a second effort
could never be added from the GUI. Saving (SaveGroup's cleanList dedups
exact ids only), reading, the gateway's members() (each effort its own
member, internal/gateway/groupeffort_test.go) and the TUI picker were never
affected, so groups that already hold sol:xhigh and sol:high load and route
as they are.
Now a member held at a fixed reasoning or on one account is a row of its
own in the picker, ticked, its level/account in its note, and a click on
it takes that member out, as #907 asked. The model's own row under it is
unticked and adds the model again, to be set to another level in its row.
Tests:
- group-member-again.test.cjs (new): sol:xhigh in the group gives two sol
rows (held one ticked, says "xhigh reasoning"), the plain one adds a
third member, set to high it saves [sol:xhigh, terra:high, sol:high];
a group already holding sol:xhigh and sol:high shows both and saves
both. en/zh x chromium/webkit.
- group-pick-filter.test.cjs (#907) updated: the held row stays ticked and
takes its member out; the plain row is not ticked; save keeps two:max.
Run (mote, mote-run, node --test):
- group-member-again + group-pick-filter at this head: 8/8 pass. At
origin/main e1c186cfe with the new test: group-member-again 0/4
("sol at xhigh and sol itself are not two rows 1 !== 2").
- Every GUI file reaching ?view=groups or plugins/routing (104 files,
concurrency 4): 1401/1473 pass. The 72 reds were in 10 files. The 9 files
rerun at this head and at origin/main e1c186cfe (concurrency 2): the
same 71 reds at both. routing-groups-page's one 420px red (quotas
redrawn) passed in the rerun. Filed: #7016 (routing-provider-off,
routing-rows-fit, win-fonts); the rest are in #6934
(group-editor-selected, menu-input-scroll, mobile-web,
name-suffix-where-named, zero-priced-free).
- Rebased onto 69233d6bc (Docker image only) after the runs.
Not tried: a click-through in the real app. No Go changed, so the Go
groupeffort tests were not run again. No new strings, so zh-TW/ja/de are
unaffected.
starballl on X (tweet 2122376116220633444) runs several magpie web pages
and every tab is titled "magpie", so they can't be told apart. A magpie
now has a name, and a browser tab's title is "<name> · magpie" (plain
"magpie" with none).
- settings.Name, set in Settings › Network and sharing › Advanced › Name
(instancename.js, imported when Settings is drawn, so nothing is added
to app.js's core). Advanced is closed until a name is set.
- MAGPIE_NAME (Docker, magpie web) names it while the field is empty and
is the field's placeholder. It is read, never written, so a name typed
in Settings always wins and clearing the field goes back to it.
- One line, at most 60 characters (settings.CleanName).
- This computer's own (KeepOwn): sync and a restored backup never bring
another magpie's name. A Settings save that leaves `name` out keeps it
(settingsapi.Merge).
- boot.js titles a browser tab itself for the first paint, so app.js's
core gains only the line in applyPrefs, which sets the title again from
every settings read (TestCoreScriptBudget was 74 bytes over with a
title function in app.js). Only a browser page (web) is retitled: the
app's windows and tray keep "magpie".
- Docker docs (en, zh, ja) list MAGPIE_NAME; docs/reference.md and
docs/subsystems/gui-shell.md say how it works.
Tests:
- TestInstanceName (internal/gui): the variable alone names it at boot;
a saved name wins over it, trimmed; a save without `name` keeps it;
KeepOwn keeps it; cleared goes back to the variable; no name, none at
boot. Broken by hand, each red: KeepOwn without Name ("KeepOwn took
\"other\""), Merge without the keep ("a save without the name changed
it to \"\""), boot.js with s.Name in place of InstanceName ("named by
the variable alone: boot <nil>"), boot.js not setting the title ("a
browser tab's boot.js sets no title"). The app window's boot.js sets
none.
- TestSettingsSaveKeepsWhatItDoesNotSend now sets Name: the page's other
saves leave it out, and it is kept.
- instance-name.test.cjs: title from the first paint, the field under a
closed Advanced, save and clear retitle the tab, Advanced open after a
reload, 360px, the app's window keeps "magpie"; en, zh, zh-TW, ja, de,
Chromium and WebKit, 16/16. 14 of 16 red with applyPrefs not setting
the title.
Run, at this commit on dbbb2f26b plus 9d5d8baf2 (the site index):
- go test ./... -count=1 -timeout 45m on Linux (WSL magpie-desktop, Go
1.26.8), at the tree before the boot.js move: 99 packages ok,
internal/gateway included (959s); ., internal/cli and internal/gui
don't build there without GTK headers. On mica (macOS): . and
internal/cli ok; internal/gui/... ok at this commit, after the two
reds that run found (the core budget, the keep test) were fixed.
- go vet and GOOS=linux -tags nogui / GOOS=windows go vet of
internal/gui and internal/settings, earlier the whole tree on all
three: ok. gofmt -l clean.
- site: node --test *.test.mjs, 132/132.
- GUI: the 135 files the change reaches (settings, network, LAN, i18n,
old-webkit, core budget) on mica: 16 files had reds. Run again on this
tree and on its base, the same tests are red on both (allow-ips
#4357, settings-hints #6107/#6353, lan-join #6353, i18n-keys #6877,
old-webkit #6030/#5919 and the rest of the 16) but two:
search-mcp-library (WebKit, #4756) and gateway-pause (WebKit de 420px,
#6684), red only beside other files: alone, 0 of 10 and 0 of 3 red on
both trees.
Asked for "a heatmap like GitHub's / Codex's, also in the tray". The
window already has one (Usage › Requests, 53 weeks, #1369), so no second
copy goes on the Overview, which counts gateway calls only while the
heatmap counts session-file calls too. The tray panel had none.
The panel's Usage tab now ends in a card of the recent weeks, one cell a
day, Monday on top, as many weeks as the card fits (8 to 53: about 25 at
the panel's 440, 17 at 320). It goes after the chart and ranking, so
nothing above it moves. Its shades are the existing monochrome accent
ramp (.l0 to .l4) and follow the tab's own Tokens / Cost / Requests
switch, with no new read; a provider or computer picked above narrows it.
A tooltip says the day and its tokens, requests and cost. Weeks with no
call show no card. No animation.
It reads the existing cached /api/usage/heatmap, at most once a minute
and again when a pick changes; the tab's own 10 s reads don't wait for
it, and no endpoint was added. The card, its reads and tooltip live in
plugins/usage/page.js, which shares its grid (heatGridOf, taken out of
drawLedHeat as it was) and tooltip (ledHeatTip, now told the metric and
provider) with the Requests tab. app.js keeps one guarded call in
renderPanelUse: the ledger read can come back before page.js has run, so
page.js draws the tab again when it loads. Both script budgets hold it
at this base with no raise. The card
is .pu-heat, not .pu-card, so the chart's card stays the tab's one
.pu-card. The panel's light pills are its card's white, so a quiet day
there is a 7% shade of the text over the card.
Run (rebased on origin/main 2896e82cc):
- panel-heatmap.test.cjs (new), Chromium and WebKit, en zh zh-TW ja de,
440 light and 320 dark: 12 of 12, 3 runs on mote. Red 12 of 12 with
MAGPIE_ASSETS at origin/main's assets.
- Affected files (usage-heatmap, panel-usage, panel-usage-models,
panel-usage-first-account, panel-currency-provider, panel-units-follow,
number-units, usage-chart-axis, usage-head-steady, usage-phone-head,
i18n-keys, phone-no-sideways) and TestCoreScriptBudget: green but
phone-no-sideways de 375, the same with origin/main's assets (#5869).
- At 2896e82cc again: panel-heatmap, panel-usage, panel-usage-models,
usage-heatmap, panel-usage-first-account green; i18n-keys red on a
routing-plugin phrase 2896e82cc's claude_image_budget_test.go added,
red on origin/main alone (#6877).
- Whole GUI suite on mica at 91b3af847 (concurrency 4): not finished.
The runner exited 7 with no message twice (after ~2231 and ~2371
tests); the third part, grip-inset on, is still running, ~10,900
tests in. None of the red files is touched by this change. Under the
whole-suite load (#6709, #6782), with their issues:
agent-details-ready #6369#6373, agent-switch-accounts #5925,
claude-quota-onboarding #6179, bark #6543, api-key-theme #6444,
aside-native #6212, agent-menu-label #6371, allow-ips #4959,
account-refresh-holds #6003, account-arrange #6010, desktop-tiers
#6475, quota-refresh-order #6180, provider-max-output and
provider-many-keys #6209, rest-try-now and key-switch #6232,
provider-fetch-again, provider-typed, provider-picks-stay,
provider-models-rest and menu-scroll #6532, omp-roles #6432,
recovered-file #4320, quota-bars-alike #6700, login-export #6628,
gateway-key-arrange #6268, first-untick #6660, editor-hints #6156,
connect-address-kept #6755, recent-call-bodies #6665, quota-credits
#6807, models-works-only #4391, codex-memories-settings #6372,
panel-options-fold #6794, reset-providers #6196, quota-curve #6789,
model-copy-id #4621, modal-backdrop #6663, loop-guard-setting #6662,
lightweight #6340, keychain-retry #6661, key-replace #3476,
key-balance-card #6414, gateway-pause #6684, duplicate-pause and
key-box-once #6424, codex-async-compact #6658, name-suffix-remote
#5147, menu-input-scroll #3402, rollup-short #6560, remote-magpie
#6099, plugin-signin-no-url #5938, plugin-signed-out-account #5998,
plugin-page-foreign-error #6117, plugin-option-placement #6559,
phone-no-sideways #5869, partners #6664, panel-fold #5796, omarchy
#4624, old-webkit #6030, model-api-preset #5838, mobile-web #6790,
library-open-again #6751, key-import #6416, grip-inset #6293,
fast-ultra and fast-pick #6201, ctx-session-line #5801, context-cap
#6514, codex-auto-reset #6232, panel-usage-first-account #6181
(green alone at this head), lan-join #6353, icon-tile #6759,
model-chip-steady, header-centre, last-page, nav-timeout,
plugin-card-update #6709. With no issue before, filed as #6876:
data-folder, plugin-move-unserved, name-suffix-where-named,
group-editor-selected, found-skill-pick-remove, quota-count-wrap,
nav-sub-fold, model-suffix-own, account-models,
account-models-available.
- Looked at screenshots of the panel at 440 and 320, light and dark, en
zh de ja, with the tooltip shown.
Not tried: the real app's tray panel on macOS, Windows or Linux
webviews, real accounts' usage.
MetalHqa on X: "阿里云百炼 Token Plan 的额度查询需要的权限不明确,希望能够在里面备注出来".
Since 456b5c6c7 (#6506) the grants were named only in aliRAMHint, in
English, on the Usage card after a NotAuthorised refusal, and the editor
still said "a RAM user that may use Model Studio is enough", which is
wrong: the AliyunBailian*/AliyunModelStudio* policies don't cover the
Token Plan.
Now:
- The editor's AccessKey ID for an Alibaba Token Plan has one line under
it (ALI_RAM): a RAM user's AccessKey needs AliyunTokenPlanReadOnlyAccess
and AliyunBSSReadOnlyAccess, and Administrator or Subscription plan in
Model Studio → Account Management; the main account's needs none. The
Secret's hint loses the wrong sentence. Volcengine and Tencent keys are
unchanged.
- A card refused with aliRAMHint says the same line in the reader's
language (quotaError), the raw refusal still in its tooltip.
- zh, zh-TW, ja and de for both strings.
- aliRAMHint says "Subscription plan", as Alibaba's English docs do.
Checked against Alibaba's docs: Token Plan 权限与使用规范 (RAM 子账号授权:
AliyunTokenPlanReadOnlyAccess or FullAccess, AliyunBSSReadOnlyAccess or
FullAccess, 账号管理页面 → 管理员或订阅套餐权限), the personal FAQ (个人版
BSS policy is AliyunBSSReadOnlyAccess) and the English page (Account
Management, administrator or subscription plan permission). magpie reads
the personal plan's usage only, so the read-only policies are named.
Core script budget +275 (app.js and total): one string shown in two
places, less the wrong clause it replaces; the editor and quotaError draw
on every window, so there is no page to move it to.
Run on mote at e97271f02 + this change: gofmt -l clean; go vet
./internal/provider ./internal/gui, GOOS=linux and windows go vet
./internal/provider; go test ./internal/provider -run 'TestAli|Alibaba'
ok; go test -tags nogui ./internal/gui -run
'TestCoreScriptBudget|Words|I18n|Alibaba|AccessKey' ok; node --test of
the new alibaba-ram-grants (20/20, Chromium and WebKit, all five
languages, 420px) with every GUI file that draws an access key or a
card error, i18n-keys, i18n-en-no-cjk, form-align, editor-advanced-align
and quota-name-translated: 253 pass, 7 red, all under load ~70:
editor-advanced-align (#6421, a Claude editor) and qianwen-plan's 8s
sign-in wait (#6852); both green alone on this tree and on the base.
Broken by hand: alibaba-ram-grants on the base's app.js and i18n.js is
red in all 20 cases. After the rebase onto 1bfc6378c: TestCoreScriptBudget, TestAliGateway, alibaba-ram-grants (20/20), i18n-keys and volc-access-key ok on mote.
Not tried: a real RAM user's AccessKey (none here); the whole GUI suite.
jen_celeus on X (tweet 2121683828754530565): the row under Automatic
updates was named "Check every" (zh 检查间隔), so Settings' search for
"更新" didn't find it. It is now "Update check interval": zh 检查更新间隔,
zh-TW 檢查更新間隔, ja アップデートの確認間隔, de Update-Prüfintervall.
The saved updateEvery and its choices are unchanged.
settings-search now types the language's word for update (update, 更新,
更新, アップデート, update) and needs the interval's row shown under
About; with the old zh label it is red ("更新" finds the update check's
interval), checked by putting 检查间隔 back. update-auto finds the row by
its new name.
Run at 658af9118 (this stack on origin/main 9cd5f3652), mica via
mica-run (mote was over its load): node --test of the 45 files
i18n-*, gui-* (zh-TW, ja, de), update-*, about-*, settings-*, Chromium
and WebKit, every language: 897 tests, 885 pass, 12 fail. The 12 are in
settings-groups (#6597), settings-hints (#6107, #6073) and
settings-lines-wrap (#6353); the same 12 fail on origin/main 4aa64500f
alone (56 tests, 44 pass). i18n-keys, update-channel,
update-stable-newest, update-auto and settings-search pass in both
engines and every language.
Not tried: the real app; the whole 1,500-file GUI suite.
@xMopf7RF on X (tweet 2121441393424113800): the Sessions page's Move
refused an old Codex session with "rollout-2026-03-09T09-25-….jsonl.zst
keeps its history by byte, and "magpie" is longer than the provider it
names: Codex couldn't open it moved", and offered nothing else.
Since 67b12956a a paginated rollout's session_meta is only rewritten at
its own length (Codex keeps places in it by byte), and MoveCodexProvider
refused a longer id outright. But Codex reads a paginated thread's
provider from its row in the state database, never from its file
(codex-rs read_thread; RetagPagedCodexThreads already moves such threads
by the row alone, tried with the real codex 0.166). So now
rewriteCodexProvider leaves such a line as it was and says so (kept),
and moveCodexPaths moves the thread by its row. Every caller gets it:
the Sessions page's Move, Resume's move first, and the sync's
MoveCodexThreads/MoveRecentCodexThreads, which met the same refusal for
a provider shorter than magpie.
With no row to move it by, it can't move at all: it is refused as
sessions.StuckError, every file put back and no trash copy left, and the
API says stuck with the provider it stays on. The page then says why,
that the session stays on that provider unchanged and shows in Codex when
Codex uses it again, and that Delete clears it into magpie's trash, where
it can be restored. New string in zh, zh-TW, ja and de.
Run, at 7951989c6 (on origin/main e0889719c):
- go test -count=1 -run 'TestMoveCodexProvider|TestRetagPaged|TestPortCodex'
./internal/sessions/ on mote: ok.
- Old code back (codex_provider.go from e0889719c, StuckError stubbed):
TestMoveCodexProviderPagedByRow and TestMoveCodexProviderPagedNoRow
FAIL with the reporter's exact error text; green with the change.
- node --test sessions-codex-provider-stuck, sessions-codex-provider,
sessions-codex-provider-pick, i18n-keys, i18n-en-no-cjk on mote,
Chromium and WebKit, five languages, 900px and 420px: 42 of 42 pass.
The new GUI file with the old client.js: 0 of 20 pass.
- gofmt -l on the changed packages: nothing.
- Full suite (vet x3, builds x3, go test -tags nogui ./... -timeout 45m)
queued on mote's suite lock; pushed before it ran, per the owner's
ship-at-once rule. Its result goes in a follow-up.
Not tried: a real Codex resuming a thread moved this way. The row-only
move is the one RetagPagedCodexThreads makes, which was tried with codex
0.166.0 exec resume (docs/subsystems/agent-wiring.md). Not reproduced:
the no-row case with real Codex, where Codex 0.166 keeps a row for every
paginated thread; it is covered by a fixture only.
"希望 可以在不同的 agent中选择是否显示供应商名字,现在只能统一开关":
Provider in model names was one switch for every agent. An agent's
Details on the Agents page now has a Provider in model names row: As in
Settings · <mode> (the default, kept for everyone), On, Not on names I
set, or Off, for that agent alone. The CLI has the same thing:
`magpie model suffix <agent> [on|own|off|every]`.
- settings.AgentSuffix keeps the agent's own mode by the id its lists are
kept by (Agent.ListsFor, lower-cased, without @wsl: or #profile). An
agent with none follows PlainNames/PlainOwnNames as before, so nothing
a user already set changes.
- provider.LabelsFor(agent, es) reads that agent's mode. Every place
that named models with Labels for an agent now passes the agent: Codex's
catalog, the agents' written lists (route.go, Pi's extension), the
gateway's /v1/models (by agentOf(r)), Muse, Antigravity, Ollama, Claude
Desktop's catalog and descriptions, Claude Science. Labels is
LabelsFor("").
- POST /api/settings/agent-suffix sets it and rewrites the agents'
configs (catalog.Touched), as Settings' switch does.
- docs/subsystems/agent-wiring.md says where the mode is kept and read.
- The picker is in agentsuffix.js, imported when an agent's Details open,
so the core grows by the one line that loads it (1,529,335 of its
1,533,802 budget, after the previous commit's move). An agent whose
list takes no names of magpie's (noNames) has no row.
Tests, each red on the old code: TestAgentSuffix (provider: modes, keys
with @wsl and #profile, reset, bad input), TestAgentSuffixReachesItsFileAlone
(agent: Pi's file follows its own mode while Codex's follows Settings'),
TestModelsListFollowsAgentSuffix (gateway /v1/models per agent),
TestModelSuffixAgentCmd (cli), settings_keep (AgentSuffix survives a
Settings save), agent-suffix.test.cjs (5 languages x 1180/390 x chromium
and webkit, and a noNames agent has no row).
Broken by hand (a copy with LabelsFor ignoring the agent and the picker
reading no own mode): TestAgentSuffix, TestAgentSuffixReachesItsFileAlone,
TestModelsListFollowsAgentSuffix and every agent-suffix GUI case went red.
TestModelSuffixAgentCmd stayed green; it checks what is saved, not the
names.
Run on mote at this change on top of 720200092: gofmt -l clean; go vet darwin, GOOS=linux
-tags nogui and GOOS=windows clean; go test -count=1 of internal/provider,
cli, gui, settings, settingsapi and agent: ok; internal/gateway in an earlier
run of this change at 3b261932e: ok (1044s), and at this head -run
'Desktop|Models|Suffix|Science|Muse|Ollama|Antigravity|Codex.*Catalog': ok.
node --test of every agent-*, i18n-* and gui-* file plus old-webkit, both
engines: 1026 of 1049. The reds are all on main or under load:
agent-switch-accounts' 20 not-connected cases (red at origin/main 7c41060c2
too, filed as #5925), old-webkit's Safari 15 styles (#5919), and one case
each of agent-compact (#5607) and agent-stale-copies (#1949), which pass
44/44 when run alone. panel-fold's 'keeps what was clicked' is red on main
too (#5796).
Rebased on 0f94acc99 and run again at this change (9d82986ea): gofmt
clean, go vet clean for darwin, linux (nogui) and windows; provider,
gui, settings, settingsapi and agent ok, the gateway's suffix and
agentOf tests ok; GUI agent-suffix, old-webkit, agent-bulk-visibility,
visibility-saving, i18n-keys and i18n-en-no-cjk in chromium and webkit,
57 of 58, the one red Safari 15's styles (#5919). internal/cli was red
only on /api/model-price having no command, from main's 40ca0c88d;
the next commit names it. Rebased again on ccc96b4a7 before the push
(proc, codex, claudetui, a remote window, routing rules, redact;
no conflict), core budget test ok there.
Not tried: a real agent with a real account picking its own mode; WSL and
Windows agents (the @wsl: key is covered by a unit test only).
precis1onz (iOS Safari, dark, English, Usage) saw the page move sideways
and a dark band stay at the screen's foot.
- Sideways: Usage → Requests' "Split by" row (label and five choices) is
one unwrapped span, 393 to 558px wide at 375 to 430px. It was the only
thing wider than a phone in any view or language. On the phone layout
it now wraps inside the screen (app.css, phone block only).
- The band: the Requests table's stand-in scrollbar (#799) is sticky at
the view's foot, and a touch screen draws no bar in it, so it stood
there as an empty 12px band. ledHScroll now leaves it hidden on
(hover: none) and (pointer: coarse); a finger moves the table itself.
A desktop keeps it as before.
New test, phone-no-sideways.test.cjs: every view (Agents, Sessions,
Providers, Routing, Groups, Gateway, Library, Plugins, Masking, each
Usage tab, Settings' tabs) on an iPhone at 375 in en, zh, zh-TW, ja, de
and at 390 and 430 in en, in Chromium and WebKit, with long ids, emails
and paths; nothing may be wider than the screen and no empty band may
stay sticky at a view's foot. ledger-swipe now expects no bar on a
phone, and that the swipe moves the table.
Run (mote, through mote-run):
- phone-no-sideways: red on the old assets (803d7747e) in every run,
led-split too wide plus the empty #ledHScroll at the foot; green on
the new in both engines, again at the rebased head with ledger-swipe
and usage-ledger-leave.
- mobile-web 14/14 in both engines with a real git base in the copy,
so the desktop layout matches the base.
- Every GUI file the change can reach (1485 tests, both engines): the
reds are all red on base and filed: mobile-web desktop subtests in a
copy without .git (#5013), phone-connect-menu 420 (#4706),
usage-agents-hide (#2276), usage-computers sync tick in Chromium
(#5224), usage-fold (#3415), usage-ledger Requests (#5048).
ledger-swipe in WebKit flakes on base too (#5223).
- go test -tags nogui ./internal/gui ok (size budgets), also at the
rebased head; gofmt clean; go vet for darwin, linux and windows ok.
Not run: the whole GUI and Go suites. The run was queued over two
hours behind mote's suite.lock and never started; the change touches
no Go code.
mahiro233 on Discord (v0.1.3372, Kiro plugin 0.1.34): Kiro's account
sheet asked "Choose a sign-in method" with three choices and Cancel, and
offered no API key. The plugin has one (its third way, "Kiro API key
(ksk_…)"), but a moved subscription opens its plugin's first way at once
(#777), and when that way asks a question first, as Kiro's does since
plugin 0.1.21, the question had no way to the others: "Other ways to sign
in…" and "Use an API key instead" are on the waiting box only, which the
question comes before. Kiro CLI's or IDE's sign-in was out of reach too.
The first question of a moved subscription's way, when the plugin has
other ways, now has "Other ways to sign in…" (already in every language),
which shows the way picker, as the waiting box's does. A later question
(Kiro's Start URL) doesn't: the user chose that way already.
Test: plugin-ask-ways.test.cjs, en and zh, Chromium and WebKit: the
question's choices and hint, the link, the picker with the key way, the
key field titled by its label, nothing signed in before a key, no link on
the Start URL question, and the plugin's words in Chinese where it gives
them.
Run on mote at the pushed head, Chromium and WebKit: plugin-ask-ways,
plugin-other-ways, -moved-signin, -key-hint, -password-prompt, -signin,
-keyless-signin, signin-paste-plugin, deprecated-subscriptions,
i18n-keys and i18n-en-no-cjk, 49 of 50 each; the one red is i18n-keys'
"a plugin's words are its own", the same 3 words on origin/main
2a48974e8 (#5327, #5426, #5482). TestCoreScriptBudget is red at both, as
below. Broken by hand: with origin/main's app.js,
plugin-ask-ways is red (en waits for the link, zh for the Chinese
question). Not tried: a real Kiro key (none entered anywhere).
Core script budget: the two commits add 1,284 bytes to app.js, paid for
by cutting the Add sheet's comments on retired built-ins (Cursor, Grok,
WorkBuddy, Command Code, Qoder, Devin, Zed, Factory, MiMo, Kiro) and
inLang's to one line: the core is 1,535,556, 260 under origin/main's
1,535,816, no raise. Main stays over 1,533,802 from 40cbdaa7e (#5795).
The /me page's Claude Code tab wrote the picked model into
ANTHROPIC_MODEL and into ANTHROPIC_DEFAULT_OPUS_MODEL, _SONNET_ and
_HAIKU_ alike, so picking Opus sent every Haiku background call to Opus
too (and picking a GPT model made "haiku" a GPT model).
The pick now sets only ANTHROPIC_MODEL. /v1/magpie/me returns `tiers`,
built by keyPageTiers from the models this key may use: for opus,
sonnet and haiku, the newest model of that family (claudeTier and
claudeVersionOf; routing groups and fable are skipped). A tier the key
has no model for is left out of the snippet, so Claude Code keeps its
own default for it.
Siblings: the agent writer (internal/agent/claude.go) has its own tier
design (tiers follow the main model, haiku to the provider's Haiku, the
user's own tiers kept) and writes the user's real config; it is a
different situation and is left as is. OpenMausBot's snippet writes
only ANTHROPIC_MODEL.
Run (mote, via suite.lock):
- go test -count=1 -run KeyPage ./internal/gateway/: ok
- GUI key-page.test.cjs: chromium 13/13, webkit 13/13
- gofmt -l: clean; go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./..., and go build for darwin, linux (nogui) and
windows: ok
Broken by hand:
- old keypage.html: the new GUI test is red in both engines
(ANTHROPIC_DEFAULT_HAIKU_MODEL 'claude/claude-opus-5', want
'claude/claude-haiku-4-5')
- keyInfo without keyPageTiers: TestKeyPageTiersAreTheirFamilys red
("tiers map[]")
Full suite (go test -tags nogui -timeout 45m ./...): queued behind
other sessions on suite.lock at push time; its result goes on the
follow-up, with an issue for any red.
Not tried: a real Claude Code against the page's snippet, and the
gateway binary in a sandbox HOME.
Reported-by: strinah (Discord)
Since v0.1.3345 an update's files come from usemagpie.ai (R2) and go to
github.com only when that fails; a mirror stands in for github.com only.
Settings › About › Download source still showed "GitHub", said updates
come from GitHub, and its button "Use GitHub" (zh 恢复官方) read as
switching back to GitHub. Now it shows usemagpie.ai, says GitHub (or the
mirror) is the fallback, and the button is Remove mirror (不用镜像), in
en, zh, zh-TW, ja and de. `magpie update mirror` says the same.
Run on mote (update-mirror, i18n-en-no-cjk, i18n-keys and cli vet again at the rebased head: ok but #5332):
- update-mirror, i18n-keys, i18n-en-no-cjk and every GUI file that opens
About (19 files), chromium + webkit: update-mirror and i18n-en-no-cjk ok.
The reds, rerun one file at a time:
- i18n-keys "a plugin's words are its own" and segs-press-redraw
"clicks its new self once": red the same at origin/main 26e9c9566,
filed as #5332/#5426/#5482 and #4566/#3922.
- lan-docker, public-url-default: red at load ~400, 62/62 ok at load 36.
- about-*, cli-path, settings-sections, statusline-remote,
uninstall-settings: ok alone (red only at load 278 to 400).
- go test ./internal/cli ok, go vet ./internal/cli ok, gofmt clean.
Broken by hand: the new update-mirror test run against origin/main's
app.js and i18n.js: 0 of 10 pass.
Not tried: the real app's About page; the whole GUI suite.
liang_yongxiang on Discord: Routing tells how full one request's context
window was; does Sessions have the same, each turn's share?
A session's details on the Sessions page (and in Usage's Sessions list,
which draws the same details) get a Context line when the gateway sent
calls of it (s.via): the Context tab's spark of its prompts, request by
request against its window, and the fullest one's share beside it, toned
as the tab tones it. A point's tip says "Request 2: 80K of 200K (40%)" (the
tab's spark says it too now, where the window is known); a point clicked
opens that request in Routing with its card. A session the gateway never
saw asks nothing; one it kept no prompt of shows no line.
The data is the routing history the Context tab already reads. A new
GET /api/context/session?agent=&id=&from=&to= reads only the days from the
session's first to its last (30 at most), through the tab's per-day cache
(daysRecsLocked, split out of contextRecsLocked, so the tab's cached days
are not evicted), and keeps that one session (contextOfRecsFor), with up
to 1000 of its requests. The tab keeps the latest 80 sessions and would
leave an older one out. Subagent and side calls are left out as the tab
leaves them out; the same id under another agent is that agent's.
The line's code is in plugins/usage/page.js (sessCtxLine). context.js only
exports spark and health, and pays for its tip by cutting comments, so
the core's scripts are 10 bytes under main's, no budget raise.
Run at this head (rebased on e215d335a), on WSL (magpie-desktop, Linux;
mote rebooted mid-run):
- gofmt -l clean; go test -tags nogui -run
'TestContextSessionLine|TestCoreScriptBudget|TestContext' ./internal/gui/: ok
(also ok on mote at this head).
- node --test sessions-context-line (new: Chromium and WebKit, en zh zh-TW
ja de, 1100 and 420 wide) and context-window: 44 of 44.
Run on mote before the rebase, at 627fd1a3b:
- the whole internal/gui package: its one red, TestCoreScriptBudget
(1,536,110 > 1,533,802), is why the line moved into the plugin.
- sessions-context-line: 20 of 20.
- gofmt -l clean; go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: ok.
- i18n-keys: "a plugin's words are its own" red, the same on origin/main
e215d335a (#5327, #5332, #5426, #5482); the new strings pass its other
checks.
Broken by hand:
- the one-session filter dropped: TestContextSessionLine red ("its
requests' prompts: [21000]", another session's line).
- the tip back to "Request {n}: {tokens} tokens": sessions-context-line red
in de ("Anfrage 2: 80K Token" for "Anfrage 2: 80K von 200K (40%)").
- the details line turned off: sessions-context-line red in en and zh.
Not tried: the whole GUI suite (it was running under mote's suite lock
when mote rebooted; not run at push); a real magpie with real routing history (the GUI test stubs
/api/context/session; the Go test reads real history files in a sandbox
config); the Linux app's WebKitGTK.
Reported-by: liang_yongxiang (Discord)
axelburks on Discord: a vendor routes one model by a header of its own.
A key's provider (built-in or custom) can give each model headers
(settings.ModelHeaders["pid/model"]). They go on that provider's
requests for that model alone, after the provider's headers and after
auth: a name both have is sent once, as the model's, so a user's value
is never overridden by the provider's or magpie's key header. The
gateway names the model (provider.WithModel) on every route that asks
one: chat on each API, translated and streamed, count_tokens, System
One's decision, embeddings, images, videos and the model test. A
fallback provider serving the same model id gets its own headers only.
Accounts and plugins carry their sign-in's headers and take none.
The editor's "Name, price and reasoning level" panel is now "Model
settings" (every language), with + Add header per model, staged and
made with the Save; Restore default takes them away.
The rows being typed are kept out of the draft's
compare, so an untouched editor still closes without asking.
Broken by hand: dropping WithModel from gateway.go turns
TestModelHeadersReachTheirModelOnEveryRoute red; dropping the provider
id check in modelOf turns TestModelHeadersStayWithTheirProvider red.
Run, on this stack over origin/main 0fc3455e2 (mote's suite lock had
hours of queue, so the suites ran on WSL magpie-desktop under flock):
- go test -timeout 45m ./internal/{provider,gateway,gui,cli,settings,fx}
on WSL, ok; ./internal/codexcat on mote, ok; gofmt -l clean;
go vet on mac, GOOS=linux -tags nogui and GOOS=windows on mote, ok;
TestCoreScriptBudget ok (paid by cutting comments, no raise).
- GUI, both engines, every language, on WSL at the pushed head and at
0fc3455e2: every touched test file plus the provider-editor files a
first run found red. No red at head that isn't red at 0fc3455e2. The
shared reds have issues: i18n-keys #5332, model-chip-steady #4388,
model-copy-id #4621, models-works-only #4391, plugin-move-unserved
#4392, provider-fetch-again #5232, provider-levels-save #4394,
provider-levels-scroll #4395, provider-models-rest #4396,
provider-picks-stay #4397, provider-typed #4673, remote-magpie #4398,
zero-priced-free #5262, model-reasonless (webkit de) #4100,
name-suffix-no-names #1937.
- Rebased on origin/main 4ab1191bc (gateway.go moved under it) and run
again at the pushed head: gateway and provider ok on WSL, gofmt,
vet (mac, linux nogui, windows) and the budget ok, i18n-keys,
model-headers and routing-groups-back with only #5332's red.
Not run at push: the whole GUI suite (1277 files).
Not tried: a real vendor that routes by header (Ark); fake vendors only.
Reported-by: axelburks (Discord)
jiezhengj (Discord) runs magpie in Docker on a NAS, MAGPIE_PUBLIC_URL at
the NAS's own 192.168.31.218. The web UI's Gateway list called that
address "Public address" (公网地址), which reads as the internet's, and
Connect's Base URL menu offered 本机 / 公网地址 / 局域网, where 局域网 was
really the Docker bridge's 172.17.0.1 that other containers on the host
use, while the list above it named that one "Other containers on this
host".
The classification itself was right (gateway.PublicIP never takes
RFC 1918, CGNAT or ULA for the internet); the labels weren't: any
MAGPIE_PUBLIC_URL was "Public address", and Connect's menu had its own
three-way rule that knew nothing of the bridge or of internet addresses.
- gateway.URLKind(u): "internet" (PublicIP), "local" (any other IP
literal) or "" (a name, not looked up). /api/settings and
/api/providers' gateway carry it as publicKind beside publicURL.
- settings.js addrWho(g, u, others) is the one rule: this computer;
the bridge address as other containers'; an internet address as such;
MAGPIE_PUBLIC_URL by its kind (private: Local network; a name: Public
address); anything else Local network. The Gateway list (each label
said once for the lines it heads; local, then other containers, then
internet), Connect's Base URL menu and About's MAGPIE_PUBLIC_URL row
all use it.
- "Public address" now only names a MAGPIE_PUBLIC_URL that is a host
name; zh 公网地址 → 对外地址, zh-TW 公開位址 → 對外位址 (ja/de already
neutral enough: 公開アドレス, Öffentliche Adresse). No new strings.
Run, on mote (sandbox HOME, Go 1.26.8):
- go test -run 'URLKind|PublicURL|LAN|Container|DefaultGateway|HostNetwork'
./internal/gateway ./internal/gui: ok, at 2dac9b84e and again at this
rebased head on 6b7ee4a98
(then rebased onto a7113d5c9, which shares no file with this, and
not run again).
- GUI, chromium and webkit, 18 files (allow-ips, api-key-theme,
connect-snippet-shell, gateway-card, gateway-connect-keys,
gateway-caller-keys, connect-address-kept, gateway-keys-off,
lan-public, lan-docker, phone-connect-menu, public-url,
public-url-default, side-gateway-lan, key-page, statusline-remote,
i18n-keys, i18n-en-no-cjk): chromium 152/156, webkit 153/156. Every
red is red at base 2dac9b84e too and filed: i18n-keys "a plugin's
words are its own" (#5332, #5327, #5482, #5426), phone-connect-menu
420 public / no public URL (#4706, #4707), gateway-caller-keys
chromium en (#3797, passed at base this time).
- Again at this rebased head: lan-docker, public-url-default,
public-url, lan-public in both engines, 86/86.
- gofmt -l clean; go vet darwin (gateway, gui, cli),
GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...: ok.
- Full go test -tags nogui -timeout 45m ./... through suite.lock was
still running at push (the owner's rule: no verified commit waits on
the queue); a red it shows gets its own issue.
Broken by hand: TestPublicURLSaysItsKind on the old source fails
"publicKind <nil>, want local" (and want internet); the new lan-docker
test with the old JS fails 'Public address' vs 'Local network' and
'公网地址' vs '局域网' (chromium en, zh).
Not tried:
- a real Docker container or NAS; the cases are fixtures.
- magpie web's and the share banner's CLI lines still say "network" for
every address, internet ones too; left alone.
- an in-container page opened at a public IP the host derived (not in
lanPublic, not MAGPIE_PUBLIC_URL) is still labelled Local network.
- ja/de "Public address" wording kept.
Reported-by: jiezhengj on Discord
The owner asked for the groups to leave the Routing page (11-06): under
the live stage and every request they were a long scroll down, and New
group with them. The design was reviewed before this was built.
- New page, Routing groups (#view-groups), drawn by the routing plugin's
same script (routingPage), so the editor, its dirty/discard and every
group action are unchanged. Toolbar: filter, "N groups · M on",
Templates, Import, Select, and New group as the filled button. The list
is right under it, and a Settings section under the list holds Found
groups (with Exclude providers…) and Names in agents' lists.
- No Export button: each group already has its own Copy to share.
- Routing keeps the live stage and the requests. A request's group opens
the groups page at its row.
- The sidebar has a Routing groups tab right after Routing (from 1024
points). The header's row has no room for one: at 860px the extra tab
pushed the logo out (brand.test). There the tab is hidden, Routing's
tab is lit for both pages (markNav), and Routing's head has a
"Routing groups ›" button, hidden beside the sidebar.
- Every way in now goes to the groups page: the guide's Open routing
groups, the panel's and the provider editor's Make a routing group
(window/main?view=groups&newgroup=…). mainView still takes
view=routing&newgroup from an older panel.
- Words: "Routing groups", "Open routing groups", "Once saved, make a
group of them in Routing groups.", and the editor's names note now says
the setting is under the list, in zh, zh-TW, ja and de. "Open Routing"
stays for the Agents page's button.
- Docs: providers-accounts, gateway-routing, plugin-runtime, gui-shell
and reference say "Routing groups page" where they mean the groups.
- Core budget: the core's scripts are 1,533,774 of 1,533,802, paid for
by three show()/setGatewayMode comments cut in app.js. No raise.
Tests: routing-groups-page.test.cjs (new) covers the page in Chromium and
WebKit, en/zh/zh-TW/ja/de, at 1280, 640 (window) and 420 (web): no
groups on Routing, the tab or the head's button by width, the lit tab,
toolbar order, New group primary and in sight, list then Settings, no
sideways scroll, no native select, no left-border accent; a request's
group to its row; quotas redrawn with an open editor left alone. The
trace tests (routing-compact, -pause-folder, -rule-models, -folder) open
Routing, then show the groups; routing-editor-foot and
name-suffix-where-named scroll by wheel, as the scroll guard lets a
reader; builtins expects the groups tab beside the sidebar only.
Removed: routing-groups-jump (the head's "Routing groups ↓" that scrolled
down to them, gone with them), routing-pointer-pin and routing-steady
(the groups kept in place under requests streaming in above them: no
request is above them now). Their guarantee that what redraws leaves an
open editor and its typing alone is routing-groups-page's quotas case;
Routing's own lists keep their keepInView.
The groups page's jump: a request's group, or a pool's "Several keys"
chip, opened the groups page and scrolled the row to the centre, and the
next frame show()'s backAfterLoad put the page back where the reader
last left it, then brought the focused segment in by "nearest": in
WebKit the pool sat half under the window's foot (routing-mode-goes, 9
of its 10 WebKit cases). goRouting now jumps at once on a page it opens and
marks it arrived(). The wheel in routing-many-keys turns over the keys:
at the page's foot, now shorter, the mouse rested over the requests list
(.rt-reqs, overscroll-behavior: contain), which took every wheel up, and
the test stopped with 2 keys in sight. That is #4082's cause.
routing-days-fit's fixture has 12 requests, a day that fills the window,
since the day bar held needs room under it.
Run on mote (macOS 27, load 25 to 65), Playwright 1.62.0:
- Go: go vet, gofmt -l and go test ./... at the rebased head (650bf8412
base) ok except TestMainWindowCorners (#3949); internal/gui again
after the last edits: the same, TestCoreScriptBudget ok (1,533,773 of
1,533,802, no raise).
- GUI, the 262 files a change here can reach, at the head and at the
base: the reds at the head are the base's, with their issues:
menu-input-scroll #3402, provider-mask #5109, context-fold and
order-unknown (webkit) #3479, header-centre #3479, i18n-keys
#5332/#5426/#5482, account-eye #5052/#4244, call-headers webkit de
#5045, codex-predictions #2624, codex-auto-reset webkit de #4790,
routing-* under load #5088, and zero-priced-free, last-page,
reasoning-speed, routing-row-swap/-tag-whole/-story-shrinks/-steps-cap
and routing-intent-entry, red at the base the same way.
- After the last edits: the 11 files with a way to the groups page or
its scroll (group-*, routing-groups-page, routing-mode-goes,
routing-groups-off, routing-provider-off, routing-many-keys,
click-scroll), 175 of 176; the one red is routing-many-keys webkit's
wire at the foot, red at the base in 8 of 12 (#5543). brand,
gateway-mode-sessions, header-zoom-fit, header-centre,
inner-scroll-contain and mobile-web: the same 11 reds at the head and
the base (mobile-web compares with origin/main through git, which a
mote-run copy hasn't).
- Rebased on ecc26a339, again: gofmt -l, go vet ./internal/gui and
TestCoreScriptBudget ok; 10 GUI files (i18n-keys, routing-groups-page,
routing-mode-goes, sidebar, brand, menu-first-second, library-bar-more,
click-scroll, name-suffix-saved, unlisted-models) 211 of 212, the one
red i18n-keys' "a plugin's words are its own", red the same at
ecc26a339 (#5332/#5426/#5482).
- Broken by hand: without the groups page's CSS rule, brand and
routing-groups-page go red (32 fails); with the old goRouting,
routing-mode-goes is red in 9 of its 10 WebKit cases.
Not tried: the whole GUI suite on Linux (WSL magpie-desktop) at this
head; a run at an earlier head is under way and has the Linux reds
#4120/#4121 name. Not tried in the real macOS app, only Playwright's
WebKit.
The first time an agent's Details opened, sheet() measured the row before
/api/settings (and, for a full-context row, agentcompact.js) had arrived,
slid to that half height, then jumped to the full one when they landed.
The click now loads what the row needs first (the button shows Loading…),
and only then measures once and slides. A later click supersedes a load
still in flight. agentcompact.js finds #fullContextSegs on the list it is
given, so it fills a row before it is in the page. This is chiperman's
patch (8886a860a) without its core budget raise: Agents-page comments in
app.js were cut instead (app.js 1,311,357 -> 1,311,024; core 1,533,459 of
1,533,802).
agent-expand-steady's slide check looked for the height animation only in
the click's own task. A first opening now waits for the settings read, so
it looks in every frame; it still fails when no frame is animated.
Run (mote, at base 8ee85c59f):
- agent-details-ready.test.cjs (new) + agent-expand-steady: 40/40.
- Every GUI file touching ag-link/ag-exp/agent-compact, click-scroll,
i18n-keys: all green except i18n-keys "a plugin's words are its own"
(red on origin/main 8ee85c59f too: #5332, #5426), agent-models-redraw
chromium 560 "page closed" (4/4 alone), mobile-web "desktop matches
origin/main" (needs .git, which mote-run's copy has none of), and
agent-expand-steady's sync check (fixed above).
- TestCoreScriptBudget: ok.
Broken by hand: agent-details-ready on the old app.js fails with
"Details must end without a height jump: 202.984375 -> 729.6875".
Not tried: the real app with the reporter's agents; mobile-web.
Reported-by: chiperman
Co-authored-by: chiperman ju <chipermanju@gmail.com>
Suggested by @faithleysath (matrix0487 on Discord): the usage ledger now
keeps what each request received back (down_bytes) beside what it sent up
(up_bytes, #4456), and what DeepSeek's image files (#5407) kept out of the
upload (image_files_saved).
Shown in Usage → Requests:
- a row's details: "Sent upstream", "Received" and "Saved by image files",
each only when it is above 0. A row from before has none of them, not 0;
- under the Requests card, the period's "↑ up · ↓ down", with
"{n} saved by image files" when there is a saving. Its title gives the
exact bytes. A period with no counted bytes shows no line.
What is counted:
- Down bytes are counted as the reply body is read, after Go's transport
has undone gzip, so a gzipped reply counts its plain size, not wire
bytes. A plugin's row counts the local hop to the plugin host. A 101
body is not wrapped. Every try counts, so a refused try plus the
answering one add up (TestLedgerKeepsDownBytes).
- Image files saved, per try: the body before the swap minus the body
sent, minus the upload bytes this request itself paid (len(b64)/4*3).
It can be negative on the turn that uploads; the GUI shows only a
saving above 0. Gaps: an upload that finishes after the wait timeout or
ctx-done is not subtracted (as with up_bytes); a joined upload flight is
paid by the request that started it; multipart overhead is approximate.
- packedRow grows by three int32 (152 bytes, still within the test's
bound), clamped to the int32 range. Totals sum all three.
- settledCountVersion goes 1 → 2, because Totals now count bytes. The
settled page, heat and effort caches recount once, on the first start
after the update. The heat key hash includes the new fields.
Run on mote at 84ad780b6 (origin/main, fetched):
- go test ./internal/usage: ok.
- go test ./internal/gateway -run 'TestLedgerKeepsDownBytes|TestDeepSeek|
TestCodexOwnTurnKeepsUpBytes|TestLedgerKeepsUpBytes|
TestLedgerCountsATrysSecondAsk': ok.
- go test ./internal/gui: only TestMainWindowCorners/macOS_26_SDK fails,
as on main (#3949).
- gofmt -l clean; go vet of usage and gateway for darwin, linux (nogui)
and windows; go build ./...
- New GUI test usage-ledger-bytes.test.cjs: 30 of 30 in Chromium and
WebKit, en/zh/zh-TW/ja/de, at 1180 and 420 wide. It is red on the old
page.js.
- usage-*, ledger-*, i18n-* and nav-timeout GUI files: 1231 of 1267.
Every red is red on a clean 84ad780b6 too: usage-agents-hide (#3414),
usage-fold (#3415), usage-ledger's "newest live route" (#5048),
usage-overview-fold, which flakes in other languages on each run
(#3947), i18n-keys (#5332, and #5426 filed now for "No session ID"),
and nav-timeout (#5425, filed now).
Broken by hand:
- gotDown not wrapping the body: red, "down 0; the vendors answered
141/265 bytes" and "the backend answered 105 bytes".
- the saved += removed: red, "saved 0".
- the settled guard red with the bytes fixture until the version raise.
Not tried: a real DeepSeek or other vendor account through a built app,
and a screenshot of the real app. The CSV export does not have the new
columns yet.
chen2652 (Discord #help) reported that Open Design's icon is almost invisible
in dark mode, with no browser dark-mode extension on. The icon is the plugin's
own picture, open-design.ai/favicon.svg: a single fill, #26251E, drawn as an
<img> on the dark card (#232327).
Now icon() judges each picture once, after the picture's own load, so lazy
loading is kept (#909). The result is cached per src. If every opaque pixel
of a picture is one tone (the range of each channel is at most 24), and that
tone is near-black (every channel at most 72) or near-white (every channel at
least 224), the picture is replaced by maskSpan, the way a mono logo is drawn:
a mask in the text colour. This holds on any ground, Omarchy's themes
included. It covers user pictures (file:), plugin pictures, and bundled
-color and PNG icons.
Audit: every bundled picture icon, plus the plugin registry's pictures, was
measured in CIELAB against #232327 and #fff. Two were invisible in dark mode:
Open Design's plugin picture and bundled voyage-color.svg (#012E33, in the
provider icon picker). Both are now masks. Multi-tone and tiled logos stay as
they are (pipellm, zcode, mothx, deepinfra and others: low contrast in places
but readable). Mono icons were masks already.
Test: icon-one-tone.test.cjs, with the real favicon bytes in fixtures/.
- It draws every picture logo on the dark and the light card and measures,
on a screenshot, how much of each stands apart from the ground.
- It opens Open Design's Installed row on the Plugins page and checks that it
is a mask in the icon's text colour and visible in both themes: 5
languages, 980px and 420px, Chromium and WebKit.
icon-url and icon-url-saved served a plain black square as the fetched
picture. That square is one tone, so it is now a mask. Their fixture is now a
coloured tile, like the letter icons the server makes (favicon.go).
Run (on mote unless named):
- icon-one-tone: 48/48. The 14 icon/theme GUI files (icon-tile,
plugin-own-icon, mono-icon-redraw, plugin-registry-icon,
models-add-and-icons, market-icon-corners, request-provider-icon,
routing-client-icons, routing-log-icons, tray-logos, api-key-theme,
icon-url, icon-url-saved, icon-one-tone): green in both engines.
- go test ./internal/gui -run 'Budget|I18n|Asset', gofmt -l,
GOOS=linux go vet -tags nogui and GOOS=windows go vet of ./internal/gui:
all clean, and no size budget was raised.
- A whole GUI suite on Linux (WSL) was cut off when the SSH connection to
xiaomi-gpu dropped, after about 9,160 passes and 277 reds:
- 40 of the reds were icon-url and icon-url-saved (fixed above).
- The rest were in 75 other files. Those 75 files were run on mote with
this change and at origin/main 76f00399c: 196 reds with the change and
208 at main, in the same files.
- The one file red only with the change, copilot-ghe (webkit zh,
"route.fulfill: Target page ... has been closed"), is #1949's teardown
race and passes 6/6 alone.
- Every file red at main already has an open issue except
redact-words-list, filed as #5288 and fixed by a18ff505b before this
rebase.
- At the pushed head (a18ff505b + this commit): the budget/vet/gofmt checks
above, the 14 icon files, redact-words-list and copilot-ghe, rerun.
Broken by hand: with both toneCheck(img) calls commented out,
icon-one-tone fails 46 of 48. voyage-color shows 0.0% ink in dark, and the
Open Design row stays an <img>. Before and after screenshots of the row in
both themes were taken from the same test.
Not tried: the real desktop app (Wails, WebKitGTK) and a real install of the
Open Design plugin. The page was driven with the API faked and the real
favicon bytes. The whole GUI suite has not had a complete run.
mycf_711 (#5269): WorkBuddy Pro's plugin-level "panel" switch was drawn in
Plugin options, under the whole model list, so it took a scroll every time.
An option in auth.options may now say `placement: "top"`: the provider's
editor draws those in a Plugin options block right under the accounts,
above Routing, and the rest under the models as before. The note that the
plugin reads them goes with the first block. host.js keeps placement only
when it is "top" (anything else is left out, so the option goes under the
models), and plugin.Option carries it to /api/providers. A plugin that says
no placement is drawn exactly as before, and an older magpie ignores the
field. Documented in docs/subsystems/provider-plugins.md and
docs/reference.md.
Run (mote, through mote-run):
- new internal/gui/tests/plugin-option-placement.test.cjs: chromium 31/31,
webkit 31/31 (1100 and 420 wide, en/zh/zh-TW/ja/de; mixed, top only,
none or an unknown placement; the top switch posted on Save).
- plugin-options.test.cjs 11/11 and plugin-option-words.test.cjs 21/21,
i18n-keys 4/4, each in chromium and webkit.
- go test ./internal/plugin ok (TestPluginOptions checks "top" kept and
"sidebar" left out); go test -run Budget|Script|Asset ./internal/gui ok.
- gofmt -l internal/plugin empty; go vet ./internal/plugin ./internal/gui
./internal/cli, GOOS=linux -tags nogui and GOOS=windows vet of
internal/plugin ok.
Broken by hand:
- app.js put back to its parent: the placement test fails "mixed" and
"top" in both engines (blocks under the models), "none" still passes.
- host.js's placement line removed: TestPluginOptions fails
"second = {... Placement:}".
Not tried: a real WorkBuddy Pro plugin (Gitee, private) with the field;
the full go test ./... and the whole GUI suite run after the next commit.
Asked for by axelburks on Discord. A plugin's search hook entry can name
a provider its own auth hook signs in to, `auth: "<provider id>"`. It then
takes no key. The host picks an account, renews it under `fresh` (the wait
counts within the search's time), runs the hook in `inScope`, and gives it
`ctx.getAuth()`, which returns that account's sign-in. A token the hook saves
with client.auth.set goes to the same account.
The gateway (askSearchSignedIn) asks one account at a time. It takes the
accounts that are on, in the order the provider's model requests take them
(accountsOn, now shared with fallback.go), and puts an account resting from
a search refusal last. A refusal rests only that account's search
(restSearchKey "account <key>"), never its models' rest (restingUntil). Every
attempt gets its own request-log row. An entry without `auth`, or naming a
provider the plugin doesn't sign in to, is a keyed entry as before, with no
getAuth. In Settings → Search, a bound entry shows "Signs in with {name}" in
place of the key field, and the row says whether it is signed in and how
many accounts are on (every language).
Docs: reference.md (with an example), plugin-runtime, plugin-tools and
provider-plugins.
Run on mote at f44fa2ef6 + this change. After rebasing on acd789d45 (an
unrelated responses_ws change), go build ./... and -run "Search|Budget"
on plugin, gateway and provider are ok again at this tree.
- gofmt -l clean; go vet ./internal/... ok; Linux and Windows vet of
plugin/gateway/provider/gui ok
- go test -count=1 -timeout 45m ./internal/plugin ./internal/provider
./internal/gateway ./internal/gui: plugin, provider and gateway
ok; gui red only in TestMainWindowCorners/macOS_26_SDK, mote's
macOS 27 title bar, already filed as #3949
- node --test on 15 GUI files: search-signs-in, search-api, search-keys,
search-order, search-all, search-first, search-instead, searcher-pick,
searcher-then, provider-search, settings-search, i18n-keys, gui-zh-tw,
gui-ja, gui-de. 207 of 207 pass (chromium and webkit, 980/420px, en/zh).
Broken by hand. Each break made its test red:
- B1, no ctx.getAuth: plugin TestPluginSearchSignsIn "ctx.getAuth is not a
function"
- B2, no renewal: "searched as due@seek acc-due", "the renewal never began"
- B3, gateway with no auth branch: gateway TestPluginSearchSignsIn "signed
in: k9 undefined"
- B4, a refusal that also rests the model account: "a search's rate limit
rested a@seek for its models"
- B5, getAuth handing out the provider's first account: "as the second
account: a@seek acc-a"
- B6, the hook run outside inScope: "a token saved while searching as b: a
rotated-b@seek"
- B7, getAuth given to every entry: "keyed: k9 function"
- settings.js showing the key field for a bound entry: search-signs-in red
in every engine, width and language
Not tried: a real search vendor or Axel's own plugin; real accounts; runs
on the Windows or Linux boxes; the full GUI suite. The full go test ./...
runs after the push.
Zachary-wW (#3745): the Library's "Some of the Library couldn't be
written" card had Try again and nothing else. Their Grok Build has an
AGENTS.md magpie can't stat, and every change writes every agent again,
so the card stood over the page through every edit on the Instructions
tab, with no way to put it away.
The card has a × beside Try again now, named "Hide until something new
can't be written". It hides the write failures the card lists, on every
tab, and sends nothing. The page keeps what was hidden by agent and item
("grok" and "instructions"). After every answer, a read or a change, it
lets go of a hidden failure that no longer stands, and a failure not
hidden brings the card back with all it lists; so does a hidden one
whose item was written in between and fails again. So the card stays
hidden while the reporter keeps editing, though each change fails on
Grok Build's file again, and a new write error shows it again.
The key is not the error's text: a write goes through a temp file named
anew at each try (edit.WriteAtomic), so a folder that can't be written
fails with a new text at every sync, and the card would never stay
hidden. Meanwhile each change's toast still names what failed, as
before, and a skill that couldn't be given keeps the dot on its agent's
chip. The list magpie keeps (lastProblems) is not touched. The × is
named by its title, as the Library's other × buttons are.
An agent's own skills in the library's way are the agent's to settle,
not failures: they stay, under their own title, with no ×. The view
keeps its scroll as the card goes, as render() keeps it for Try again;
Chromium's scroll anchoring moved it. From the keyboard the focus goes
to the card's next button, or to the tab open. On a phone the × is 44px
wide and as tall as Try again. The card's title keeps its words whole:
with less than 10em beside it, Try again and the × go to a line of their
own (beside them, a German title at 320px broke "Bibliothek" and
"geschrieben" inside).
library-problems-hide.test.cjs is new. Its API answers as
internal/gui/library.go does: a change's problems are its full sync's,
an Instructions change keeps the rest and puts its own in, and a read
gets the list with no result. Its error texts are the ones magpie's own
sync gave in a sandbox HOME, through Handler in a scratch Go test (not
kept): Grok Build's AGENTS.md a link into a folder magpie can't search,
its folder read-only, and its skills folder read-only.
Not covered: what was hidden lasts as long as the page, so a reload
shows the card again. The × hides, it doesn't fold: while the card is
hidden, its error texts and Try again are out of reach, though any
change writes every agent again. An agent's instructions, and its whole
MCP file, have no mark of their own as a skill's chip has, so with the
card hidden only a change's toast names their failure (#3987).
What was run (tree f98a4b99, on origin/main f8cd964a, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, umask 077:
library-problems-hide.test.cjs, Node's runner with Playwright 1.58,
Chromium and WebKit, three runs each: 16 of 16 pass in every run (15
cases and the file's own)
Without this change (f8cd964a's client.js, i18n.js and library.css,
the new test kept): 16 of 16 red in both. Broken by hand, one at a
time, Chromium and WebKit unless said:
any change that fails at all brings the card back (the first
draft's rule): the reporter's case, the same failure under another
error and a hidden failure written since, red
a change's failure not hidden brings it back, nothing let go: a
hidden failure written since, red
a new failure never brings it back while anything is hidden: a
failure not hidden, a hidden failure written since and another
window's change, red
the key with the error's text in it (Chromium): the same failure
under another error, red
the × writes every agent again (Chromium): 9 red, the reporter's
case among them
the view's scroll not kept as the card goes: 9 red in Chromium,
green in WebKit, which keeps it without
the × 44px wide on a phone taken out (Chromium): the five locales'
"named and inside the card", red
the head as the draft had it, no wrap and the title shrinking: de,
red
the focus moved without preventScroll (Chromium): green, 16 of 16;
no test here tells it apart
Library and siblings, Chromium and WebKit: 69 files, the Library's
own tests, the skills' and market's that share its page, gui-de,
gui-ja, gui-zh-tw and i18n-keys: all pass but two, red the same at
f8cd964a without this change: i18n-keys "a plugin's words are its
own", fixed on main since (#3897), and title-bar-tools (Chromium de,
WebKit all five locales: a locator.waitFor timeout)
TestCoreScriptBudget: ok (the Library is a plugin, outside the core);
on origin/main c752082e with this commit applied too (a scratch
worktree, not this tree)
On origin/main e9dd8e83 with this commit applied (a scratch
worktree, not this tree), Chromium and WebKit:
library-problems-hide, i18n-keys, library-items and
library-instr-busy, 66 of 66 pass
gofmt -l of every .go file: nothing. GOOS=linux, windows and darwin
go vet -tags nogui ./..., GOOS=windows go vet ./...: exit 0.
GOOS=linux and darwin go build -tags nogui ./..., GOOS=windows go
build ./...: exit 0. Untagged linux vet and build stop at pkg-config
(no libsoup-3.0 or gio-unix-2.0 here)
full suite, go test -tags nogui -count=1 -timeout 45m ./... (8m25s,
load 35 at its start, Bun 1.4.2): 68 packages ok, reds in 8, none
in internal/gui's library code:
internal/agent TestInstalledVersion, TestZedAppPath,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI and
TestOmpDetectedWithPiDir (#3141); TestCodexDriftReached (#3398);
the two Reasonix tests (#3641); TestWSLColdPlaceOpensNothing
(#3924, fixed on main since)
internal/davsync TestSyncTeraCloudStillSeesOtherWrites (#3420)
internal/edit TestWriteAtomicReadOnlyHardLink and internal/testenv
TestProgram, umask 077 (#3640)
internal/gateway TestPluginToldWhereTheAgentWorks (#3675)
internal/gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649)
internal/provider TestCodexAppServersOnHome (#3906), then "fatal
error: close of synctest channel from outside bubble" (#3632),
which ends the package's run
internal/tui TestTUIFetchesSubscriptionModels/agent (#3919)
Not tried: the × in a running magpie, in macOS's or Windows' window or
WebKitGTK; the page here is the test's, with magpie's own replies.
Batch run, at tree 104d75f0a (the twelve coffemon ports together, on
origin/main 7d022bdb6), mote, macOS, go1.26.8:
- go test -tags nogui -count=1 -timeout 45m on the packages the batch
changes (agent, autostart, daemon, gateway, library, proc, provider,
sessions, testenv, tui, gui): ok each.
- GUI, node --test with Playwright 1.62.0, Chromium and WebKit:
library-*.test.cjs and i18n-keys.test.cjs, 1044 of 1044 pass.
- gofmt -l: nothing. go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./... and go build ./...: ok at cdd7c8e46, the same
batch on origin/main 00098f12b one rebase before.
- The whole go test ./... at cdd7c8e46: 86 packages ok, one red,
internal/cli TestEveryRouteHasACommandOrIsNamed (GET
/api/context/reply has no command), red on main too (#5026).
- Linux (wsl-run, Ubuntu 24.04, at 339055896, the batch on f4c664a09):
proc, autostart, testenv, tui ok; agent: only TestGrokInstalled red
(#3548); #4033's proc.Look reds (Zed, Copilot, Qoder, Cursor, Omp)
pass.
- Windows (win-run, Windows 11, at 339055896): proc, autostart, testenv,
tui ok; library and agent red in the same tests as on origin/main
f4c664a09 (#4115, #1827, #4786; #5068, #5069, #5070 filed now).
- Rebased onto origin/main fb1f4856a (three commits, no file in
common with the batch) and run again at the pushed tree: gofmt -l
nothing, go build ./... and go vet ./... ok; go test -tags nogui
sessions, agent, autostart, tui, proc, testenv ok; i18n-keys and
library-* 1044 of 1044 pass.
- Not run before the push: the whole GUI suite (a run at cdd7c8e46 was
cut off at 1170 of ~1174 tests when mote rebooted; it runs again after
the tag and any red is filed).
ferock4669 asked on Discord whether magpie has a screen to price each
model, since one model can cost differently on each provider. It has:
each row in a provider's per-model list has a price box (input, output,
cache read, cache write, 1h cache write, long-context tier, $ / 1M
tokens), saved in settings' ModelPrices under pid/model. It wins over
the list price in Usage (usage.Pricer through provider.BasePriceIn) and
in a key's spend cap (usage.KeySpent through NewCoster). Nothing has to
be built; the button opening it said only "Names & levels", so nobody
finds a price there.
What changed:
- The button, its panel's heading and fold, and every note that sends
the user there say "Names, prices & levels" (zh 名称、价格与推理档位,
zh-TW 名稱、價格與推理檔位, ja 名前・価格・推論レベル, de "Namen,
Preise & Stufen"); the gateway's vision and compaction notes, the
provider package's text, the subsystem pages and the site's start
docs (en, zh, ja) follow.
- The button's tooltip says it sets what each model costs at this
provider; Usage's "estimated" tooltip says where a provider's own
price is set and that it counts over the list price. Both in en, zh,
zh-TW, ja and de.
- Not changed: the Codex model description text in internal/codexcat
(it goes to Codex, so a vendor sees it) and core_budget_test's
history comment.
- app.js: a comment above the price box is shortened so the core
script stays under its budget, not raised (app.js 116 bytes under
origin/main).
Run at the pushed head (rebased on origin/main 1af868a15), on mote:
- go test -run 'Budget|ModelPrice|ModelPref|Vision|Compaction'
./internal/gui ./internal/provider ./internal/gateway: ok.
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows:
ok (before the rebase, which touched no Go of this change).
- GUI, both engines, every language each file runs: the 149 files that
name the label or open a provider's editor (before the rebase): 1191
ok, 30 red in 7 files. Each of the 7 is red the same way alone at
origin/main without this change: provider-fetch-again (#5057),
provider-typed (#4673), provider-levels-scroll webkit (#4395),
provider-picks-stay (#4397), usage-agents-hide (#3414), usage-ledger
Requests (#5048), mobile-web (#3952, no .git in mote-run's copy).
name-suffix-remote "chromium de" (ERR_NAME_NOT_RESOLVED once) passed
alone at the head. After the rebase: model-price-edit, i18n-keys,
name-suffix-remote, usage-ledger, usage-agents-hide again: go tests above ok; model-price-edit, i18n-keys and
name-suffix-remote (all 10 cases) ok; usage-ledger Requests and
usage-agents-hide red as at origin/main 1af868a15.
Broken by hand: model-price-edit.test.cjs at origin/main's label is red
in all 4 cases (the button "Names, prices & levels" is not found).
Not tried: the whole GUI suite (another session's full suite was on
mote, WSL at load ~100 with 31 test runners); the real app.
zelong77 asked for two things once Devin 0.1.30's cache keep-alive
worked: its pings were invisible in magpie, and the interval and ping
count could only be edited in plugins.json. The owner decided pings are
shown as counted usage and the two numbers are edited in the GUI.
- host.js gives plugins input.magpie.usage(provider, call) and
input.magpie.account(provider). usage validates the call (kind
[a-z0-9_-]{1,40}, a model id, whole-number tokens from 0, status at
most 999, error clipped to 500) and sends an unasked "usage" event;
host.go hands it to plugin.OnUsage in the background.
- internal/usage/plugin_calls.go writes each one as a row of agent
magpie on the plugin's provider (provider.PluginID) and account
(provider.PluginAccountUser), with its kind. It is counted, priced
and in every total, not a probe. Kind cache_keepalive is in the
purpose catalog as "Cache keep-alive" (five languages), so the
request log names and filters it. The ping itself still goes straight
to Devin, never through the gateway, which would break the cache.
- /api/plugins reads every plugin's package options example, not only a
middleware's or request hook's, and the Installed row offers the same
Options JSON editor for a provider or agent plugin that suggests or
has options (not while it is off). Clear's confirm no longer calls
them a middleware's options.
- The Devin mover's min is 0.1.31, which reports each ping and gives
its two settings' defaults (285 s, 6) to the editor. npm has 0.1.31
(published 10:03Z); the plugins publish run is red only for
think-tags' known E404 (plugins#180).
- docs: provider-plugins.md (the API, the options editor),
gateway-sessions.md (the counted row beside probes).
Run at this tree (rebased on origin/main 85e37162e):
- mote (mote-run): go test -count=1 -timeout 45m ./internal/plugin
./internal/usage ./internal/gui ./internal/provider: plugin, usage,
provider ok; gui red only in TestMainWindowCorners/macOS_26_SDK, the
macOS 27 red already filed as #3949 (not this change's code).
- mote: GOOS=linux and GOOS=windows go vet of plugin, usage, provider ok;
gofmt -l clean.
- mote: plugin-provider-options.test.cjs (new, 5 languages, 980/420px,
Chromium + WebKit), plugin-gateway.test.cjs and i18n-keys.test.cjs:
28 of 28 pass.
- The whole GUI suite (make test-ui) on WSL magpie-desktop (mote was at
load ~100 with other sessions' suites, #4125), at the 8f804396f base:
cut off after 498 test entries, when the session's background jobs
were killed; 495 ok, 3 red, none on a page this change touches. Run
again alone at origin/main 85e37162e, the same files are red there
too: account-eye webkit (#4244), agent-expand-steady webkit 980px
(#2935), add-button zh's 3000ms waitForFunction (filed #4792). The
rest of the suite was not run.
Broken by hand (each red, then put back):
- host.go dropping the "usage" event: TestPluginReportsOwnUsage fails.
- plugins.go reading optionsExample for middleware/hooks only:
TestProviderPluginOptionsExample fails.
- purpose.go without the Cache keep-alive kind:
TestPluginKeepaliveIsCounted fails (purpose {}).
- plugins.js without ownOpts: plugin-provider-options.test.cjs times
out waiting for the Options button in every language.
Not tried: a real Devin account's keep-alive ping reported into a real
magpie (needs a live Devin conversation idle for 285 s); a plugin can
report a row for any provider id, as magpie.load can.
anewuser6937 (Discord, plugins#590) saw one model in WorkBuddy's editor
and took the plugin for broken. They had turned on "Free models only"
themselves, but its label and description read in English in the Chinese
window, and nothing by the models said the list was filtered.
A plugin option (auth.options, magpie's own field; OpenCode's AuthHook is
provider/loader/methods and never reads it) may now give `labels`,
`descriptions` and `confirms`, each keyed by the window's language
("zh", "zh-TW", "ja", "de"), beside the plain strings, as a page's
`titles` do. The host keeps only non-empty strings under language names
of 16 or less, 16 languages at most, each capped as the plain one is
(60/300/300). The editor shows the exact language, then its first part
(zh-TW reads zh), else the plain words, in the row, the hint, and the
confirm dialog and its title. `filtersModels: true` says the plugin's
model list leaves models out while the switch is on; while one is on, as
saved, the Models field says under the chips "Only some models are
listed: the plugin option “…” is on." (zh 只列出部分模型:插件选项「…」已开启。,
zh-TW, ja, de too). An older plugin shows what it showed before, and an
older magpie shows a new plugin's plain words with no note.
WorkBuddy 0.2.10 gives "Free models only" in all four languages with
filtersModels (magpie-community/plugins aec58ae, on npm: `npm view
@magpie-community/opencode-workbuddy-auth@0.2.10 --prefer-online` on mote
says 0.2.10, latest), and the mover's min is raised to it so every moved
user gets it. The CLI's `magpie plugin options` stays English, as the CLI is.
The core scripts would have gone 608 bytes over their budget; three of the
provider editor's comments in app.js are cut down instead, no raise
(1,532,865 of 1,533,105).
Run, on mote (mote-run), at this tree:
- node --test plugin-option-words.test.cjs (new): Chromium and WebKit,
1100 and 420 wide, en/zh/zh-TW/ja/de, switch on and off: each
language's label and description, zh-TW falling back to zh and ja/de to
the plain words for a zh-only option, the note exactly once under the
chips in a .hint inside the editor with no sideways scroll, none while
off, the confirm in the language. With app.js put back: 19 of 21 red
in Chromium (only "en off" passes, both widths).
- With plugin-options.test.cjs and i18n-keys.test.cjs, both engines:
68 pass, 0 fail.
- go test ./internal/plugin ./internal/provider ./internal/cli: ok.
TestPluginOptions with host.js put back: red (empty maps, FiltersModels
false). The real WorkBuddy 0.2.10 index.mjs loaded into this host
(a temporary test, not kept): plugin.Providers lists free_only for
workbuddy and workbuddy-ai with all four languages and filtersModels true.
- go test ./internal/gui: TestCoreScriptBudget ok after the cut. Red,
and red the same at origin/main ed5872d18 (run there too):
TestSettingsSaveKeepsWhatItDoesNotSend (#4514), TestMainWindowCorners
/macOS_26_SDK on macOS 27 (#3949); TestColdTurnsTaken red once in the
package run and passed at origin/main (#4510, the same 0.00s red).
- gofmt -l: clean. go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./...: ok.
- plugins: HOME=$(mktemp -d) bun test packages/workbuddy 303 pass 0
fail; the new freeonly test red 2 of 2 with index.mjs put back.
Not run: the whole GUI suite. mote and the WSL box were each running
another session's full GUI suite (hours left on both), and one runs per
machine; it runs on mote once that one ends. Not tried: a real WorkBuddy
account in the real app window. go test ./... was not run.
zhudabao8433 on Discord (#general, 11-01): PowerContext
(@magpie-community/gateway-powercontext) could be installed yesterday and
today reads 即将上线 again.
Cause: PowerContext was never pulled. It is in registry.json since
plugins 1e4c8a2 (10-29) and on the dist branch (0.2.0, every dist commit
since), and not on npm (E404), so magpie learns its version from the
dist branch's ~1.7MB index.json. Coming soon is drawn whenever a listing
has an npm answer with no version, and three paths gave one without
anything confirming the package is missing:
- builds before v0.1.2413 kept a dist read cut off at npmEach (6s) as
"not on npm" in plugin-npm.json (ferock, e0eb74987). After an update,
InfoCached (the listings) and Info ("what it said last") still served
that empty answer while a new ask couldn't read the branch;
- the page turned every listing /api/plugins/npm said nothing of
(unknown: npm or the branch not read in time) into { weekly: 0 }, i.e.
Coming soon, and never asked again;
- /api/plugins/market gave every listing &NPM{} even when Info had no
answer for it.
Fix:
- market.go: a cached "not on npm" over an hour old is unknown
(npmEntry.missingStale): left out of InfoCached and of Info's seed.
One said within the hour stands, as before.
- plugins.js: a listing npm said nothing of is marked unknown ({ u: 1 }), which
offers Install (installDist waits for the branch with its own read);
the page asks again up to 4 times, 15s apart, and the answer replaces
it. A listing npm answered with no version still reads Coming soon.
- plugins.go: pluginMarketState leaves NPM nil when Info has no answer.
Old data: an old "not on npm" is unknown once an hour old, for every
user, with nothing to do on their side.
Tests:
- TestStaleMissingIsUnknownWhileDistUnread (internal/plugin): an
hours-old "not on npm" with the dist branch 503 is in neither
InfoCached nor Info; a minute-old one stands; once the branch answers,
Info has 0.2.0.
- plugin-npm-unknown.test.cjs: PowerContext with no npm answer shows
Install (enabled), Qoder answered without a version shows Coming soon,
and after the 15s re-ask (page.clock) PowerContext shows v0.2.0. en,
zh, zh-TW, ja, de; 980 and 420px; Chromium and WebKit.
Run (mote, at this commit rebased on origin/main 36af588e2):
- gofmt -l clean; go vet darwin, GOOS=windows, GOOS=linux -tags nogui on
./internal/plugin/... ./internal/gui/...: ok.
- go test -count=1 -timeout 45m ./internal/plugin/...: ok.
./internal/gui/...: TestSettingsSaveKeepsWhatItDoesNotSend (#4514) and
TestMainWindowCorners/macOS_26_SDK (#3949) red, the same on an
origin/main 36af588e2 copy; TestCoreScriptBudget green (plugins.js is
1 byte under main's, a comment cut, no raise).
- node --test plugin-npm-unknown (22/22), plugin-market, i18n-keys: ok.
plugin-market webkit "the Plugins tab" was red once in the run after
the Go suite, its output lost; 3 of 3 green after, alone.
- Broken by hand: the Go test is red on origin/main's market.go (an
hours-old "not on npm" served; want it unknown); plugin-npm-unknown is
red (waits for Install) on origin/main's plugins.js.
- Earlier GUI batch (70 files: plugin*, market*, i18n*,
deprecation-notice, list-sort), before the rebase: 968/974; the reds
are plugin-move-unserved (#4410, #4392, red the same on main) and
plugin-github-filter chromium en 420px, batch only (#4679).
Not tried: a real slow network from China; zhudabao8433's version is not
known.
congee949 (#3492, Playwright on v0.1.1403's assets, a fixture of five
accounts and 16 models): with a subscription's editor open, the whole
dialog, its head and buttons too, went to opacity .5 and 2px down and
came back as its accounts' allowances came in, for an empty answer
({}) as well. The editor reads them (loginUsageOf) as it is drawn, and
the read's end draws it again (renderProviders). openModal took every
redraw of an open dialog for new content and played the soft refresh
it gives one (.dialog.swap: content-in, 220ms from opacity .5 and
translateY(2px)).
That redraw is now a quiet one: loginUsageOf's finally calls
renderProviders(true), renderProviders hands it to openModal, and
openModal adds no swap for it. The rest of the redraw is as before: the
body keeps its scroll, the focus stays on its control and the dialog
keeps its place (holdModal). Every other call of renderProviders and
openModal passes nothing and does as before. The issue's other way,
filling in only the allowances, would take a second way of drawing an
account's meters and its at-its-cap note beside the editor's own; this
keeps the one. app.js is 33 bytes bigger (1,309,476 of its 1,310,460;
the core's scripts 1,525,572 of 1,526,556), no budget raised. On
origin/main 1a804859 app.js is 1,309,717, so its budget has room, but
the core's scripts are 1,526,548, so coreScriptBudget needs 25 bytes
more for this.
Why the caller says so, and not openModal by comparing the old content
with the new: the allowances coming in and a change the reader makes
in the same editor (an account switched on or off, made first,
renamed) both draw the editor again under the same title, and the swap
is for the second. Of the redraws of an open dialog that no press
starts, only this one draws the same content again:
- a sign-in being followed (followSignIn) draws again only when its
state, link or code changed, which is new content;
- the list's poll while models are fetched (providersWhileFetching)
and the window coming back (load) skip an open editor;
- Check balance, a plugin page's buttons and README, a request's
context text and the update notes fill their dialog in place;
- What's new and the CLI's note open only on a closed dialog.
Every other redraw of an open dialog follows a press: a question and
back, a switch, a sign-in started, an account or a key changed.
account-eye.test.cjs now moves the pointer off the rows before it
checks that an account's eye is quiet with Hide accounts on. The click
on the list's ZCode row leaves the pointer at 180,204, and in the
360px editor the Personal account's name is drawn at y 204 to 221, so
its eye shows. On main the WebKit check passed only because the
allowances' redraw had just started its swap, still on its first
frame when the check ran: the dialog was 2px lower, with the name at
206 to 223. With that redraw quiet, the test as it was is red in
WebKit in en, zh, zh-TW and ja; de's name sits lower (227 to 244).
Not changed: a read that ends while an account is being moved waits
for the move to be saved (accountRenderPending) and is drawn with the
move's own redraw, which plays the swap as any change the reader
makes does. A read that ends while Codex's Sign out question is up
puts the editor back over the question, here as on main (#3943).
What was run (tree fb30c3f4, on origin/main f8cd964a, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, umask 077:
- editor-quota-quiet.test.cjs (new; Node 22.22.1, Playwright 1.58.2),
Chromium and WebKit, en and zh: 3 runs at load 22 to 29, 12 of 12
each
- the same test with f8cd964a's app.js and app.css: 8 of 12 red, both
answers in both engines and languages, each at opacity 0.5 as the
class changed. Chromium: "the dialog dimmed or moved as the
allowances came in: its opacity 0.5 content-in as its class changed,
0.5 at its lowest over 5 frames, its top from 16 to 18px". WebKit's
frames read it later in its 220ms: 0.95 to 0.99 at their lowest, its
top up to 16.2px. The 4 switch cases ok.
- broken by hand, each alone in a scratch worktree, both engines:
- loginUsageOf's finally calling renderProviders() again: the same
8 red
- renderProviders not handing it on (openModal(dialog)): the same 8
- openModal not reading it (if (!fresh)): the same 8
- openModal never swapping (if (false)): the 4 switch cases red,
"the dialog turned to the question without its swap:
[{"opacity":1,"anims":[]}]"
- .dialog.swap's animation set to none in app.css: the same 4
- account-eye.test.cjs, both engines: 2 runs, 30 of 30 each; with
f8cd964a's app.js and app.css, 30 of 30. As it is at f8cd964a, at
this tree: red in WebKit's en, zh, zh-TW and ja editor cases, the
eye at opacity 1 where 0 is wanted. With app.css showing the eye
always (opacity 1): 30 of 30 red, the editor's on that same check.
- the 214 GUI files that name the modal (#modal, .modal or
openModal), open a provider's editor, answer /api/login/usage or
name the swap, and window-mask: each alone, Chromium then WebKit,
four at a time at load 27 to 72: 411 of 428 runs ok. Each red file
was run again alone, here and on f8cd964a in turn: red on both with
the same cases, but for the last two, which come and go:
- account-arrange, Chromium: the key rename's page error (#3944)
- update-notes-ask (3 en cases) and whats-new, WebKit:
"ResizeObserver loop completed with undelivered notifications." as
a page error (#3942)
- plugin-github, WebKit, de 440: a click scrolls #view-plugins (55
to 121), the check #3218 is about
- vertex-editor, WebKit zh: "a Vertex AI row names its Google
credentials" and its pills and fields fitting a narrow window and
browser (a file #1671 names)
- copilot-signed-out-account (20 cases), revoked-signin-account (10)
and agent-failover (10), WebKit: innerText read with a newline at
its end ("Signed out\n") or start, in this box's WebKit (Playwright
1.58.2; the tests' README names 1.62.1)
- session-identity, both engines, en light and dark: "both badges
share one row below the account at 440"
- usage-ledger, both engines, en and zh: "newest live route needs no
return-to-live button"
- provider-remove, WebKit zh: "the Remove click didn't push the page
down"
- readable-focus, WebKit: "Tab's focused field stays in sight"
- modal-centred-late, WebKit, 820px and 560px: "grew over frames"
- mcp-oauth-app, Chromium, de 390: the box's Cancel sent no cancel.
Alone, red 2 of 6 runs here and 1 of 12 on f8cd964a: a Cancel
pressed while the sign-in is still opening (#3984)
- found-skill-pick-remove, WebKit, en 420: a click moved
#view-library by 1px; alone, ok 2 of 2 here and on f8cd964a
- go test -tags nogui -count=1 -timeout 45m ./... (tools/suite.sh, Bun
1.4.2): 69 packages ok and 7 red, none in what this changes: agent
TestCodexDriftReached (#3398), TestInstalledVersion,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestQoderSettingsFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath (#3141), the two Reasonix tests (#3641) and
TestWSLColdPlaceOpensNothing (#3924); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram (umask 077,
#3640); gateway TestPluginToldWhereTheAgentWorks (#3675); gui
TestGatewayHeldByAContainer and TestGatewayFixQuitsOnlyAMagpie
(#3649), TestCoreScriptBudget ok; provider TestCodexAppServersOnHome
(#3906), then "close of synctest channel from outside bubble"
(#3632); tui TestTUIFetchesSubscriptionModels/agent (#3919)
- On origin/main 1a804859 with this commit cherry-picked (a scratch
worktree, not this tree): editor-quota-quiet and account-eye, both
engines, 42 of 42
Not run: gofmt, vet and the builds; no Go file changes.
Not tried: the real app's webviews (WebKitGTK, WKWebView, WebView2)
and a real subscription's allowance read; the fixture is the
reporter's. Whether every flash in the Qoder recording the issue
started from was this one; the recording wasn't posted.
Review (yetone, at this commit on origin/main bb5e68cea, after
09e09e994 made the 25 bytes' room without raising coreScriptBudget):
- The test moved onto today's editor: since 18005c803 an account's
buttons, Sign out among them, sit under its ⋯ and the reporter's
editor fits 1015px whole, so the window is 760 high (251px to
scroll), the focus is on an account's ⋯, the swap case opens ⋯
before Sign out, and the focus is matched by its row, class and
words, not its index, which moves as each account's own refresh
(923812362) comes in above it. That redraw goes through loginUsageOf
too, so it is quiet as well.
- Linux (WSL magpie-desktop, Playwright 1.62.0), Chromium and WebKit,
en and zh: editor-quota-quiet 12 of 12; on main bb5e68cea with only
the test added, 8 red ("its opacity 0.5 content-in as its class
changed ... its top from 16 to 18px"), the 4 swap cases ok.
- Broken by hand, Linux: finally's renderProviders(true) back to
renderProviders(): 8 red; openModal not reading quiet: 8 red;
openModal never swapping: the 4 swap cases red.
- go test -tags nogui -run Budget ./internal/gui ok on macOS (mote).
- The 94 GUI files this can reach (those with logins, a provider row or
editor, the swap, the modal, i18n-keys, gui-de, gui-ja, gui-zh-tw and
sessions-row-narrow), both engines, Linux, 6 at a time: 1725 of 1745
ok. The red files were run again, 2 at a time, on main with only the
new test added and at this tree. The reds are the same on both:
- i18n-keys "Unmarked" (#4524)
- modal-centred-late in WebKit (#4116)
- plugin-move-unserved Try again (#4392, #4410)
- plugin-move "for good" in WebKit (#4471)
- routing-cline-route in WebKit (#4121)
- usage-ledger Requests (#4120)
- session-identity in WebKit, 3 of 3 on both (#4567, filed now)
account-arrange's WebKit red in the full run passed in both reruns.
Not verified: macOS. On mote at load 25, every browser launch timed
out (180s), so that run tested nothing. Also not tried: the real
Wails webviews, and a real allowance read.
At the pushed tree (rebased on origin/main 7e0fe83d4), Linux, both
engines: editor-quota-quiet and account-eye ok, i18n-keys red only on
#4524; go test -tags nogui -run Budget ./internal/gui ok on mote.
StringKe (#4532): removing the signed-in Claude account was refused with
SignedInError, while Codex's switched away first. ForgetLogin now does
the same for Claude Code: nextOnForget picks another account (on first,
then one whose sign-in holds), SwitchLogin signs Claude Code in to it,
and only then is this one forgotten. If that switch fails, nothing is
removed and the error says why.
nextOnForget leaves out accounts Claude Code or Codex can't be signed in
to (switchable: not a setup-token account, not a Codex account held in
another folder). Claude Code is never signed out: when the account is
the only one it can be signed in to, it is kept, with
SignedInError{Only} (GUI code signed_in_only), which says to add another
account first or sign out in Claude Code. The GUI gives the signed-in
Claude row a Remove when another account it can use exists, and no
Remove or Sign out otherwise. Claude Code's own credential is never
deleted; forgetClaudeDir removes only the forgotten account's own
folder and its folder's Keychain item, and claudeHolders' check of
other records holding the same token is unchanged.
Tests: TestForgetLiveClaudeSwitchesFirst, TestForgetOnlyClaudeIsKept
(replacing TestClaudeInUseStillRefused, which held the old refusal);
codex-signout.test.cjs gets three Claude cases (Remove with another;
only + setup-token: no Remove, reason in zh/zh-TW/ja/de; the
signed_in_only refusal in en/zh).
Run (mote, sandbox HOME through the test helpers):
- go test ./internal/provider ./internal/cli, vet and gofmt at the
stack head: in the next commit's body (one tree, same run).
- Broken by hand, each red: Claude not switched first
(TestForgetLiveClaudeSwitchesFirst), Only left false, a setup-token
account counted as another, nextOnForget unfiltered
(TestForgetOnlyClaudeIsKept).
- GUI on Linux (WSL magpie-desktop), Chromium and WebKit: codex-signout,
own-signin-remove, saved-signedout-remove, login-import, claude-signin,
account-alias and i18n-keys all pass but i18n-keys' "a plugin's words
are its own", red on main (#4524). On mote, codex-signout passed in
Chromium; its WebKit launches were killed with mote at load ~25 under
other sessions' suites (#4125), so WebKit's record is Linux's.
CLI in a sandbox HOME (WSL, file credentials): forget of the signed-in
account by its name switched Claude Code to the other (.claude.json then
says max@x.com); forget of the only one was refused with the message
above and left it signed in.
Not tried: a real Claude Code switch on removal with real accounts, or
in the CLI against a live ~/.claude (sandbox only).
nb5p on Discord (#feedback): "这个脱敏提醒被放到额度设置里了,害得我找半天没找到".
The Masking alert row sat in Settings › Usage. It now closes Insights ›
Masking, after the list of requests, in the page's own `.list.prefs` rows
(same Off/On segs, same ids #maskAlertRow/#maskAlertSegs, same i18n keys
and the same maskAlert setting). Nothing is left in Usage. The page draws
it from page.js after loadSettings, hides it while one request is open,
and gateway mode leaves it out as Settings did. Placed after the list so
the requests still start in the first screen (masking-records at 640px)
and the demo keeps its place between the card and the list.
Run at base 07a3312c5 with this change:
- mask-alert.test.cjs, Chromium (WSL magpie-desktop and mote) and WebKit
(WSL), en/zh/zh-TW/ja/de at 900 and 380px: all pass.
- WebKit (WSL): mask-alert, masking-records, masking-demo,
masking-demo-unblurred: 87 pass, 0 fail (tree differed from the pushed
one by a client.js comment reflow only). Earlier WebKit run: turn-done,
quota-reads, routing-masking, gateway-mode, builtins, sidebar pass.
- Chromium (WSL) at the final tree: i18n-keys, mask-alert, masking-records,
masking-demo, masking-demo-unblurred, turn-done, quota-reads,
routing-masking, gateway-mode, builtins, sidebar: 131 pass, 1 fail. The
fail is i18n-keys "a plugin's words are its own" on "Unmarked"
(plugins/routing/i18n.js), red on main, #4524.
- mote: go test -timeout 45m ./internal/gui/...: TestCoreScriptBudget and
the budgets pass (app.js only shrinks). Red: TestSettingsSaveKeepsWhat-
ItDoesNotSend (SearchAll, red on origin/main 93b31f5b7 too, #4514),
TestColdTurnsTaken (passes alone 3 of 3, #4510), and the AppKit window
tests killed at their 30s bar on mote over ssh (no window session).
Broken by hand: with internal/gui/assets back as on 07a3312c5 (row in
Settings › Usage, none on the page), mask-alert.test.cjs went 11 of 12
red in Chromium; the feature-off test is the one that still passes.
Not tried: the real app (desktop window) and WebKit on mote, whose
Playwright WebKit launch hangs there.
1234fsdc: the live Routing page's Accounts and keys said tried and
answered over the requests the page still keeps in memory, so on a busy
day the counts were a sliver of what Usage showed for the same accounts
and went down as old requests fell off. /api/trace/history (the read the
live page already makes every 15s) now carries `tallies`: per account or
key, today's tries, answers, fails by reason, models answered, the last
answer and the latest rest, read from routing/<today>.jsonl. The page
seeds the list with them and still takes the latest rest and readings
from the requests it keeps; a day looked at, or a purpose picked, counts
its own list as before. The note says "over today's requests" then.
Ported from ggbdpq's patch on the issue.
Changed from the patch:
- The patch parsed the whole day's file under history.mu on every look.
A busy day's file is hundreds of MB (#3383) and saveRoute takes the
same lock, so every 15s poll would stall the routes being written.
DayTallies now folds in only the whole lines added since the last
look (it keeps the offset, as History does); a line still being
written waits for its end. It starts again when the day changes, the
file shrank or was compressed, or the folder moved (another HOME).
- What it returns is a copy: the patch handed out the live tallies,
and the JSON writer read a Fails map the next fold wrote.
- The latest name and rest go by the try's time, so no sort per look.
- docs/subsystems/gui-shell.md says how the counts are made and that a
request done since the last look is counted at the next one.
Run on mote at this change on 394a92f0f. The pushed parent 5787d758a
adds usage, tray, redact and search changes and none of this change's
files:
- gofmt -l clean; go vet ./internal/gateway ./internal/gui for darwin,
windows, and linux -tags nogui.
- go test ./internal/gateway -race -run 'History|DayTallies': ok.
- go test ./internal/gui -count=1 -timeout 45m: red in 11 tests, all
red on main too. Ten are real-window AppKit tests killed at their
deadline on mote (the same ten at 03f3e1528, #4125).
TestSettingsSaveKeepsWhatItDoesNotSend is SearchAll on main (#4514).
TestLiveHistoryTalliesTheWholeDay passes. At the pushed head, -run
'Budget|Tallies': ok.
- GUI on WSL (wsl-run, Ubuntu 24.04, Playwright 1.62.0, Chromium and
WebKit, every language each file runs):
- The 229 test files that reach the Routing page, plus i18n-keys, at
this change on 576b5dcbc (--test-concurrency=4): 3498 tests, 101 red
in 31 files.
- Those 31 files on main 03f3e1528: 94 red. With this change: 99 red.
The same tests fail; which language or engine goes red changes from
run to run (#4121, #4471).
- Four of them run alone: 27 red on main, 21 with the change.
- At 394a92f0f, routing-day-tallies, i18n-keys, account-weight,
key-weight and routing-weight-chip passed. routing-columns' WebKit
rows were red, as on main (#4520). Its fixture has no tallies.
Broken by hand:
- DayTallies re-reading the whole file each look (reset always true):
TestDayTalliesFoldOnlyWhatWasAdded red, "a look after one route read
101 lines, want 1".
- handing out the live tallies, no copy: red, "a tally handed out
changed after: ... fails map[rate:3]".
Not tried: a real day's file of hundreds of MB. The first look after a
start still reads the whole day once under history.mu, as History's own
first read does. A real app beside a running gateway. Past days
are unchanged: still counted over their latest historyMax routes.
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
account-arrange's "account dragging uses the routing order in every mode"
was red alone in WebKit at 31728e29a: line 169's first Antigravity row
had no box. The app is right and the test was wrong. A signed-in
provider's editor is drawn at once and drawn again when its accounts'
allowances come in (loginUsageOf: "loads on its own and fills the rows
in when it's there"), and that redraw replaces every row. The test took
a row from the first draw; when /api/login/usage answered after it (a
busy machine, WebKit), the row it held was gone.
open() and the reload now wait for drawn(page): the first row (with a
load's minute, #4470), then the editing provider's allowance answer in
and not loading, so every action works on the rows that stay. The README
paragraph says so.
What was run (WSL magpie-desktop, Playwright 1.62.0):
- By hand: /api/login/usage answered 1.5s late, a marker set on the name
first selected. origin/main's file: red in Chromium and WebKit, "the
name selected is the one drawn last"; this file green in both.
- account-arrange.test.cjs, Chromium, at load ~230-258: green (the first
run, before the first row got its load's minute; WebKit then went red
at that 5s first wait, which this file now gives a minute).
- Both engines at load 205-245 (other sessions' suites): this file and
origin/main's own file both run past the test's 90s budget, Chromium
and WebKit alike (origin/main's Chromium once red at 14s instead). That
budget under load is #2200, the same on origin/main, not changed here.
Not tried: the whole GUI suite; mote (#4125) or Windows.
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).
max2020 on Discord signs in from a separate, fingerprint browser so the
vendor never sees their default one. Every waiting sign-in already shows
its link with Copy link (since 52c8e838d), but magpie still opened the
page in the default browser first.
Settings › Privacy › Sign-in pages › "Open sign-in pages in the browser",
On by default, so nothing changes unless it is turned off. Off
(settings.SignInLinkOnly) opens nothing: /api/signin and
/api/plugin-signin go through openSignIn, which skips the open and
answers linkOnly; a web tab skips window.open on linkOnly, after an
install step too; the box says the page wasn't opened and its button
reads Open, not Open again. `magpie accounts add` and a plugin's
command-line login print the link without opening it. A plugin whose own
CLI opens the page (Grok Build on macOS and Windows, opened) still does.
Callbacks, by flow: Claude Code's login, Codex (localhost:1455), ChatGPT
API, Gemini/Antigravity and localhost plugins come back to this machine,
so another browser on it finishes them, and the pasted final address
covers one whose proxy keeps it off loopback. Copilot, Grok and other
device-code flows work from any browser.
Run:
- TestSignInLinkOnlyOpensNothing (new; built-in and plugin sign-in, the
setting on and off) with TestPluginSignIn*, TestSettingsSave*,
TestCoreScriptBudget and TestI18n* on mote: ok. Budget holds with no
raise (app.js 1,313,244 of 1,315,316).
- signin-link-only.test.cjs (new; every language, Chromium and WebKit,
900 and 360px), signin-link and account-discovery on WSL: 42/42 and
the neighbours green.
- Full Go suite on WSL (go test -timeout 45m ./...): every package ok
except internal/agent's TestInstalledVersion, TestGrokInstalled,
TestOmpDetectedWithPiDir and TestZedAppPath, red the same on
origin/main 387e8572a there (#4033, #3548); root, internal/cli and
internal/gui need gtk4 there and were run with -tags nogui: ok.
- gofmt; go vet darwin, GOOS=linux -tags nogui, GOOS=windows: clean.
- The whole GUI suite (both engines) is still running on mote at push
time; reds it shows that aren't on file get issues.
Broken by hand: openSignIn ignoring the setting made the Go test red
("built-in: kept to its link, its page was opened 1 times"); dropping
startSignIn's linkOnly check made the GUI test red ("no page opened",
12 of 42).
Not tried: a real vendor sign-in from a fingerprint browser; Grok on
macOS/Windows still opens its own page; MCP server sign-ins unchanged.
zytszone on X runs one magpie's gateway for a whole department, whose
people can't be given the admin's app. Each now opens the gateway's /me
at the address they reach it at, types the gateway key they were given,
and sees that key's own name, limits and what is spent of them, its
usage over today, 7 and 30 days with its most used models, the models
it may use, and copy-ready setup for Claude Code (settings.json env),
Codex (config.toml provider, /v1, responses), any OpenAI-compatible
client and a curl test. The base URL is the address the page was
opened at, never 127.0.0.1; the key is a placeholder until "Put my key
in the setup" is ticked. Strings in en, zh, zh-TW, ja and de.
- GET /me (keypage.html, embedded) is the same bytes for everyone and
holds no data, so lanGuard serves exactly GET/HEAD /me (no escaped
path) to another machine without a key, after the allow list, the
rebinding check and the not-shared 403, which still apply. Its CSP
loads nothing from elsewhere, posts no form and forbids framing.
- GET /v1/magpie/me (keyInfo) answers access.Caller's own key only. No
key, a wrong one, one turned off and magpie's own token are 401
alike; ?key= is refused 400 so a key never sits in an address or a
log. It names no account, other key, provider or secret; its models
are /v1/models' for that key (keyAllowed), none for a read-only key.
The page sends the key as Authorization to its own origin with
credentials omitted and keeps it in sessionStorage only.
- Both are in readOnlyRoutes, /me in clientPrefixes (magpie web's page
port), and Gateway -> Gateway keys shows the page's address
(MAGPIE_PUBLIC_URL, else the LAN address offered) with a Copy, while
shared and with a key. Docs: gateway-routing.md, reference.md.
Run:
- mote: go build -tags nogui ./...; go vet -tags nogui gateway+gui;
GOOS=linux and GOOS=windows go vet -tags nogui ./internal/gateway;
go test -tags nogui -count=1 ./internal/gateway ./internal/gui: ok
(gateway 732s). gofmt -l clean. Rebased onto 18b63fe5f after that;
there: build, vet, and the KeyPage, read-only, client path, page
port, LAN guard, caller usage and core script budget tests ok.
- Key page Go tests, through the real lanGuard(Handler()) chain, from
the network and from loopback: the key sees its own name, usage, top
model, limits and allowed models and nothing of Bob, Bob's secret,
the upstream key or magpie's token; no key, wrong key, turned-off key
(Bearer and x-api-key), magpie's Token, ?key=, Origin null, an
evil.localhost page, a foreign origin with a good key and a rebound
Host all get nothing; the page opens without a key, not on POST,
/me/x or /%6De, and not while unshared; a read-only key gets no
models.
- GUI, key-page.test.cjs: Chromium on mote and WebKit on the Linux box
(magpie-desktop), 390px, all five languages, 24 of 24; i18n-keys ok.
The 46 Gateway/caller-key GUI files and i18n-keys on the Linux box,
both engines: 645 pass, 11 red at concurrency 4. Serially 6 stay red,
and the same tests are red on origin/main a0cb8b646 there:
api-key-theme "system", gateway-key-limit webkit en/zh,
connect-snippet-shell, gateway-key-models (#4120), phone-rows (#4218).
Broken by hand, each red then restored: lanGuard's /me exemption
removed (page 401); the KeyID check removed (no key/wrong/off/Token got
data); keyAllowed dropped (Alice saw plan/m2); the RawPath check dropped
(/%6De served); the ?key refusal dropped (200 with Alice's data).
Not tried: a real Claude Code or Codex pointed at a shared gateway with
the page's snippets; WebKit on macOS (every WebKit launch on mote hangs
right now, for every session, a bare launch included); the whole GUI
suite and a full go test ./... (one suite per machine; mote is running
other sessions' suites).
yetone (#3579): in the tray panel, the add sheet's More in Plugins, and
its search's "look for a plugin", asked the window for Plugins with no
more than the view's name (window/main?view=plugins). The window opened
on the tab of Plugins kept from before, Installed or Built-in, with
nothing looked for. 894ec960 made both open Discover in the window
itself; this is the panel's half.
The panel now asks for view=plugins&q=, with what its add sheet looked
for, empty when nothing was. More in Plugins sends the sheet's search,
lowercased, when it shows beside one (a search naming a subscription a
plugin serves, kiro say), and look for a plugin sends the search that
found nothing. mainView passes q on for Plugins whenever it is there,
empty too, since its being there is what says Discover; a q with a
control character (a newline, a tab) or over 100 code points goes on
empty. The window
opened on that address does what its own More in Plugins does
(pluginQuery): Discover, looking for q. start.js does it when the
window's first show() is done, so after show() has sent a window with a
plugin's update waiting to Installed, as the window's own More in
Plugins calls pluginQuery after show() too. It does it once: syncURL,
which show() calls, now takes q out of the address, so a reload, or the
window opened on Plugins again without a q, shows the tab kept, as
before. In the same window Plugins stays on Discover until another tab
is picked, as after the window's own More in Plugins. The GUI tests'
README describes the new half.
The deprecation note's Review in Plugins (several deprecated
subscriptions signed in) goes through openPlugins too, so from the
panel it now opens Discover as well, as it has in the window since
894ec960. openPlugins is the only sender of window/main?view=plugins.
plugins.js is not changed. app.js grows 94 bytes and start.js 182; with
the previous commit the core's scripts are 3 bytes under main's,
1,527,969 of 1,528,076, and app.js is 1,309,997 of 1,310,460.
Not changed: the window's own More in Plugins, and every other page the
panel opens the window on. mainView takes the view's own value
unchecked, so a q inside it skips mainFind (#3846); q goes no further
than Plugins' search field and its npm search, as typed there.
What was run (tree 7dce6444, on origin/main 56602426, go1.26.8,
linux/amd64, Linux 5.15), outside graftcp, the Go tests at umask 077:
- plugins-more-discover (Node 22.22.1, Playwright 1.58.2), its panel and
window halves new, in English and Chinese, 5 times in Chromium and 5
in WebKit: 3 of 3 pass each time. The panel, on a first use (where it
shows the add sheet), asks for ?view=plugins&q= from More in Plugins
and ?view=plugins&q=fake%20co%26x from "look for a plugin" after a
search for "fake co&x" found nothing. The window, at what mainView
makes of those (?view=plugins&q=fake+co%26x, and &q=) with Installed
the tab kept, shows Discover with the search in its field, and its
address keeps no q, so a reload shows Installed. With a plugin's
update waiting (the test holds start.js until the update's answer is
sent; WebKit has it by the first show(), Chromium not always, see the
breaks), Plugins opened without a q shows Installed, and the window
the panel opened shows Discover.
- TestMainView's new cases: Plugins with no q, an empty q, a word,
"fake co&x", Chinese with &view=settings in it, a newline, a tab, 100
and 101 characters, 100 and 101 Chinese characters, and Settings with
a q. TestMainURL's: "智谱 glm" reads back from the window's address as
it was sent. With TestCoreScriptBudget, -count=50: 150 of 150 pass.
- Broken by hand, each red in plugins-more-discover:
- the panel asking for view=plugins alone, as on main: 0 of 3 in
each engine, at the panel's asks (?view=plugins for
?view=plugins&q= and for ?view=plugins&q=fake%20co%26x);
- start.js not looking for q, as on main: 0 of 3 in each engine, the
window the panel opened on Installed (已安装 in Chinese) for
Discover;
- Discover asked as start.js loads, before show(): WebKit 0 of 3 in
each of 5 runs, en and zh at "the window the panel opened, an
update waiting", Installed for Discover; Chromium red there in 2
of the 5 (en in both, zh in one). 25e1d038's record, its window
half in plugins.js, had Chromium red in 4 runs of 4 (en every run,
zh in 2);
- q left in the address (syncURL's q.delete taken out): 0 of 3 in
each engine, the address after the window opened still
?view=plugins&q=fake+co%26x for ?view=plugins.
- Every GUI file that reaches Plugins, the panel's add sheet or the
window the panel opens (the same 53 as 25e1d038's record, by a grep
for view=plugins, window/main, more-plugins, pluginQuery, pluginTab,
lookFor, look for a plugin, show("plugins") and #view-plugins), and
i18n-keys, each alone in both engines: 94 of 108 runs green. The
other 14 are red at 56602426 too, alone, and none is in what this
changes. Playwright here is 1.58.2, older than the 1.62.1 the GUI
tests' README names, so some of these may be red with this
Chromium or WebKit only; those with no issue named have none yet:
- builtins, WebKit: Plugins › Built-in, the Observability switch's
click times out; the stuck Plugins head intercepts the pointer.
- i18n-keys, run twice (it needs no browser): "a plugin's words are
its own", for plugins/routing/i18n.js's "masking…" (#4053).
- mobile-web, both engines: its "desktop matches origin/main" cases
compare with BASE_REF, origin/main by default, as git has it at
the run, which had moved on from 56602426 (the Gateway page's
screenshots differ). A copy with BASE_REF set to 56602426 passes
15 of 15 in each engine.
- modal-centred-late, WebKit: 820px and 560px, the dialog reaches its
README's height with fewer than 3 frames between
([407,575,676,674,672] and [407,466,519,520,520,520]).
- plugin-card-update, WebKit: en and zh, the wait for the Update
button times out, in 4 runs of 4; at 56602426 the same in 3 runs
of 4, and zh alone in the other (#3079 has en).
- plugin-github, WebKit: de 440, a click moves #view-plugins from 73
to 135 (#3218 has the same check red in Chromium, by 1px).
- plugin-github-wait, Chromium: de 440, a press on Try again
moves #view-plugins by 2.
- plugin-release, WebKit: en and zh read the line with a trailing
newline ("Serves Zed\n").
- settings-lines-wrap, both engines: de 440px, a row's line is cut
short, Usage's in Chromium and General's in WebKit.
- title-bar-tools: in Chromium, de, the wait for the Plugins head
times out; in WebKit, all five languages, here and at 56602426:
zh, zh-TW, ja and en for page errors from the fetches a reload cut
off (/api/agents/cli, /api/agents/install, /api/update and
/api/whatsnew; #2740 has /api/providers'), and de for that same
wait.
- gofmt -l clean. go vet -tags nogui for linux, windows and darwin, go
vet for windows, go build -tags nogui for linux and darwin and go
build for windows: exit 0 each. go vet and go build without the tag
on linux: exit 1 (no libsoup-3.0 or gio-unix-2.0 here).
- go test -tags nogui -count=1 -timeout 45m ./... (Bun 1.4.2, log
kept; 8m41s, load 40 at its start): 72 packages ok, and 12 tests red
in 5 packages, none of them this commit's tests or what they cover
(internal/gui's are its gateway tests): agent TestInstalledVersion,
TestCursorFolderFromTheEditorIsNotTheCLI,
TestCopilotFolderFromAnIDEPluginIsNotTheCLI, TestOmpDetectedWithPiDir
and TestZedAppPath (#3141);
TestReasonixCLIRequiresSupportedNativeVersion and
TestReasonixCLIRecoversAfterProbeTimeout (#3641); edit
TestWriteAtomicReadOnlyHardLink and testenv TestProgram
(umask 077, #3640); gateway TestPluginToldWhereTheAgentWorks
(the /tmp/.git of #3675); gui TestGatewayHeldByAContainer and
TestGatewayFixQuitsOnlyAMagpie (#3649).
The rest is what was run for 25e1d038, at tree ffc1adb1 on origin/main
02cbdf5b, the same Go code, tests and README (its window half was in
plugins.js, where this one's is in start.js; not this tree):
- Broken by hand in the Go, each red in the Go tests named:
- mainView passing no q: TestMainURL, and TestMainView's every
Plugins case with a q;
- mainView passing any q: TestMainView's newline, tab, 101
characters and 101 Chinese characters;
- mainFind as ^.{0,100}$: TestMainView's tab;
- mainFind counting bytes too: TestMainView's 100 Chinese characters.
Not tried: the real app's tray panel and window, on macOS, Windows or
Linux.
Landed by yetone in a batch of Coffemon's patches from the issues.
What was run, go1.26.8, on origin/main cc81ad4ea, then again at
70a0c387c (gofmt, the three vets, the changed tests, umask 077):
- mote (macOS 27): gofmt -l clean; go vet, GOOS=linux go vet -tags
nogui and GOOS=windows go vet ./...: ok. edit and testenv at umask
077; agent, provider, library and gateway with an empty .git above
TMPDIR; davsync, imagemcp, plugin, library, edit, testenv whole; the
changed tests in agent, provider, gateway and gui; the timing tests
-count=10 (gateway, davsync, imagemcp) and -count=5 (agent): all ok.
TestCoreScriptBudget ok: core 1,536,751 of 1,537,034, app.js
1,312,975 of 1,315,316, no budget raised.
- Red on the old code: on origin/main, TestWriteAtomicReadOnlyHardLink
at umask 077 and two Reasonix tests under an empty .git; on Linux
(wsl-run) TestProgram at umask 077 with the old program.go. With
each fix's code taken back to main's, the Gemini imageConfig tests,
TestPluginToldWhereTheAgentWorks, TestSkillRepoTraced,
TestTaggedHooksAlone, TestMainURL/TestMainView and update-auto,
plugin-github-hooks, plugins-more-discover, plugin-namesake were
red. Broken by hand: claudeKeyed always true (both
OwnEndpointNeverAsked tests red), claudeAsk a no-op
(TestClaudeFirstWriteAsksTheProxy red), GitAt taking any .git folder
(the three TestGitOnDisk tests red).
- GUI: 123 files (plugins*, update-*, panel/tray/start/context, i18n,
gui-zh-tw/ja/de and every file that evals app.js parts) in WebKit on
Linux (wsl-run). 11 files had reds (click-scroll, panel-fold,
plugin-card-update, plugin-github, plugin-move*, segs-glide,
tray-totals, update-*), and run again side by side they fail the
same on origin/main d80d75f30 (79 pass, 26 fail here; 78 and 27
there). They are click-scroll guards ("the click must not scroll
the page"), varying by language from run to run (#4385).
copilot-ghe's route-after-close red is #1949, seen on main 244d80e23
too. In Chromium on mote, Chromium segfaulted partway through files
(#4125): context-map, context-scroll-end and context-tune fail the
same on origin/main 0911a65e7, so the batch's own files
(plugin-namesake, update-auto, plugins-more-discover,
plugin-github-hooks) ran in Chromium on Linux: 62 of 62.
- Full suite (go test -tags nogui -count=1 -timeout 45m ./..., mote)
at 472a0608f (on 70a0c387c): every package ok but internal/gateway,
whose five reds were #4362's (Antigravity turned-away and
TestCodexSpentGrokFailingIsTold), fixed on main in d80d75f30. After
the rebase on 244d80e23 the five pass, and gofmt, the three vets
and the targeted runs above were run again: ok. In Linux the
sign-in, copilot, plugin-github*, plugins-more-discover,
plugin-namesake, plugin-gateway, update-auto, quota-refresh-order
and i18n files ran in both engines: 475 pass, 4 fail (copilot-ghe
#1949, plugin-github's click scroll, both red on main too).
- Rebased again on c7171a256, over its budget fix e94bf7a08: gofmt, vet of
gui, gateway, provider and plugin, TestCoreScriptBudget (core
1,536,265 of 1,536,586 with the batch's last commit, statusTErr and settingsErr), the Gemini,
GitOnDisk and plugin tests, and in Linux both engines i18n-keys,
update-mirror, plugin-namesake, plugins-more-discover,
plugin-github-hooks and update-auto (138 of 138): ok.
Not tried: the whole GUI suite (mote's WebKit wouldn't launch and its
Chromium segfaulted, #4125); macOS WebKit; the real app's window.
The owner, 10-29: 展开模型的时候,这块部分会整体向上移动几个像素. A view is a flex column (since 50db5ccbe), and every box in it has flex-shrink 1. Once the open models list made the Gateway page taller than its window, flex shrank each box of a set height down to its content. Connect's head went from 26px to 21.4, the models' head to its search field's 24, and the models' label moved up 5.6px. Every view's direct children now have `:where(.view) > * { flex-shrink: 0 }`, so the view scrolls instead. :where() weighs nothing, so a box that sets its own flex (.view-room's none) keeps it. This reaches every page: any head or box of a set height on a page taller than its window was squeezed the same way.
gateway-models-open-steady.test.cjs opens the folded models with 30 of them, in Chromium and WebKit, en and zh, in the window and in magpie web. Connect's head, the models' head and its label keep their top and height, every head on the page keeps its height, and folded again the label is back.
Run on mote (node 22, Playwright 1.62.0):
- gateway-models-open-steady: 8 of 8. With app.css put back to origin/main's, 8 of 8 red ("opening took connect from 26px to 21.390625px").
- A measuring script on origin/main c46829e0b, before the fix: connect 26 → 21.4, models 26 → 24, label 286 → 280.4. After the fix: all unchanged, in both engines, window and web.
Rebased onto f5806ed21 and pushed without the rest: the whole GUI suite
(this change reaches every page) was still running on mote at 936bc67ee,
the same tree before the rebase. Its result goes on an issue when it ends,
with every new red against #4119's run.
Must2333 on X: "我还希望能即时的知道发生了替换,但不是通过随时监控网关的方式".
They want to know when magpie masks something without watching the
gateway or the 脱敏 page.
Settings › Usage has a new row, "Masking alert" (zh 脱敏提醒), after the
task done alert. Off/On, off by default. When on, a value masked for the
first time gives a system notification through the same notifier as the
other alerts. It says only how many new values, each kind and its count,
and the agents that sent them (two named, "+N" for more). It never says
the value, any piece of it, or the Head hint the 脱敏 page keeps. A click
opens the 脱敏 page on the latest record (clickView, "masking&key=<key>").
Why off by default: every other notification in this group is off until
turned on; turning one on asks macOS for notification permission; for
most users a notice each time masking works is noise, since masking's
expected behaviour is quiet protection. It is one row, in the group that
already holds the alerts, hidden while masking is switched off
(data-feature="redact") and in gateway mode.
Staying quiet:
- First time only: maskrec.Fresh says which values a record has that no
record before it had. A conversation sends its whole history each turn,
so a value is masked again every turn after its first. The index is by
placeholder (HMAC-stable across restarts), filled from memory and from
the days kept on disk, so a restart doesn't make a history new again.
The days are read off the lock, since Hold takes it on the request's
way. Values sent as written (Action "warn") are left out.
- A burst is one notification: records gather for 3s (maskGather).
- At most one every minute (maskGap); what comes in between is said
together after it. At most 5000 records wait.
- With the setting off, nothing is kept.
The gateway tells the app through gateway.OnMasked, after maskrec.Hold,
with Snips and Back taken out; nil under `magpie serve`.
Strings: en, zh, zh-TW, ja, de, in i18n.js (the row) and in
mask_alert.go (the notification's title and kind names, the 脱敏 page's
own words for the kinds). docs/subsystems/gateway-routing.md has the
bullet. The core script budget isn't raised: main's 10-29 budget leaves
room for the row's 287 bytes.
Tests, each broken by hand and seen red:
- TestMaskAlertFirstTimeOnly: masks through redact.Mask as the gateway
does; the history masked again says nothing, a new email in turn 4 is
said alone. Red when flush counts r.Values instead of the fresh ones.
- TestMaskAlertNeverSaysTheValue: no 4-character piece of the key, email
or phone, and no Head, in any of the 5 languages. Red with the Head
added to the kind's name.
- TestMaskAlertCoalesces: a burst of 5 from 3 agents is one wait of
maskGather and one notification ("+1"); two more 10s later wait
maskGap-10s and are said as one; off keeps nothing. Red without the
waiting check (5 waits) and without the maskGap wait ("waits 3s want
50s").
- TestFreshOnlyTheFirstTime, TestFreshHeldWhileReading (maskrec). Red
with loadFirst skipping the disk read (the history new after a
restart), and with the index broken (both).
- TestDismissedAlertOpensNothing covers the mask notice's click.
- mask-alert.test.cjs: every language at 900 and 380px, both engines:
the row after the task done alert, Off at first, On saves maskAlert,
another save keeps it, Off saves false, no click moves the page, no
left border, gone with masking switched off. Red with maskAlert taken
out of prefsKeep, and with data-feature taken off the row.
Run:
- This change on main 2b6ff0fbf (its parent here, c93d9e0c0, changes
only usage's Codex effort cache after it), on mote: go test ./internal/gui
./internal/maskrec ./internal/settings ./internal/gateway; GUI files
mask-alert, turn-done, gateway-mode, settings-search, i18n-keys (68
pass, 0 fail); gofmt -l; go vet for darwin, GOOS=windows, and
GOOS=linux -tags nogui, all ok. internal/gui's one red is
TestMainWindowCorners/macOS_26_SDK, #3949, red on main too.
- At the same change on main ddf31ca30, 23 commits back: the full Go
suite on mote, -timeout 45m. Every package ok but internal/gui: the
budget (since fixed by the rebase), TestMainWindowCorners (#3949), and
nine real-window AppKit tests killed at their deadlines while mote's
pboard was down (#4125). Run again once pboard was back, all nine
passed.
- The whole GUI suite, both engines, every language, on the Windows box
(mote's GUI run was cut short by the pboard crash, #4125): 14235
tests, 13951 pass, 284 fail in 65 files. The same files at ddf31ca30:
291 fail. All 22 mask-alert tests pass there. The 8 files red only at
this change were run again at both commits and each goes red and
green on its own, mostly WebKit (#4124).
- The real app on mote, in a sandbox HOME, with a fake upstream: what
the upstream got was placeholders only ({{API_KEY_…}}, {{EMAIL_…}},
{{PHONE_…}}). Three turns in a minute became one notification 3s after
the first, and a new email in a later turn the next one, exactly 60.0s
after.
Not tried:
- The banner itself: macOS refused notification permission to the
sandbox bundle (ad hoc signed and dev signed, "didGrant: 0 hasError:
1"), and no one was at mote's screen to allow it. What was seen is the
send, in the app's log.
- Windows and Linux notifications, and a click from a real banner.
- Values masked again after the 30 days the records are kept are said
again. Blocked requests and warn-only values aren't notified. No
session id is shown.
The owner (10-28, screenshot of Usage › Sessions with 13 agents in a strip
across the page): "这应该是个 Combo Box". The agent filter was a segmented
strip, one segment per agent in range, that scrolled sideways in itself
once it ran past the window (#929). It is now the same sessPick button
as 全部模型 and 全部文件夹, with the same searchable menu: "All agents",
then every agent with sessions or usage in the range, the most used
first, each with its tokens under the other two filters. One agent in
range still leaves it hidden; the pick still resets to All when its agent
leaves the range. The request ledger's agent filter was already this menu.
#sessAgent left the CSS rules for scrolling strips; the strip's own test
(sess-agent-strip, #929's sideways scroll) is gone with the strip, and
usage-sessions-agents-fit now checks the menu: no sideways scroll at 860
and 560 wide, the three filters on one line inside the window, the
menu's order, search, a pick shown on the button and kept when the page
is drawn again, All clearing it, one agent hidden. sessions-empty-range
and sessions-overview-once pick their agent from the menu.
Run on mote (node 22, Playwright 1.62.0):
- usage-sessions-agents-fit, sessions-empty-range, sessions-overview-once:
24 of 24, Chromium and WebKit, every language they cover.
- usage-sessions-agents-fit against origin/main's page.js, client.js and
app.css: red in all four (BUTTON.sess-pick expected, a div of segments).
- go test -tags nogui -run Budget ./internal/gui: ok.
- 122 other GUI files that touch Usage, sess-pick or i18n, concurrency 3,
beside another session's full GUI suite (load 36-75): 1944 pass, 24
fail in gateway-caller-keys, gateway-key-cycle, i18n-keys,
mcp-oauth-app, usage-ledger and web-page. Rerun alone at concurrency
1 on this tree and on origin/main (d4f1d6480, then c4972b36e after the
rebase): the same reds on both. gateway-key-cycle is #4072,
gateway-caller-keys #3797, usage-ledger's "newest live route" #4078,
web-page's #gateway .dot #4079. i18n-keys' "masking…" was fixed on
main in 174250b27. mcp-oauth-app passes alone on both.
- At this tree, rebased onto 6ecc65b6d (the pushed tree):
usage-sessions-agents-fit, sessions-empty-range,
sessions-overview-once, i18n-keys and click-scroll 50 of 50, and
go test -tags nogui -run Budget ./internal/gui ok.
Not run: the whole GUI suite (another session's was running on mote).
Browser access draws twice per renderSettings: once at once, and once
more when its /api/web-page answer comes. When that answer landed
between the release and the click segs' pointerup sets off, the option
the release found was gone by the click and nothing was sent, which
segs-press-redraw's sweep saw on Network's web-page list. The click now
goes to the control's newest self (same segsWho, same option), found
again whether or not a draw came since; dragged off or gone still picks
nothing.
From Coffemon's patch on #3922 (JoeyWu-tech, fix/3922-segs-newest,
c1b5575af and e8c831736): the test's new redrawn-twice case, reveal()
waiting for each wheel's scroll to land, and the README entry, taken as
is. The app.js change is his, shorter: his kept b when still there and
looked up the newest self otherwise (+298 bytes); the lookup finds b
itself when b is still there, so it is used alone (+129 bytes). Main's
core had 18 bytes of room left when this landed; TestCoreScriptBudget
is green and no budget is raised.
What was run (mote, Playwright 1.62.0, Chromium and WebKit, en, zh, ja,
de, 900 and 440px):
- The new test on main's app.js: 22 of 42 red, both engines.
- With this change: 42 of 42.
- Broken by hand (the newest self's option taken as [0], not p.i):
Chromium 17 red.
- go test -run TestCoreScriptBudget ./internal/gui: ok.
Not tried: the real app's webview, or a loaded Mac.
Co-authored-by: JoeyWu-tech <joey110551567@gmail.com>
碳碳双键 (ysm119, Discord): a list scrolled to its top or foot by the
wheel went on to scroll the page, "in many places". d74ef5e04 (v0.1.1839)
already marks every box that scrolls and overflows between the pointer and
its .view (`holds`, app.js) and gives it overscroll-behavior-y: contain by
one rule in app.css. This makes that a guard and closes the one engine gap:
- inner-scroll-contain.test.cjs gains a test that reads every rule in every
stylesheet under assets (app.css, plugins.css, context.css, omarchy.css
and plugins/*/*.css; any not linked is added) that sets overflow or
overflow-y to auto/scroll, builds a box from each selector (each compound
an element; body classes put on body; @media rules tried at a size they
hold for), fills it past its height, points at it, and requires
overscroll-behavior-y: contain. 39 scrollers hold; .view is the one left
to chain. A failure names the file and selector.
- compat.js: Safari 15 (macOS 12's WebKit until Safari is updated, #220)
has no overscroll-behavior, so there a wheel over a .holds box already at
its end in the wheel's direction is cancelled. Only where
CSS.supports("overscroll-behavior-y", "contain") is false; Chromium,
Safari 16+ and WebKitGTK 2.52.6 (probed on the Linux VM: true) never
register it. There the Mac's bounce at the box's end is lost.
- app.js: the six "notice or ok" status lines share saidOk, to make room
for compat.js under TestCoreScriptBudget (core 1,526,424 of 1,526,556 at the rebased head);
no budget raised.
Run (mote, Playwright 1.62, Chromium and WebKit):
- inner-scroll-contain: the new guard and the Safari-15 test 4/4 alone;
in the scroll batch 7/8, the one red a Chromium launch timeout (180s).
- Scroll batch (inner-scroll-contain, routing-scroll-end, click-scroll,
view-wheel-*, menu-scroll, context-scroll-end, provider-levels-scroll,
heatmap-scrollbar, ledger-hscroll*, old-webkit, view-trackpad-coast):
195/209. Reds: 9 browser-launch timeouts (mote at load 30-60 with
~40 other test runners), old-webkit's ":has() in app.css" from
c490165b1 on main (#4020, not this change), view-trackpad-coast
chromium en ("the coast must ask for more than the 250ms": 6),
view-wheel-unheard webkit 1 subtest, menu-scroll settings de 420px
click timeout. None of those paths registers anything new in a modern
engine; a rerun was cut off when mote dropped off the network.
- Agent batch (agent-connect/-disconnect/-leave-magpie/-notice-lang/
-app-restart/-connect-no-models/-connect-all-hidden/-tweak-fold,
claude-effort, tier-effort, subagent-effort, fast-ultra,
hidden-agent-cleared, show-unset-agent, claude-signin, i18n-keys,
panel-routing, routing-sessions, view-middle-autoscroll): every red
but two a browser-launch timeout; agent-connect-all-hidden webkit zh
and ja a click timeout under the same load.
- go test -tags nogui -count=1 ./internal/gui ok (budgets); gofmt -l clean.
Broken by hand: the :where(.holds) rule and the compat.js fallback
removed: the guard red for 25 scrollers per engine, the Safari-15 test
red in both. Fallback alone removed: only the Safari-15 test red. A rule
`.sess-new-list { max-height: 300px; overflow-y: auto; overscroll-behavior:
auto }` added to sessions.css: the guard red naming it, in both engines.
Not run: the full GUI suite; the agent batch's and scroll batch's
launch-timeout reds again (mote went down mid-rerun).
Not tried: a real Safari 15.0 WKWebView (the engine's lack is faked),
WebKitGTK and WebView2 in the app, a trackpad's momentum in the app,
plugin pages in their sandboxed frames (a plugin's own scroller is
the plugin's).
A provider's key name was edited in an input whose Escape drew the
editor again and whose blur saved. Chromium blurs the input as that
redraw takes it out, so Escape after typing saved the typed name, and
Enter, or Enter twice before the save answered, sent keys/rename twice.
The account rename already guarded this with a once flag. Both now go
through one helper, renameIn: Enter saves a changed name, Escape keeps
it, and whichever comes first ends it, so the blur that follows does
nothing. Taking the two copies into one makes app.js 93 bytes smaller;
no budget is raised.
From Coffemon's patch on #3944 (JoeyWu-tech, joey/fix/3944): the test
key-rename-once.test.cjs and its README entry taken as is. The app.js
change differs: the patch copied the account rename's guard into the
key rename; this shares it instead, to keep core script inside its
budget.
What was run (mote, Playwright 1.62.0, Chromium and WebKit, en and zh):
- origin/main f02d92c7b: key-rename-once 8 of 16 red (Chromium's
Escape after typing, Enter, Enter twice; WebKit's Enter twice).
- With this change: key-rename-once 16 of 16, account-arrange 2/2,
account-alias 20/20, api-key-usage 4/4, api-key-theme 6/6,
key-copy 8/8.
- Broken by hand (the once guard in renameIn taken out):
key-rename-once 8 of 16 red; account-alias hung and was stopped.
- TestCoreScriptBudget green.
Not reproduced on mote: the issue's replaceChildren page error on an
unchanged Escape and account-arrange's red; both passed on main here.
Not tried: the real desktop app's webview.
Co-authored-by: JoeyWu-tech <joey110551567@gmail.com>
09c0a844 (#3160) gave the quota loader and quotaRefresh three names
quota-refresh-order's VM sandbox didn't have: the top-level quotasKept,
the page's mode, and a refresh button's classList.toggle. Every case
threw "quotasKept is not defined" before testing any order, 9 of 9
red since. The sandbox now has them, and the nine cases are unchanged.
Seven cases are added for orders the loader's comments promise that
hand edits to app.js passed unseen: the tray panel keeping the merged
reading it shows (magpie.panelQuotas), Refresh now behind a read on
its way, reads serialized, a newer card's marker kept after a read
lands, a renamed reply's replaced cards kept out, a background read
taking the asked one, and one card's reply leaving another's marker.
The README lists the file among the VM tests.
Patch from Coffemon (JoeyWu-tech) on #3679, 5ac2b9f7 (five commits,
squashed here into one), reviewed line by line and taken as is; the
README hunk applied to today's README.
What was run (mote, Node 22, no browser needed; at origin/main
f02d92c7b):
- origin/main: quota-refresh-order 0 of 9, each ReferenceError.
- This change: quota-refresh-order, usage-stale-answer and
providers-fetching-retry 38 of 38.
- Broken by hand through MAGPIE_APP_JS: keepRefreshedQuotas skipped
(the reply taken as it came): 10 of 16 red (1, 2, 6, 8, 9, 10, 13 to
16); the panel saving the reply from before the merge: case 10 red,
the other 15 green.
Not run: the Go checks (no Go file), the browser suite (no browser
test reads this file).
Co-authored-by: JoeyWu-tech <joey110551567@gmail.com>
碳碳双键 (ysm119, Discord): wheeling the Usage page's request list to its
top or bottom carried on into the whole page, and "this happens in many
places". It is the class: every box that scrolls inside a scrolling page.
app.js marks such a box `.holds` while it overflows vertically, on
pointerover and on each wheel (the box under the pointer and its
ancestors up to the .view), and app.css gives `:where(.holds)`
overscroll-behavior-y: contain, which keeps the Mac's bounce on the box.
Not one CSS rule for every overflow:auto box: in Chromium `contain` holds
the wheel even in a box that doesn't overflow, or is overflow:hidden, or
only scrolls sideways, so short lists and the heatmap's and ledger's
sideways scrollers would have stopped the page. The .view itself is never
marked. :where() weighs nothing, so .mchips in a short window
(@media max-height 640px, #833) still passes the wheel on.
The new test, inner-scroll-contain.test.cjs, wheels the Routing page's
requests list past each end (en and zh, 900x560 and 1300x600, under
"By session" / 未提供会话标识), and ten kinds of inner box, and asserts
the page's scrollTop didn't move. A short list, heat-scroll, led-wrap and
snip must still pass the wheel to the page. routing-scroll-end now wheels
over the page's gutter: at its view centre the pointer sat on the
requests' list, which now keeps the wheel at its end (600 of 1066).
Run (mote, Playwright 1.62, Chromium and WebKit):
- inner-scroll-contain 40/40.
- 17 files: inner-scroll-contain, click-scroll, routing-scroll-end,
routing-sessions, view-wheel-after-click/-after-redraw/-unheard,
heatmap-scrollbar, ledger-hscroll, ledger-hscroll-foot,
context-scroll-end, menu-scroll, provider-levels-scroll, panel-usage,
panel-routing, qoder-cn-tile, agent-disconnect: 268/287. Reds were
routing-scroll-end (this change, fixed above) and panel-usage webkit zh
(#3311, commented). Rerun of routing-scroll-end, panel-usage and
inner-scroll-contain: 66/66.
- go test -tags nogui ./internal/gui ok (TestCoreScriptBudget passes at the rebased head:
core under 1,526,556, app.js under 1,310,460; no budget raised).
Broken by hand: the old app.js and app.css: the requests list and every
held box red in both engines (mchips aside, it had contain already).
Only the CSS rule removed: red, "the page didn't move" x8 plus each held
box x2. Only the overflow check removed: a short rt-reqs red (Chromium),
led-wrap and snip red in both engines.
Not run: full GUI suite (mote was busy with another session's suite).
Not tried: WebKitGTK on Linux, WebView2 on Windows, a real Mac's
trackpad rubber band and momentum in the app, older macOS WKWebView,
touch; zh-TW/ja/de (no strings changed).
Disable full-window modal backdrop filtering in Windows desktop windows
and tray panels, retaining the dimming veil. Browser pages and other
platforms keep their existing blur through the existing win/web markers.
Document the platform behavior in the GUI shell reference.
On an affected 0.1.1805 installation with WebView2 155.0.4283.62 and Intel
UHD D3D11, disabling the filter made provider tests visibly responsive.
The reporter confirmed the improvement. Scripted scrolling measured
roughly 67 to 165 rAF callbacks/s, not presented FPS.
Verification: modal-backdrop.test.cjs fails on the original CSS in both
Windows desktop Chromium cases (blur instead of none), with the other
10 cases passing. After the fix, 45 targeted tests pass across
Chromium and WebKit: modal-backdrop, dialog-backdrop-drag,
segment-press-dialog, gui-zh-tw, gui-ja and gui-de. node --check and
git diff --check pass. The full GUI suite, Go vet/build/test matrix and
native macOS/Linux tests were not run.
mimi on Discord (#feedback): "同一个网站,添加多个key时,余额会重复展示" -
a site's keys 1-A031-Pro, 2-S009-Plus and 3-S010-Team-2 each showed the
account's $8.39 and its own curve.
KeyBalances still reads, keeps and charts every key on its own. What
changed is what the Usage page draws:
- balanceRead says whether the reading is the account's (balanceAccountWide),
going by the source, not the vendor's name:
- account-wide: a balance token (new-api /api/user/self, sub2api
/api/v1/user/profile, AiHubMix), a known host's account query
(DeepSeek, Moonshot, OpenRouter credits, SiliconFlow, StepFun, ...),
and sub2api /v1/usage when its mode is "unrestricted" (wallet or the
group's subscription, per sub2api's gateway_handler.go Usage);
- per key: AiHubMix's /dashboard/billing/remain, new-api's
/api/usage/token, sub2api in quota_limited mode, any other Balance
URL the user named.
- Two such keys of one provider with the same amount are one account only
when their balances moved together: the same latest change (from and
to), first read within balanceHistGap. Two accounts with the same
amount stay apart until one is spent from; keys whose amounts differ
are never one. SharedBalance (the first key's name) says so in
/api/usage/quotas, magpie quota --json and /v1/magpie/quotas.
- Refreshing a shared card reads every key it stands for (sharesAskedCard),
so it stays one card. The history is read outside the cache's lock.
- The Usage page draws them as one row, one balance, one curve, with
"+2 keys" beside the key and the keys on hover; the head's sum counts
the account once. The code is in plugins/usage/page.js, so app.js is 9
bytes smaller than before; no budget raised.
Run (mote-run, at the pre-rebase base d50f84c9f):
- go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./...: ok. gofmt -l: clean.
- go test -tags nogui -timeout 45m ./...: every package ok except
internal/gui's TestCoreScriptBudget (app.js 676 bytes over; fixed by
moving the code into the Usage plugin, then ok) and internal/update's
TestRelaunchOpenTriedAgain (TempDir cleanup under load, #3881; 3 of 3 ok
alone).
- go test -race on internal/provider's balance tests: ok.
- GUI, both engines, en and zh: 122 files (balance-*, usage-*, quota-*,
tray-*, panel-*, gui-ja/de/zh-tw, i18n-keys, key-balance-card,
routing-wallet-balance, ...): 1637 pass, 42 fail in 6 files, all the
same at base a05b37353 run alone and all filed (#3679 quota-refresh-
order, #3404 quota-count-wrap, #3414 usage-agents-hide, #3415
usage-fold, #3104 usage-ledger, #3897 i18n-keys "Runs as"). After the
move into the plugin, 17 of those files again: only #3897's red.
Broken by hand, each red:
- SharedBalance never set (the old code): "after they moved together".
- Shared on equal amount alone: "first reading" ("other" merged).
- Every query taken as account-wide: quota'd and new-api token keys
merged.
- No sharesAskedCard: the shared card's refresh didn't read sk-plus.
- keyCards without sharedBalances: usage-shared-balance red in all four
(chromium/webkit x en/zh).
Not tried: a real sub2api or new-api account (fake server with sub2api's
literal replies). A key's balance is shown once only after the account's
next change is seen by every key, not on the first read. Multi-currency
balances (DeepSeek "$ · ¥") and balances with parts are never shared.
Norcleeh on Discord: magpie opened in a browser had no font setting in
Settings > General, while the app does. The rows were hidden on purpose:
/api/fonts answered 404 to a browser page and boot sent it no choice,
since the list is the fonts of the computer magpie runs on and the tab
can be on another one.
Now a browser tab (magpie web, or the app's page in a browser) has both
rows wherever magpie can read its fonts (boot's fonts; a nogui build
can't, and keeps them hidden). Its list is /api/fonts less the families
this browser doesn't draw (fonts.js here(): text in the family measures
apart from monospace's or serif's on a canvas), so another computer's
fonts and Safari's user-installed ones aren't offered. The choice is the
browser's own, in localStorage (magpie.fonts), applied by fonts.js
before the first paint; it neither changes nor takes the app's
settings.UIFont/CodeFont, and a settings save from a browser still
keeps the app's.
Run on mote at this tree (on b90e81da1), also GOOS=linux (nogui) and
GOOS=windows go vet ./internal/gui/..., go build, gofmt -l:
- fonts.test.cjs, font-cascade.test.cjs, win-fonts.test.cjs, i18n-keys
and the 42 drag/arrange GUI files, Chromium and WebKit, en and zh (and
ja/de where a file has them). The reds are 32 subtests in 4 files
that fail the same on origin/main b90e81da1 run alone (and one from
a stray path in the run command): i18n-keys "a
plugin's words are its own" (#3897), routing-rule-drag webkit de
(#3789), segs-press-redraw webkit (#3922), usage-agents-hide (#3414).
- go test -tags nogui ./internal/gui (TestCoreScriptBudget and
TestFontSettingsAPIAndBoot included) ok; go test ./internal/gui -run
Font (cgo, CoreText) ok.
- Real use: magpie built on mote, `magpie web` in a sandbox HOME, real
/api/fonts (204 families). Chromium offered 204, WebKit 179; Georgia
picked in each, the body drew it and kept it across a reload, and no
settings.json was written.
Broken by hand: fontsOn = !web (rows hidden as before): the new test
red in all four engine/language cases; here() returning the list
unfiltered: red with "a family this browser doesn't draw isn't
offered".
Not tried: a browser on a different computer from magpie (the canvas
filter is what covers it, checked with a family the test machine
lacks), Firefox, the Windows and Linux apps' pages in a browser.
Budget: not raised; the previous commit's 1,097 bytes cover it.
jiakun_zhao on X ran `magpie web` in a terminal beside the desktop app,
to manage it through a Cloudflare tunnel. Settings › Network and sharing ›
Browser access now has the app serve the same page itself: Off, This
computer (127.0.0.1, for a tunnel or SSH forward) or Local network.
Access is magpie web's, unchanged: the key in the link is traded for the
cookie (webGuard), the allow list holds, and the gateway's client routes
on the page's port need a gateway key (onePort). A rebound Host and
Origin: null get no cookie. There is no way to serve it without the key.
The key and choice live in web-page.json (0600) beside settings.json, so
a sync never carries them. GET/POST /api/web-page are the app windows'
alone: a browser on the page can't read the key or turn the page off. A
busy port (magpie web, the magpie before an update) is tried every 4s;
`magpie web` on the same port opens the app's link instead.
Run at d43b7c40d (this change on ef155a5ca), then rebased onto the four
newer main commits, which touch gateway, usage, proc and library only:
- gofmt -l internal/gui internal/cli: nothing. go vet, GOOS=linux go vet
-tags nogui and GOOS=windows go vet of internal/gui and internal/cli:
clean. go build: ok.
- go test -timeout 45m ./internal/gui/ ./internal/cli/: ok (180s, 70s).
- GUI, alone: browser-access.test.cjs and model-test-one.test.cjs pass in
both engines; i18n-keys 23 of 24, its red is #3897 ("Runs as" from
7f827b3b0), not this change. agent-stale-copies.test.cjs 80 of 80 at
8d343a811 (this change before the rebase).
- Full GUI suite at 8d343a811: cut short. The disk filled (708MB free):
browsers failed to launch with ENOSPC in agent-stale-copies, which then
passed 80 of 80 alone, and node ended with exit 7 before the rest of
the files ran. There is no full GUI record for this change.
Not tried: a real Cloudflare tunnel to the page, and Local network from
another machine.
shiqi_40904 on Discord (#general, 10-27): with Codex as the provider,
switching a routing group of their own on made models go missing from an
agent's model list, and switching it off brought them back.
The cause is in the agent model list dialog. A section with more than 8
models starts folded when the list has more than one section, so that
several providers can be told apart. The Routing groups section counted as
one. With only Codex serving there is one section and Codex's 10 models
show. Switch a group on and there are two sections, so Codex's 10 start
folded under a "Codex 10 / 10" header with no rows. Nothing was missing on
the server side: /api/state's options and counts for every agent only
gained the group (27 -> 28 in the sandbox).
Now only provider sections count toward folding. With two or more
providers the long ones still start folded, as before
(agent-models.test.cjs is unchanged and passes).
Run (worktree at origin/main 5e3dd1d52 + this commit):
- Sandbox: HOME under scratchpad, magpie built from this tree with -tags
dev, Codex upstream faked on 127.0.0.1:3713, app on 3711/3712, found
groups off, a second provider off, Codex connected. Before: group mygpt
off -> Codex 10 rows; on -> Routing groups 1 row, Codex 0 rows. After:
on -> Routing groups 1 row (MyGPT), Codex 10 rows; off -> Codex 10 rows.
With the second provider back on, both providers still start folded.
- New agent-models-group-on.test.cjs, chromium + webkit, en + zh, group
off and on: 8/8 pass. Broken by hand (old rule put back): the 4
"group on" cases fail on "every Codex model is on the screen".
- GUI files that reach the dialog (agent-connect-all-hidden,
agent-models*, agent-model-groups, codex-model-order,
desktop-model-menu, cursor-local-models, grip-inset,
popover-mac-chrome, zcode-models) + i18n-keys: 286/286 pass.
- go test -timeout 45m ./internal/gui/: all ok except
TestMainWindowCorners. Both of its SDK subtests were killed at the 40s
deadline at load ~175 (#1936, #2645). Run alone afterwards: ok in 43.7s.
No Go files changed, so gofmt and vet have nothing new to check.
Not tried: the whole GUI suite (~900 files, at load 150-175; the change
reads no new API and adds no strings). Codex's own /model inside the
Codex app, which this list doesn't decide. Nor the reporter's separate
note that GPT 6.1 sol was missing in Codex itself.
Reported-by: shiqi_40904 (Discord)
AIMetaPhD on X: Settings › About read "0.1.1618 下载失败 · https://github.com/
…/magpie-windows-amd64.exe: Get \"https://release-assets.githubusercontent.com/
…?sig=…&jwt=…\": EOF". The text was hundreds of characters of signature and
token, and it said nothing about what to do.
/api/update now carries network: true when update.Network(err) is true
(the previous commit's NetError, after its own tries). The Version row
then says "{v}'s download broke off, a network problem. Click Check to
try again, or download it from the release page", translated into zh,
zh-TW, ja and de. The raw error stays in the tooltip. The release page
button the row already had stays. A mirror's failure keeps its own text
(#893). begin() clears the flag along with the mirror.
Run: GUI tests (Playwright 1.62.0, Chromium and WebKit):
update-*.test.cjs (16 files, the new update-network among them) and
i18n-keys, 266 of 266 pass. go test ./internal/gui (ok, 224s); go
test ./internal/update ./internal/cli (ok, previous commit); gofmt -l
clean; go vet; GOOS=windows go vet; GOOS=linux go vet -tags nogui
(./internal/gui ./internal/update).
After rebasing both commits onto origin/main b5d17b26e (its i18n.js
changed), these were run again at this tree: go test ./internal/update
(ok), go test ./internal/gui -run 'Budget|I18n|Update|Asset' (ok), and
i18n-keys, update-network and update-mirror in both engines (36 of 36).
Broken by hand: with the row's new line turned off, update-network
is red, 11 of 11 in Chromium. TestUpdateMirrorSetting now also checks
that a mirror's 404 isn't flagged as a network failure.
Not tried: the real app on Windows, or a real dropped connection, and
the gui-*.test.cjs language suites beyond i18n-keys.
A user on X asked for Langfuse built in. magpie could already export to
Langfuse over OTLP, but Settings › Observability had the user type the
endpoint .../api/public/otel and a percent-encoded
Authorization=Basic%20<base64(pk:sk)> header by hand.
Settings › Observability now has a Collector row: OTLP or Langfuse.
With Langfuse, the user picks the host (Cloud EU, Cloud US, or
Self-hosted with an address, which also covers Langfuse's JP and HIPAA
regions) and fills in the public and secret keys. Once both keys are
there, magpie saves:
- the endpoint <host>/api/public/otel;
- Authorization: Basic base64(pk:sk), in otel.headers as before, so the
secret is stored where it was and a backup without keys leaves it out;
- on a first setup, also x-langfuse-ingestion-version: 4, metrics off and
export on. langfuse.com/docs/opentelemetry/get-started (read 10-26)
gives the same header for every region and for self-hosted, and says
that without it OTLP data can arrive up to 10 minutes late.
A Langfuse endpoint set up by hand opens in this view with its keys
decoded into the fields. Opening it saves nothing. Changing a key or the
host keeps the user's other headers, their metrics and export choices,
and an ingestion header they set or left out. Switching from another
collector leaves that collector's headers behind and does not send them
to Langfuse.
The Observability page moved from app.js into the otel plugin
(assets/plugins/otel/page.js, with i18n.js for its words, in Client),
because app.js had 13 bytes of budget left. The app.js and core budgets
are lowered to what is left (1,321,319 and 1,537,645; app.js is
1,321,313 after rebasing on 2620dc319). "Collector" and "Secret key" go
in the core i18n.js because other files use the same words.
Docs: reference.md's Langfuse paragraph (with the env form for magpie
serve) and the en/zh/ja privacy pages.
Run (macOS):
- go test ./... -timeout 45m -count=1 at the pre-rebase head (parent
e5dd86965): every package ok but internal/provider, which crashed in
TestUnreadLoginsWriteErrorsKeepCredentials with "close of synctest
channel from outside bubble" in filememo.Forget. That is #3632, red on
main since 091153bf7.
- The whole GUI suite (make test-ui, concurrency 4, Chromium and WebKit)
at the same head: 16 reds. Each red file was run alone here and at the
parent e5dd86965. The same reds came back at both: menu-input-scroll
(#3402), old-webkit (#3403) and plugin-card-update's webkit Update
(#3079). The parent also failed fonts' webkit run. page-width,
api-key-theme, panel-arrange, panel-balance-order, own-requests,
library-mcp-health-wsl and plugin-list-error passed alone here: 137
passes, 7 fails, all of them the three filed above.
- At the pushed head (rebased on origin/main c87a0179b): the budget
tests; otel, otel-langfuse, i18n-keys, settings-sections, builtins,
idle-ticks and page-width, both engines, 58 pass; go test
./internal/otlp ./plugins/otel ./internal/gui, all ok except
TestRestartHandsTheGatewayOver (#3451). That test failed 1 of 8 here
and 1 of 8 on origin/main dce7fe609.
- Before the rebase: otel-langfuse (new: first setup, US, self-hosted,
hand setup kept, another collector's headers dropped, 5 languages at
1100/520/360px) with otel, i18n-keys, settings-sections, builtins,
readable-focus, segs-press-redraw, ux-safety, dialog-backdrop-drag and
mono-icon-redraw: 113 pass. go vet for darwin, linux and windows on the
touched packages; gofmt -l clean.
- Broken by hand: with every save treated as a first setup and the old
collector's headers carried over, otel-langfuse's "set up by hand keeps
its values" and "another collector's headers" went red.
- New TestOTelLangfuseSetup: settings saved as the page writes them reach
a fake collector at /api/public/otel/v1/traces with the Basic header and
ingestion version 4, and nothing on /v1/metrics.
- Real app: a -tags dev build in a sandbox HOME (ports 3461/3462). I
drove its real Settings page with Playwright: Langfuse, then
Self-hosted http://127.0.0.1:3463, then both keys. settings.json got the
endpoint, Basic header, version 4 and enabled. A gateway request then
reached a local fake collector at /api/public/otel/v1/traces with
Authorization Basic base64(pk-lf-real-ui:sk-lf-real-ui) and
x-langfuse-ingestion-version 4.
Not tried: a real Langfuse Cloud or self-hosted project (no account here),
so Langfuse accepting the spans and how they show in its UI aren't checked.
The TUI and magpie serve still have no Langfuse shortcut; serve takes the
env form in reference.md. The Linux app (WebKitGTK) and Windows weren't
tried; the change is form fields and segs, with no motion.