f2eb56c6bbde1300dddc402861b59cd4e45e0215
562
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
380032cda1 |
providers: Send requests unmasked is the user's switch at any address, with a caution while on for one not local (AcMilan)
AcMilan (Discord) runs a vLLM at http://llm.corp.lan:8000, and the editor never offered "Send requests unmasked": the switch showed only for a localhost, *.local or private-IP address. Asked, he said the choice should be the user's for each provider. provider.SkipsRedaction is now: Unredacted, no signed-in account, not another magpie, and at least one address. Nothing is looked up on the request path. The editor shows the row for every provider but an account or remote magpie. While it is ticked, an amber caution under it names an address not on this computer or the local network (awayHost). A name of the user's own DNS is asked about, only while ticked, through POST /api/local-hosts (provider.LocalHost -> netproxy.LocalName: every address loopback, private or link-local, 400ms lookup, kept 1 minute). That answer only words the caution. CLI help and `provider show` say the same. The 'away' i18n line is in zh, zh-TW, ja and de. To stay inside the core script budget, a few nearby editor comments were cut down (no raise). Run (logs in the worktree's logs/): - Full Go suite on mote at base |
||
|
|
995f84a0f9 |
codex: how early an expiring reset is used is a setting
A Codex reset card that would run out unused was spent 30 minutes before it expired, a fixed resetExpiryLead. Now the lead is codexResetLead in settings.json (minutes, 15 to 1440). Unset, out of range or unreadable reads as 30m, never 0, and magpie never writes it unless the user does. - settings: CodexResetLead and Settings.ResetLead(); the menu's values are 15m, 30m (default), 1h, 2h, 3h, 6h, 12h, 24h. - provider: the spend (expiringResetSpent) and routing (Allowance.Restarts, through nextResetLook) read the same resetLead(), so they still agree (#717, #718). The "near" look cadence follows it: lead + 30m, at least 1h, so a look lands inside a long lead. - GUI: Settings > Usage, under the Codex auto-use rows, a row "Codex: how early before one expires" with an app menu (no <select>), and the sub text says spending earlier loses what the windows have left. The four "before it expires" strings say the chosen lead. POST /api/settings/codex-reset-lead; the general save keeps the field. en, zh, zh-TW, ja, de. - CLI: magpie quota auto-reset lead [30m|3h|<minutes>|default]. - app.js budget: the auto-use rows moved out to lazy autoresetown.js (painted in the same draw once loaded), so app.js and the core script stay under their budgets with no raise. The button sizes to its widest label (a grid of every label), so picking one never rewraps the row. Run (all on mote through mote-run): - go vet: darwin, GOOS=linux -tags nogui, GOOS=windows; nogui build. - go test -tags nogui -timeout 45m ./... at 3955adccf (this change before the paint and sizer fixes, which touch only GUI assets): 81 ok. go test ./internal/gui at this head: ok. - GUI, Chromium: codex-reset-lead, codex-auto-reset, codex-auto-reset-settings, segs-press-redraw, i18n-keys: 62/62. WebKit: every case of those files failed at browserType.launch (180s timeout) before a page loaded, both runs; mote's browser launches hang under #4125 (load ~26), so WebKit is not run. - Rebased onto |
||
|
|
7d4a631480 |
tray: pick which of a subscription's windows the menu bar shows (StrikingRaw on X)
Claude Pro's menu bar card drew its 5-hour and 7-day windows as two
small stacked numbers, and the user wanted one of them alone. Settings ›
Usage › Menu bar windows (under Allowances in the menu bar) lists a pill
per ticked subscription with two or more windows ("Claude Code · All
windows"), opening the app's menu: All windows, then each window. The
choice is settings.TrayWindows, by provider id (every account of it, the
in-use "|*" card too) and by window kind from the span ("5h", "1d", "7d",
"month", "15m", "name:<name>" when the span is unknown), so a vendor
reordering windows changes nothing. Unset shows every window as before;
a pick whose windows are all gone shows every window again, never an
empty card. Only the bar's rows and the Linux label are filtered; the
tooltip still says every window. One row draws at mpRowFont's 11pt
single-row size. Hidden on Windows (its tray shows no text). Per
computer through KeepOwn. The GUI learns kinds from trayKind on
/api/usage/quotas (withTrayKinds; model and aside windows get none). The
row's code is a lazily imported traywindows.js, so the core script
budget is not raised (app.js +4 lines for the call and the prefs keep).
Run:
- mote (macOS): go test -run 'TrayWindow|TrayUsage|WithTrayKinds|
CoreScriptBudget|AppScript|TrayImage' ./internal/gui/ ok;
./internal/settings/ ok; davsync TestSync ok. TestTrayImageOneWindow
draws through AppKit: Claude's card one line ("42%"), both windows two;
the PNGs were looked at.
- mote: gofmt -l empty; go vet ./..., GOOS=linux go vet -tags nogui
./..., GOOS=windows go vet ./... ok; go build, GOOS=linux go build
-tags nogui, GOOS=windows go build ok.
- magpie-desktop (Linux VM), --test-concurrency=1, BROWSER=chromium and
webkit: tray-windows (en, zh, zh-TW, ja, de; picking All; hidden on
Windows / single-window / no cards; 360px narrow), i18n-keys,
old-webkit, tray-usages, tray-logos, tray-cost, quota-pace: 43/43 each.
After rebasing on
|
||
|
|
e0ad48641e |
panel: the tray panel opens the window from its header icon only, no second "Open magpie" in its foot
yogurt36 on Discord: the menu bar panel had a button to open the window
at the top (the header's open-as-a-window icon, #open) and another at
the bottom (the foot's "Open magpie", #openMain). Both called
api("window/main"). The foot's button is gone; the foot keeps what is
its own: Profiles, the status line and Quit. The four "Open magpie"
strings it alone used are out of i18n.js (the tray menu's own
"Open magpie" lives in traymenu.go and is unchanged).
Test: internal/gui/tests/panel-open-once.test.cjs, both engines, all five
languages: the header's icon opens the window, the foot's buttons are
Profiles and Quit only, Quit worded in each language.
Run:
- panel-open-once, Chromium on mote: 5/5 ok; i18n-keys on mote: 4/4 ok.
- panel-open-once, WebKit on Linux (wsl-run, magpie-desktop): 5/5 ok.
WebKit does not launch on mote right now (several pw_run.sh from other
sessions hung for hours; a bare webkit.launch() times out at 80s).
- Broken by hand: the test against the old assets (origin/main
|
||
|
|
9e73f69af4 |
providers: rate windows bill a provider's hours at its own rate (#2463)
A provider can have up to 8 rate windows: days, a span that may cross midnight (on this computer's clock), and a rate. Inside a window a call costs the base price times the rate. The base is the user's model price as set, or the list price times PriceRate with the vendor's own peak (DeepSeek, Command Code, OpenCode Go) already in it. The author gave this order as the spec: a 0.8 window on a shared DeepSeek key takes 0.8 off the peak price at peak. The editor's hint says not to set the official peak hours again as a window, in every language. Each call is priced at its own time on the Usage page and its CSV, in the Requests tab's rows, and against a gateway key's cost limit. The Sessions page, group templates and the model list written into an agent's own config use the base price. /v1/models prices at now. Ported from YangHonghang's 2c9d459ff (rate-windows-2463-v2). The Go pricing, its tests and the translations are theirs. Changed here: - No budget raised. Their commit raised appScriptBudget and coreScriptBudget; core_budget_test.go is main's again. The editor's window rows, time menus, validation and hint moved to ratewindows.js, which app.js imports when the field is drawn (as signsheets.js is). The sliding-thumb and modalDepth comments were cut down to make room. The core is 1,535,528 of 1,536,586 and app.js 1,312,242 of 1,315,316. Until the script has loaded, a save leaves rateWindows out, and the server keeps the saved ones. - Their unrelated TestAssetsHaveNoConflictMarkers is dropped (one commit, one goal). - The row badge shows only for a provider with windows. Before, every provider with a price rate alone got a new ×badge. Its title is shorter, and so are its translations. - AgentPricer (agent model files: Pi, omp, OpenCode cost) uses the base price. Nothing rewrites those files when a window opens or closes, so a price taken at Sync stayed on outside the window. - internal/budget gets a TestMain through testenv, so the new test runs in a home of its own. - old-webkit's list of lazily loaded scripts names ratewindows.js. - The draft keeps each window as a shallow copy, and a day chip replaces its days array, so the saved provider is never changed. - The GUI test waits for the lazy script's hint, not a fixed 300ms. It also checks the peak note in each language. Run first on |
||
|
|
46fb0c1b93 |
gui: the tray panel switches a Claude Code's or Codex's account (shuizhuyu on X)
shuizhuyu asked for a global shortcut to switch accounts. v0.1.2143's Quick panel shortcut opens the tray panel, but the panel had no account switch: switchable() returned null there, because the panel reads no provider list (a fresh /api/providers reads every sign-in, seconds after a start, #1519). Now a Claude Code or Codex not connected has an "account" line in its opened panel row (switchEntry, the window's Switch accounts only menu). The line is drawn from the list kept from the last read (GET /api/providers?last=1, no keychain read; panelAccounts in app.js), read fresh only when nothing is kept. Opening the menu does one fresh read and opens on what it says. Manage accounts… and a lapsed pick open the window's Providers (window/main?view=providers). The provider and login actions now keep their answer as the last list (keepProviders), so a switch made in the window or the panel is in the next kept read. app.js stays under its budget with no raise: my own comments and two older ones (the usage accounts note, the sidebar note) were cut down. Run: - GUI, Windows box (xiaomi-gpu, win-run), Chromium + WebKit: 31 files (panel-*, panel-switch-accounts, agent-switch-accounts, switch-only, claude-switch-only, keep-login, agent-failover, agent-row-disclose, getting-started, click-scroll, i18n-keys, gui-zh-tw, gui-ja, gui-de): 503 of 503 pass. Not the whole GUI suite. - mote: no browser could launch there (pboard down, #4125; every WebKit and later Chromium launch timed out at 180s), so the GUI runs there were cut short. agent-panel-name-width, red there in both engines, is red on origin/main too (#4304, #4203), and this change doesn't draw the closed rows it measures. - mote: go vet ./internal/gui; go test -run 'TestKeptProvidersFollowActions| TestLastKnownProviders|Budget|TestProvider' ./internal/gui ok (includes TestCoreScriptBudget). gofmt -l clean. GOOS=windows go vet ./... ok. GOOS=linux go vet ./... fails only in wails/v3 pkg/application (cgo off when cross-compiling), the same on origin/main |
||
|
|
1bbaded622 |
usage: an agent's call to magpie's own MCP tools is a row of Requests
ferock (Discord) asked to see calls to magpie's MCP tools, such as magpie-image's generate_image, generate_video and generation_result, in Routing > Requests. Each tools/call to magpie's own MCP servers (image, vision, web search, tools and the Library hub) is now a row of the request log. The row has Source and Kind "mcp", the tool as its model, the server as its host, how long the call took, and its error if it failed. The provider and model it shows are those of the model requests the call made, collected through the request's context in appendUsage. generation_result names the model of the job it answers. The stdio Magpie Image server reports each call it answered to the gateway as "magpie/toolCalled". That report carries the tool, ms, model and error, never the prompt. The arguments are never stored at all, so there is nothing to mask. The rows go down the probe lane: they are listed, but no total, host list, budget or key limit counts them. The model requests a call made are rows of their own. In the GUI the row reuses the Requests list. It gets a muted "MCP" badge with a tooltip, the server beside the provider, and a Succeeded/Failed status. The Purpose filter gains "MCP tool" in every language. There is no new page, no <select> and no left border. The core scripts went over their budget with the new purpose. genpurposes now writes purposes.js as compact JSON, which makes the core 448 bytes smaller than main in all, and coreScriptBudget is lowered to the new total, 1,538,975. No room is added. Run on mote, at the rebased head: - gofmt -l: clean. go vet -tags nogui ./... with GOOS darwin, linux and windows: ok. - go test -tags nogui -timeout 45m: ./internal/usage, ./internal/imagemcp, ./internal/usageapi and ./internal/gui ok. internal/budget has no test files. ./internal/gateway (805s): every test ok except five Antigravity and Codex/Grok tests. They fail the same on a clean origin/main |
||
|
|
f2c6831a31 |
gateway: a read-only gateway key reads quotas and usage and uses nothing (Steven on Discord)
Steven's ESP32 desk display polls magpie (Docker, on his LAN) every 15s on GET /v1/magpie/quotas and /v1/magpie/usage and never sends a model request. Only a key held to nothing was told the usage summary, so the key kept in the device's flash had to be one that could spend every account. A gateway key can now be read-only (access.Key.ReadOnly): - `magpie gateway-key add <name> --read-only`, `magpie gateway-key access <id> [read-only|full]` (`gateway-key --help` lists it; `list` has an ACCESS column), and "Make read-only" / "Give full access" in the key's menu in Gateway -> Gateway keys, with a "Read only" tag on its row. - readOnlyGuard (internal/gateway/readonly.go), after callerGuard and before withCaller/keyLimited, judges the pattern ServeMux.Handler routes the request to. A read-only key is answered GET /, /v1, the quotas, their history and cards, the usage summary and its requests, its limit and the concurrency. Every other route is refused with 403 gateway_key_read_only: every model route, count_tokens, the Responses WebSocket's upgrade, every MCP server, Codex's and Gemini's backends, /v1/models and the Ollama routes, the catch-all, the trace and route, debug profiles, and every write (usage ingest, quotas refresh). It is default deny, so a route added later is refused until it is classified. - The key is held to nothing else, so heldKey leaves it alone: it reads the usage summary and every account's quotas, as a key held to nothing does. None of those routes holds a key's secret. - The sharing key can't be made read-only, since magpie gives it to its own agents (LANSecret). Update refuses it, and the GUI item is off with why. Older versions: a magpie from before this commit doesn't know `readOnly` and treats such a key as a full one, so downgrading magpie widens the key. Tests: - TestReadOnlyKeyEveryRoute (internal/gateway/readonly_test.go) takes the patterns from the router itself (routes() records each HandleFunc). It fails when a pattern is in neither readOnlyRoutes nor its refused list. It sends every refused pattern, by each method it takes, from 192.168.1.9 and from loopback, plus a WebSocket upgrade and an unclean chat path, and expects 403 gateway_key_read_only with the upstream never reached. It checks that every allowed route answers, that no body holds any key's secret or the upstream key, that the usage summary names the other key's use, and that a full key and a key made full again still reach the model. - TestReadOnlyKey (access) covers add-key and access-key on and off, Authenticate, List, and the sharing key refused. - TestGatewayKeyCLIReadOnly covers --read-only before and after the name and beside --key, access, the list column, bad values, and --help. - gateway-key-readonly.test.cjs runs Chromium and WebKit, 1100 and 420px, in en/zh/zh-TW/ja/de. It covers the tag, both menu items and what they post, the status line, the sharing key's item off with its why, no scroll on click, no sideways scroll, no select, and no left stripe. gateway-card.test.cjs now expects the menu's 4th item. - TestClientPathCoversHandler takes the patterns from routes() instead of parsing Handler's source, which moved into routes(). Broken by hand: - readOnlyGuard passing everything: TestReadOnlyKeyEveryRoute red (103 lines, /v1/models 200 onward). - A new `POST /v1/new-thing` route in routes(): red, "in neither readOnlyRoutes nor readOnlyRefused". - The GUI item not off for the sharing key: gateway-key-readonly red 10 of 10 in Chromium. Run at the pushed head (on origin/main |
||
|
|
3bebc38393 |
gui: a key combination opens the quick panel from any app (ben hanks)
ben hanks on Discord asked for a global shortcut that opens the menu bar or tray panel. Settings › General has a new row, Quick panel shortcut, with none set by default. Clicking its field records the next combination: a letter, a digit, Space or F1–F20 with Ctrl, Alt/Option or Cmd/Win, or an F key on its own. Esc or a click elsewhere stops recording, and the cross clears the shortcut. It is shown the system's way (⇧⌘K on a Mac, Ctrl+Alt+K elsewhere). POST /api/settings/panel-shortcut checks the combination, has the running app bind it through Wails' GlobalShortcut (Carbon hot keys on the Mac, RegisterHotKey on Windows, XGrabKey on X11), and saves it only once it is bound. One the system refuses is not saved, the old one stays bound, and the status line says why. A pressed shortcut toggles the panel as a tray click does. The shortcut belongs to each computer (KeepOwn), the Settings page's own save leaves it alone, and the old Mac process lets go of it as it hands over. On Wayland no app may grab keys, so the field is turned off and the row names the command (`magpie panel`) to bind in the desktop's own keyboard settings. Every string is in en, zh, zh-TW, ja and de. No size budget was raised: app.js is 1,315,252 of its 1,315,316 after older comments were cut. Run at this head (rebased on origin/main |
||
|
|
4a4a90c237 |
gui: the sidebar's button stays in one place whether the sidebar shows or not (ztf4080 on X)
ztf4080: "左侧栏收起按钮在左上角,但是收起后展开按钮变了右下角". The button
to hide the sidebar sat in the page header to the right of the sidebar
(x=232 at 1280), and once hidden it was in the title bar after the magpie
(Mac x=175; Windows 14; Linux 93/14/40 as the brand folds). Each click
moved it.
Now #sideToggle is first in the title bar in both layouts, as Finder's,
Notes' and Mail's: layoutNav moves it with the brand, into .side-top when
the sidebar shows and to the front of .top when it doesn't. .side-top has
the header's height and left padding (Mac: after the traffic lights at
96px/zoom, as .top), so the button keeps its x, y and size. A sidebar too
narrow for the name keeps the bird (fitTop sets .side-top.tight). Windows'
10px .side-top is gone: the button needs that row there too. Nothing else
in the sidebar changed.
Run (on mote, through mote-run; NODE_PATH playwright 1.62.0, chromium and
webkit):
- Repro before the fix: a probe at 1280/900/640, en/zh/de, Mac/Windows/
Linux chrome, gave the positions above.
- side-toggle.test.cjs gains "<os>: the button stays where it was" for
Mac, Windows and Linux: every language (en, zh, zh-TW, ja, de) at 1280,
900, 640 and a 168px sidebar; hide then show, x/y/w/h within 0.5px, the
header fits, .side-top doesn't overflow.
- Broken by hand: the new test against origin/main's assets fails all 3
OS subtests in both engines (18 pass, 8 fail); reverting layoutNav's
append/prepend fails them too.
- side-toggle, side-width, header-centre: 49 pass, 1 fail (header-centre
webkit, the ResizeObserver page error, #3479; the same on the base).
- The 22 GUI files that touch the sidebar, brand or toggle
(--test-concurrency=2): 335 pass, 11 fail: header-centre webkit (#3479)
and mobile-web's desktop compare against HEAD~1, which moved on purpose.
- mobile-web.test.cjs: until BASE_REF has the move, its desktop compare
leaves the button, the magpie and the header out of both pictures, like
its other "until BASE_REF has it" cases. Run in a git checkout on mote
with BASE_REF=HEAD~1: 30 pass, 0 fail in chromium and webkit.
- At the head rebased on
|
||
|
|
55299ee304 |
agents: Switch accounts only, the account a Claude Code or Codex not connected is signed in to, a click from another
Users asked for an entry named 仅切换账号 (growaiskills), for the current
account to always show, for a clear sign that a switch took, and for the
switch away from the proxy settings that put them off (Rennix7t). The owner
said to build it.
On the Agents page, a Claude Code or Codex row that magpie doesn't connect now
shows the account the agent is signed in to as a button in its status line
(switchEntry). Clicking it opens the app menu, headed "Switch accounts only",
with:
- every sign-in;
- "Only switch {agent}'s sign-in", a ticked item (menuitemcheckbox). Claude
always gets it; Codex gets it only with more than one usable account;
- "Manage accounts…", which opens the provider editor.
Picking another account goes through /api/login/switch, or through
/api/provider/keeplogin when the provider keeps a login. The button then
shows "Switched" for 5s, and the status line says that new sessions use the
account and an open one keeps its account until it is restarted. A pure
switcher (Claude kept to its own accounts with nothing else in magpie, the
"empty" connect kind) used to show only "Add a key or a subscription
first", so it couldn't switch from the page. It now gets the entry, and
switch-only reads "Not connected · switching accounts only". The failover
line's "ChatGPT accounts" button is gone, since this entry replaces it. A
connected agent, the tray panel and the WSL twin get no entry. Strings are
in zh, zh-TW, ja and de. Docs: providers-accounts.md and reference.md.
The core budget is raised by this change's bytes only (app.js 1,315,316,
core 1,536,357), after cutting comments and dropping a key.
Run on mote at 9f299d54e (rebased on
|
||
|
|
2d9a89b9f6 |
gui: an account row's ⋯ shows on hover in Safari before 15.4 again
|
||
|
|
81bdca1fe9 |
gui: a narrow weighted key list keeps the key's name on hover (00e0fd11b)
|
||
|
|
44d6979930 |
gui: a page scrolls rather than squeeze its heads, so opening the Gateway page's models moves nothing over them
The owner, 10-29: 展开模型的时候,这块部分会整体向上移动几个像素. A view is a flex column (since |
||
|
|
d4c05ca114 |
gui: a status line longer than its place floats wrapped, whole (littleHong)
littleHong on Discord: Test models in OfficeAce's editor failed on every
model, and the red status pill was one line ending in "…", so the part of
the error saying what to do ("请在 OfficeAce 客户端完成「接入华为云 MaaS
模型」后重试…") was cut off.
status() now lifts the pill (the floating .lift it already had over a
dialog) whenever its text is wider than the footer, too. A lifted pill
wraps (white-space normal, overflow-wrap anywhere), is up to
min(560px, 100vw - 32px) wide and min(166px, 40vh) tall (ten lines),
and scrolls inside itself past that (overscroll contained). One line is
still a 22px pill; its corners went from 999px to 11px so several lines
don't read as a capsule. It stays while the pointer is on it and clears
2s after it leaves, and a long line stays msg.length * 80 ms at least.
The text stays selectable; no border accent.
Siblings: every toast (ok, warn, err) goes through status(), in the
window, over dialogs and in the tray panel's footer
(body.panel .foot .status is overridden by body .foot .status.lift).
A short line stays in the footer as before.
Test: internal/gui/tests/status-long.test.cjs. The reporter's literal
OfficeAce error from /api/provider/test on 10 models, in en, zh, zh-TW,
ja and de, light at 900 wide and dark at 390: lifted, not cut either way,
wraps, in the viewport, user-select text, no left border, last character
inside the pill. In en and zh: err/warn/ok long lines float and a short
one stays in the footer; a very long line holds to ten lines and wheel
scrolls to its end without moving the page; hover holds it, leaving
clears it.
Run (mote-run):
- status-long: 32/32 in Chromium and WebKit.
- Broken by hand in Chromium: old CSS+JS 0/16, old CSS only 2/16 (the
hover cases), old JS only 10/16 (footer, scroll and hover cases fail).
- i18n-keys, sessions-reads, session-terminal, account-discovery,
settings-general: ok in both engines.
- go test ./internal/gui: ok except TestMainWindowCorners/macOS_26_SDK,
open as #3949. TestCoreScriptBudget ok: app.js 1,310,377 bytes
(budget 1,311,735), budgets unchanged.
- Screenshots looked at: zh light 900, zh dark 390, scroll dark 390.
Not tried: the real app; Windows WebView2 and Linux WebKitGTK.
|
||
|
|
18005c8039 |
gui: a provider editor's account rows end at one edge, their settings under ⋯
The owner, 10-29, on Claude Code's editor sheet: its left and right edges
weren't the same, Make first sat alone on a line under the name, and a
band of hover pills took room it didn't show.
Each account row is now a line (dot, name, plan, what is set, then the
status and First or Make first at the right end) and the quota under it.
The settings that aren't set (models, usage cap, requests at once) and
Remove or Sign out wait under ⋯ on a line of their own, which ⋯ opens and
closes. The editor remembers that per row across redraws. A set pill stays
on the line, and a lane pill moves between them as its account starts or
stops running, but not while its menu or box is open. A signed-out
account keeps Sign in again and Remove on its line, wrapping under the
name where they don't fit. The editor's label column fits its labels,
a list's label stands on its first row, every row of the accounts box is
ruled off from the one above, and in the web layout ⋯ is always shown. New
string "Settings for {user}" is in all five languages.
core_budget_test: app.js stays in its budget (1,311,731, comments cut
down). The core's scripts go to 1,532,459. Main had 233 bytes of room
there, so the budget is raised to the exact size with no room added,
as the 10-28/29 editor entries did.
Run (on mote, at this tree, rebased on
|
||
|
|
75a7db27b9 |
usage: an allowance card can be hidden from the Overview (whqtian_07012 on Discord)
whqtian wanted StepFun's plan card on Usage › Overview without its
balance card. Right-click a card (or long-press it on a touch screen)
and the app menu offers "Hide from Overview". With several accounts on
one card it says "Hide this account from Overview". A plan card that
carries its key's balance also offers "Hide its balance from Overview",
which keeps the plan. Each hidden card is saved as its tray card id plus
its kind (stepfun|balance, kimi|me@x|plan) in settings.UsageCardsHidden,
through POST /api/usage/arrange (cardsHidden). The Settings save keeps
it. Under the cards, a quiet "{n} hidden" line opens them, each with
Unhide, and Show all from two. It is the same pattern as the Agents
list's hide.
Display only: routing, caps, counting, the Accounts list, the tray
panel's Allowances (it has its own Arrange) and the menu bar cells
never see it. A cell clicked for a hidden card shows it until the page
is left (usagePeek). UI: the app menu, not a native select, no
coloured stripes, no new button on the cards.
Run at this head (rebased on
|
||
|
|
1801c96bfb |
warm-up: Warm up now sends one account its warm-up at once (Codex and Claude)
A Windows user on Discord asked for a manual warm-up of a Codex account.
Settings > Warm-up and check-in now ends both the ChatGPT and the Claude
tab with a "Warm up now" row. Its text button sends the account's warm-up
right away. With one account it sends straight off. With several it opens
the app menu ("Warm up which account"), not a select. The row then says
"Warmed up {who} {when}", or "Couldn't warm up {who}: {why}" in red, and
the status line says the same.
What is sent: provider.WarmNow(agent, user) sends the scheduled warm-up's
own request to that one account and to no other. For Codex that is
warmCodexLogin; for Claude it is warmClaudeLogin over the gateway's
warmClaude (Claude Code's run in that account's config directory), set
through WarmClaudeVia. It works whether the warm-ups are on or off. An
account whose sign-in lapsed is refused with the reason. Afterwards the
allowance is read again (StaleAllowance / claudeWarmedNow), as after a
scheduled warm-up. The schedule's file is left to the schedule. The
Codex prompt, identity and base_instructions are unchanged: it is the
same body. The route is POST /api/warm-now, and /api/settings carries
claudeUsers beside codexUsers.
Claude gets the item too. It shares the warm-up engine and the same tab,
and the send is the same warmClaude the schedule uses.
No size budget was raised.
Run:
- WSL (wsl-run), Chromium and WebKit, with the GUI test
warm-now.test.cjs in en/zh/zh-TW/ja/de at 900px and 440px: 22/22.
The pressed button stays in place within 1px after two frames.
- WSL, the related files (warm-now, warm-at-own, warm-at-times,
warm-reset-asleep, settings-groups, settings-search, i18n-keys):
102/102.
- WSL, the other files that touch these lists (checkin-account,
checkin-reason, checkin-reason-once, plugin-checkin, segs-press-redraw,
settings-sections, usage-checkin): 169/170. The red is segs-press-redraw
"webkit ja 440px: every Settings option..." with "could not bring the
option into view" after 103s under load. It passed 3/3 alone and is
filed as #4189.
- mote (macOS) at the final tree: go vet for internal/gui, provider and
gateway; go test -run 'WarmNow|Budget|Warm' ./internal/gui
./internal/provider: ok. An earlier mote run, before the route move,
ran go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go
vet ./..., go build ./... and the budget tests: ok.
- Windows (win-run): go test -run 'TestWarmNow|TestCodexWarm|TestClaudeWarm'
./internal/provider/ ./internal/gui/: ok.
- WSL: go vet -tags nogui ./... is ok and gofmt -l is empty.
go test -tags nogui -timeout 45m ./...: 75 packages ok, including
internal/gui and internal/provider. internal/agent has 4 reds on the WSL
box (TestInstalledVersion, TestGrokInstalled,
TestCursorFolderFromTheEditorIsNotTheCLI, TestOmpDetectedWithPiDir). They
are already filed as #4033 and #3548 (fake binaries hit WSL interop).
internal/gateway has 1 red, TestUnroutedRequestShownThenAnswered: giveUp
answers the 504 before it marks the route done. That is not this change,
and it is filed as #4200.
At the head rebased on origin/main
|
||
|
|
b4267de595 |
gateway: a provider's fallback can be a routing group, routed as the group
01huadalang on Discord: "还有备用模型增加路由组的选择,现在只能选模型". A
provider's Fallback list held models only; a "group/<id>" entry resolved
to the group's first member alone. Now such an entry is served through the
group, as a request to the group would be:
- plan → planPaused: a fallback naming a group (provider.FallbackGroup,
the group as routed, Live) hands its members to planLevel
(planFallbackGroup): the group's own routing, its sink and asides, and
its pause rules (serve passes provider.PausedOut for the agent's folder).
Its trace rows are marked Fallback with the group in Via.
- No loop, each provider/model once a round: a member that is the primary,
a model named earlier, or another fallback group's member is left out
where it comes second. Groups have no fallbacks of their own and a
member's fallbacks are not followed, so nothing leads back. A group that
is gone or off is passed over, as a model none serves is.
- Every sibling that reads p.Fallback now reads a group's members through
provider.FallbackModels: redaction (unredactedRoute: an unmasked
provider with a fallback group holding a remote model is masked),
careful accounts (carefulOf), native compaction, Codex's own turns
(codexFallsBack) and Claude's auto-mode review (claudeReviewed, which
moves from provider.Resolve to ResolveRoute, as the gateway reads
fallbacks).
- CLI: `magpie provider fallback` already took group/<id> (Resolve knows
groups); its usage and error now say so. Pinned by
TestFallbackCmdTakesGroup.
- GUI: the provider editor's Fallback picker lists the routing groups
(providers.gateway.groups) beside the models as chips with the Routing
fan and a muted "routing group" tell; a picked group's row has the same
fan and tell, and a gone one says "No routing group {id} now; it is
skipped". A filter matches a group's name, id and its members'
providers. New strings in zh, zh-TW, ja and de.
- app.js budget raised 187 bytes on main (1,311,922; core 1,531,060), the core's
own editor, no room added; the addition was cut from ~900 bytes first.
- docs/subsystems/gateway-routing.md: the Candidates row says all this.
Not done: a fallback group's turn rules (ruleFor/ruleOver, which can ask
a classifier) are not applied. The plan is made before the primary is
tried, so they would cost a classifier call on every request the primary
answers. Its routing order, sink and pause rules are applied.
Run (at f6e7214af; after the rebase, the last bullet):
- gofmt -l: clean. mote: go build ./...; go vet on the touched packages;
GOOS=linux go vet -tags nogui ./...; GOOS=windows go vet ./...: ok.
- mote: go test -timeout 45m ./...: every package ok except internal/gui:
TestCoreScriptBudget (fixed above, then ok) and ten AppKit window tests
(TestDockJoinLeadsCommandTab, TestPanelCloseHidesIt, TestMainWindowCorners
…) killed at their 30s bars while four other sessions' GUI suites held
mote at load 70-110. Run alone, all ten
pass (TestDockJoinLeadsCommandTab skips) except TestMainWindowCorners,
red at base
|
||
|
|
f004072007 |
agents: More in Plugins is in sight with Install another agent folded
The owner: 插件中还有更多,不应该折叠在安装更多Agent里. |
||
|
|
89f3865efa |
about: the Version row and the title bar hold still while the update's state comes in (#4057)
#4057 lists four jumps on Settings › About and the title bar. Each was reproduced in Chromium and WebKit (update-row-steady.test.cjs) before the fix: 1. Opened cold (no state read yet), the Version row drew with no line under its name, 48px, and grew to 60px when the read came in. The line is now kept, empty (a no-break space), until the answer. 2. Opened with a state read long ago, the row drew it first: "Up to date" and Check, then "0.1.x is downloaded" a moment later. A state is drawn early only when read in the last 30s (#3469's case, a row drawn again within Settings, still is); an older one may be old news, so the line waits empty for the answer. 3. The header's Update pill showing pushed the Settings search in the title bar beside the sidebar ~80px left in one frame, through the ResizeObserver that sets --tools-r. The pill now opens from nothing (max-width and padding from 0 in update-in), so the search slides over with it during the pill's .45s entrance instead. It still ends ~80px left: the pill needs the room, and holding it empty for a pill that is usually not there would take it from the title. 4. Not changed: a failed download's reason still wraps (sub.wraps). It is a new state, not a flicker, and the reason is shown in full on purpose: the network case says what to do (Click Check, or the release page), which a one-line cut would hide. A Check from there keeps the class until its answer, so the row doesn't shrink and grow on each try. No new strings. app.js grows 26 bytes over origin/main |
||
|
|
96115018cf |
gateway: a key's Limit and Models keep their room unhovered (#4072)
|
||
|
|
11cbf4de1d |
usage: Sessions' agent filter is a menu, as the model and folder ones beside it
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 ( |
||
|
|
2ff85f8a2b |
gui: a page's bar room comes out of its right padding, so both sides match
v0.1.1904 had every page keep its scrollbar's room, so nothing moves
when a page grows past the window. The owner asked whether the clear
bar now makes the sides uneven: it did, by the bar's width (8px on the
Mac, 10px on Windows and Linux), and the centred pages sat 4px to the
left.
layout.js measures the bar of a .view into --bar (again on resize, so
a text-size zoom is followed), and app.css takes it from each page's
right padding: the panel's 12px, the window's 16px, the centred pages'
max(16px, 50% - 600px) and the phone web's safe-area right. The heads
and strips that reach over the padding (Library's and Settings' sticky
heads, Providers' after-list fade, the masking record's bar) reach that
much less on the right, or they would run the page sideways. A plugin's
page, whose frame scrolls itself, shows a bar only when it needs one.
layout.js's measuring adds 254 bytes to the core's scripts; the budget is
raised by exactly that, with no room added.
page-width-steady.test.cjs now checks every page's left gap against its
right gap with the bar (chromium and webkit, the Mac's 8px bar and the
10px one, 1100 and 1600 wide) and that no page scrolls sideways; that
check found Providers' after-list fade running 4px past the page. With
v0.1.1904's CSS it is red ("agents: 16px on the left, 24px on the
right (bar 8px)", 26px with the 10px bar, 94/102 centred). page-width's
"centred" check compared paddings only, and now counts the bar too.
Run on mote at this head (f70cb6825's tree, on origin/main
|
||
|
|
e8e9245ecf |
agents: Install another agent says Plugins has more agents, and opens them
The owner, on the Agents page: 因为我们支持Agent插件了,这里是不是也应该 显示插件中有更多? Install another agent listed only the agents magpie has an install command for; the agents a plugin adds were nowhere on that page. - GET /api/plugins/agents names the suggested agent plugins (the market's kind "agent") not installed here. One installed but turned off, or pinned to a version, counts as installed: Plugins turns it on. - Install another agent counts them in its header and ends with one row, "More in Plugins" with their names, as the Providers add sheet does for subscriptions. The row opens Plugins › Discover scrolled to its Agents, only while the click is fresh (scrollOnPurpose), on the section drawn last, since npm's answers draw it again. - The list is fetched beside the install commands, not before them, so a slow market never holds the commands back. With no install command left, the section shows the plugins' row alone and no install note. - Budgets: app.js 1,311,681 and the core 1,530,449 (+1,430 / +2,408 over main), the Agents page and Plugins page are the core's own, no room added. Run at this tree, rebased on |
||
|
|
b586fdf1eb |
gui: every page keeps its scrollbar's room, so nothing opening in it narrows the page
The owner, on Agents: opening an agent's details ran the page past the window, the scrollbar appeared, and the whole page went 8px narrower in one frame (and back when it closed). Every page had this; only Usage and Routing kept the bar's room ( |
||
|
|
012c584cc1 |
usage: clear a model's usage, or all of it, from the Usage page
CrazyMouse_TT on X asked for a way to clear usage, all of it or one model's, to measure a local model fresh after deploying it. The Usage page's Models list has a "…" on each row (and a right-click menu) with "Clear usage…", and "Clear all usage…" sits under the lists below the "Counted from…" note. Each asks first, in a confirmation that says what is deleted, that it can't be undone, and that key spending limits and allowances still count the calls. A clear is a mark in settings (usageCleared: provider, model, unix ms), read at read time; usage.jsonl is never rewritten. The Overview hides calls up to the mark in summarizeFrom; the Requests page, heatmap and ledger/CSV hide them in Filter.keepsRow, their one choke point, and the request index's meta carries the marks so its cache is dropped. Key budgets, window holds and Codex reads go through usage.Visit and the raw log, so a clear never resets a key's spending limit or a quota. A later clear of the same model or of everything takes the place of an earlier one. The marks ride the settings part of a sync (sync-backup.md) and a save of the Settings page keeps them (api.go's keep list; the guard test TestSettingsSaveKeepsWhatItDoesNotSend caught it missing). gateway-sessions.md and sync-backup.md say so. Run on mote (mote-run) at this tree, rebased on origin/main |
||
|
|
f835bd713d |
gui: the Gateway page is one compact card, shares on the network from itself, and a key's copy sits by the key
The owner on the Gateway page: "一点都不精致、优雅", the key row's copy button "很奇怪的位置,太突兀了", the gateway icon ugly, Connect should start folded, and "Share on local network" should be picked on this page with the LAN addresses shown. Agreed on a canvas first. - The status row has the sidebar's server glyph in a 28px tile with two lights (green running, amber not), the state beside it and the fix button at the right. The address pill left the row. - Under it, in the same card: Share on local network as This computer / Local network segments (settings/lan, as Settings does), and every address the gateway answers on, each with its own copy: this computer (or the public address on the web), then the LAN addresses, or a line saying there are none. Settings' container note comes from the same lanShown(). The "open LAN settings" button is gone. - A key's row: its copy right after the masked key; Rotate key and Remove moved into a "…" (Key actions) row menu at the end. - Connect starts folded; opening it is remembered (magpie.gwConnectFolded). - At narrow widths the status row wraps and the address list is a label/value grid, so no language overflows at 420px. Tests: new gateway-card (5 languages x 1100/420 x chromium/webkit): the lights, Connect folded, sharing from the card with every address and a copy of a LAN one, no scroll, the copy within 6px of the key, the … last with its menu, nothing overflowing, no left borders. Tests that used Connect open now open it; Rotate/Remove go through the menu (fixtures' keyAction). Run on mote, at the tree before the last rebase ( |
||
|
|
33af28ed6b |
gui: the add sheet's Partners heading lights once an opening
The owner asked for an elegant light on the Partners heading each time Add provider takes the view to the sheet, and picked the traced outline of three drafts. A 1px hairline (a conic gradient on an animated @property angle, masked to the border) runs once round the heading's words over 1.8s and fades, over a faint wash of the accent; it follows --accent, so it reads in both themes, and keeps to the heading's own padding box, inside the sheet. It plays when the heading is fully in view (an IntersectionObserver on the providers view), once per opening of the sheet: a search or a reload drawing the sheet again doesn't play it, closing and opening it does (partnersShone, reset where partnersCounted is). With the system's reduced motion or Settings' Reduce motion (#3813, calm() and holdStill) it isn't drawn. The outline's elements are <i>, so the heading's hint stays its only span, which the add-sheet and partners tests read. The core's scripts are 1,528,076 bytes, their budget raised to it with no room added; app.js stays under its own. Run at this head, on mote: TestCoreScriptBudget ok; the 59 GUI files that open the add sheet (grep addProvider|#addSheet) and reduce-motion and settings-general, chromium and webkit: 826 of 826 ok (at --test-concurrency=2; at 4, on mote at load ~230 from other runs, 8 chromium sign-in cases timed out at 5s and passed 28 of 28 alone). add-partners-shine.test.cjs: en zh ja de at 900 and 440px, lit once on open, not again after a search, again after close and reopen, the outline round the words and inside the sheet, none under either reduced motion. Broken by hand: without the partnersShone check every redraw lights it again, and the test is red in all 8 language/width cases. Not run: the whole GUI suite (the change adds no API call and its classes are scoped to the add sheet's heading); not seen on Windows' WebView2 or WebKitGTK, where @property and mask-composite are supported but the motion wasn't watched. |
||
|
|
be0fbfe08d |
gui: a menu with nothing to tick keeps no tick column in Safari 15.0 too (#4020)
v0.1.1855's old-webkit check failed on app.css's `.proto-menu:not(:has(.on, [role=menuitemcheckbox])) .pm-tick` rule: :has() is Safari 15.4+, so on macOS 12's Safari 15.0 the whole rule is dropped and every plain menu kept an empty tick column. openProtoMenu and the sessions combo's draw() now set .pm-bare on the box when no item is on or a checkbox, and the CSS hides .pm-tick under it. The three commits before this one dedupe app.js to make the room; the core script budget is not raised. Run at the pushed head (this commit + the old-webkit test fix after it, on |
||
|
|
a1f06bd780 |
gui: a browser tab offers the fonts of the computer it runs on (Norcleeh)
Norcleeh (Discord #general): magpie in Docker, used through the web GUI,
Settings' font menu doesn't list the fonts he installed on his own
computer; the app does. Cause, confirmed in the code: a tab's list is
/api/fonts, the server's families (none in a nogui build such as Docker)
plus commonFamilies, filtered by what the browser draws. A family that
is only on the browser's computer was never offered, and a choice the
server doesn't list was dropped by desktopFonts.available.
Now (webfonts.js, which only a browser tab loads; the app's windows are
unchanged):
- Where the Local Font Access API is (Chromium on https or localhost),
the press that opens a family menu calls queryLocalFonts() once a
page, and at load when the local-fonts permission is already given.
The families join the list with their real styles ("SemiBold
Condensed Italic" -> weight 600, 75%, italic).
- Elsewhere (Safari, Firefox, a plain-http LAN address, a refused
permission) the menu's search says "Search or type a font name…" and
offers Use "name" for a family the list lacks, enabled when the canvas
probe says this browser draws it, greyed with "This browser can't find
this font" when not; Enter takes it.
- A chosen family the server doesn't list stays in the tab's list on
later loads while the browser draws it, so it keeps being applied.
- The app's menu (openProtoMenu), never a <select>. Strings in zh,
zh-TW, ja and de. docs/subsystems/gui-shell.md says so.
Budget: no raise. here() moved out of fonts.js into webfonts.js, which
isn't a core script: loadFonts import()s it in a tab only (the page has
no CSP). The core is 106 bytes smaller than origin/main's.
Run (mote-run). At this head on
|
||
|
|
e8c7dddcb4 |
notices: the release carries the third-party licence notices
The owner asked for the licence notices in the release package (moejs alpha.11 compiles Intl's data in, which carries its own notices). THIRD_PARTY_NOTICES is embedded in the binary (main.go, //go:embed) and handed to internal/notices; `magpie licenses` prints it, GET /api/notices serves it, and Settings › About has an Open-source licenses row that opens it in a dialog, in every language. `make app` copies the file into the .app's Resources too. The core's scripts are 1,527,245 bytes, their budget raised to it with no room added; app.js stays under its own. Run at this head (rebased on origin/main): - win-run (Windows 11): go vet -tags nogui . ./internal/notices ./internal/cli; go test TestNoticesFollowMoejs (.), ./internal/cli, TestCoreScriptBudget (./internal/gui): ok. - wsl-run (Ubuntu 24.04): go vet -tags nogui ./..., go build -tags nogui: ok. Run at the pre-rebase head 14e2d13fb, on mote (macOS): - gofmt; make app's copy byte-identical to the file; `magpie licenses` output equal to the file; GOOS=linux/windows vet and build; go test . ./internal/cli: ok. ./internal/gui: only TestMainWindowCorners red, the same on origin/main (#3949). - about-notices.test.cjs: chromium and webkit, en zh zh-TW ja de, 1100 and 420px: all ok. Broken by hand: TestNoticesFollowMoejs red with the embedded file cut. Not run: the GUI suite at this head. The rebase met main's cancelAsk helper where showNotices sat, and the dialog's Done now uses it (the same stopPropagation + closeConfirmAsk). The whole GUI suite at 14e2d13fb was cut off when mote went down at load ~50: the files it reached outside About had reds, most of them 180s browser-launch timeouts, the rest passing in other languages or the other engine; they are run again once mote is back, and any that stay red are filed. |
||
|
|
63aca1802e |
gui: PenguinHarness's logo is a tile, and the app's own icons are no logos (#3858)
icon-tile was red on main: PenguinHarness's logo ( |
||
|
|
d74ef5e04c |
gui: an inner list wheeled to its end keeps the wheel; the page stays put
碳碳双键 (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). |
||
|
|
7323255b4e |
gui: the Windows app's confirmation backdrop goes without blur too (#3980)
Henry-916's change (the commit before) took the blur off the provider editor's full-window backdrop in the Windows app, where WebView2 on an Intel UHD D3D11 GPU stalled under it. The Remove/Sign out confirmation (.action-confirm, a <dialog>) blurs the whole window behind it the same way through ::backdrop, so it is scoped out by the same win/web rule. modal-backdrop.test.cjs now shows that dialog and checks its ::backdrop. Not changed: .pop, the panel's open profile chips and Settings' sticky header blur too, but over a popover's or a header strip's area, not the window's; nothing measured them as slow. Run at this head (mote): - node --test modal-backdrop: 24 of 24 ok. Broken by hand (the ::backdrop selector dropped): both Win32 desktop cases fail "nor the confirmation's". - chromium: modal-backdrop, dialog-backdrop-drag, segment-press-dialog, gui-zh-tw, gui-ja, gui-de, i18n-keys, codex-signout, account-discovery: 93 ok, 0 fail. The same less modal-backdrop and i18n-keys with BROWSER=webkit: 37 ok, 0 fail. - go test ./internal/gui: one red, TestMainWindowCorners/macOS_26_SDK on macOS 27, filed as #3949; nothing in it reads CSS. Not tried: the real Windows app; the reporter measured the modal's blur there (67 → 165 rAF callbacks a second). |
||
|
|
824100f30f |
gui: keep Windows modal backdrops responsive without blur
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. |
||
|
|
8b95f7c3a9 |
usage: a subscription's windows are grids of their own, not a rows subgrid (#3955)
Each quota window was a subgrid of three rows of .quota-windows, so the
bars of two windows side by side lined up when one's name wrapped. That
is the layout that crashed Safari 16's WebKit sizing the Routing
requests (#3731). Now each window is a grid of its own. fitQuota, which
already runs a frame after the windows' ResizeObserver to stack the
counts, also gives each window's names the height of the tallest beside
them. The subgrid left 9px between a bar and its reset line, not the
4px the CSS declares, in both engines; kept, so the card looks as it
did.
quota-window-rows (new) checks that no rule of the windows says
subgrid, and at 1100, 700, 390 and 1100 again, in both engines and
every language, that the bars of each row start at one y with a long
name wrapped beside a short one, that the names sit above the bar, and
that a reset line starts 13px under its bar's top.
Run on mote at this head (on
|
||
|
|
7b63feb908 |
gui: a browser tab's font rows show on a nogui magpie, and Text size no longer flashes
Norcleeh (Discord #general, after v0.1.1788): in magpie's web GUI the interface-font and code-font rows "flash once and disappear" on refresh. Cause, reproduced on a real nogui `magpie web` on mote in Chromium and WebKit, at 127.0.0.1, localhost and the LAN address: a nogui build (Docker, magpie-cli) has fonts.Available false, so boot.js carried no `fonts` flag and app.js never showed the font rows at all. What flashed was the Text size row: index.html shows it, and renderSettings hid it for a browser tab 40-120ms later (`#textSizeRow.hidden = web`). Fix: - A browser tab always gets the font rows. Its /api/fonts answers the server's families plus a common list (Arial, Menlo, Consolas, PingFang SC, Microsoft YaHei, Noto Sans CJK SC, JetBrains Mono, ...) and never errors for a tab; fonts.js keeps only what this browser can draw, and "System default" is always offered, so with nothing kept the rows still show with it. - The app-only rows (Text size, tray, login, tray usage) carry .app-only, which `body.web .app-only` hides before first paint, so none of them paints in a tab. - The boot `fonts` flag is gone. app.js and core both got smaller; no budget changed. - docs/subsystems/gui-shell.md "Desktop fonts" says so. Run (mote-run, at this head rebased on |
||
|
|
0c973cd9a4 |
usage: the Sessions bars are rows of their own, not a subgrid (#3955)
The Sessions overview's bars (Projects, Models, Tool use) and Top skills were each a subgrid of their card, the same layout that crashed Safari 16's WebKit sizing the Routing requests (#3731). Each row is now a grid of its own. sessLineUp reads each column's width with the rows at their natural width, once, when the card is first shown, and sets it on the card as --sb<i>. The widths don't change with the window's, and text size is the window's zoom, so it never measures again on a resize. The @supports not (subgrid) fallback is gone: Safari 16 has subgrid, so it never helped. sessions-bar-names now checks that no rule of the bars says subgrid, that every row's bar starts and ends at one x (wide, at 420 and wide again), and runs in every language, not only en and zh. Run on mote at this head: - sessions-bar-names: 41/41 pass. At origin/main's assets (MAGPIE_SESS_ASSETS) 40/41: only the subgrid check fails, so the bars line up as they did. - Broken by hand (sessLineUp returns at once): 20 of 21 red, bars' left at 527,338. - sessions-overview, account-mask-sessions, i18n-keys: pass. - go test -run 'Budget|Asset|CSS' ./internal/gui: ok. - node --check page.js: ok. Not tried: a real Safari 16 (no macOS 13 machine). Next for #3955: .quota-windows .quota's rows subgrid. |
||
|
|
396e0e4638 |
usage: a deleted provider's requests merged into another, or named, from the Requests filter
CyberCaius on Discord: a deleted provider's requests sat under its old id
("<date> 已删除"), and the only way to put them under a provider they
have was renaming that provider onto the old id. Now, with a deleted
provider picked in Usage › Requests' Provider filter, a "…" beside it
offers Merge into… (an app menu of the providers there are now) and
Rename… (the filter's button turns into a name field; Enter or leaving
it saves, Escape keeps it). With the merged-into provider picked, the
same "…" lists Separate <name> for each, the undo.
Nothing in the log is rewritten. Both live on the deletion's own record
in providers.json (Deleted.Into/MergedAt, Deleted.Label), so a provider
added later under the old id inherits neither: it is a different
provider, and its record of its own is what it has. Renaming the target
carries the merge (Rename rewrites Into); deleting the target ends it.
Renames.Both(id, time) gives the id a call is shown under and the one it
was made to (Own). Listing, filtering, the summary and vias go by the
shown id; pricing (Record.priceID, block_price's as), window holds and
the gateway's loggedAnswers go by the own one, so a merge moves no cost
or token, only whose name they sit under. The target's face lists what
was merged into it (Named.Merged). Routes: GET /api/usage/deleted/into,
POST /api/usage/deleted {id, into?, name?}; a field not sent stays.
Run (mote, at this tree on
|
||
|
|
08b02cf18c |
providers: a pool stops at its caps and reads usage again near them (plugins#349)
What was adopted on magpie-community/plugins#349 (1939869736luosi): one
place, in the GUI and the CLI, for a subscription's account pool, and an
opt-in conservative mode.
- Stop at the caps (Provider.CapStop, off by default): once every account
in use is held at its cap, the request is answered 429 rather than going
on to the provider's fallbacks (plan returns restLast). Off, as before.
- Check usage again near a cap (Provider.CapCareful, off by default,
internal/gateway/cap_careful.go): before planning, a capped account's
usage is read again when its reading is over 15s old within 5 points of
a cap, or over 5m old at all; the request waits at most 10s, and a
failed account is asked again at most every 15s. An account whose usage
was never read, whose last read failed, or whose reading is still that
old is then held as one at its cap is (capHold "unread", traced as
Weighed.Unread, named in the 429 with "--careful off"). Generic: it
goes by provider.UsageRead/ReadUsageNow, so every subscription that
reports usage windows (Codex, Claude, plugins) gets it.
- provider: usedCache records each account's read state; a failed read
keeps the last good reading's time. ReadUsageNow no longer reports
false when the read had already finished on the first ask.
- GUI: under the provider's account list, once an account has a cap (or
either is on), two ticks for the above, and a note naming the accounts
in use with no cap ("used to 100% of each window"). Accounts, order and
caps stay where they were in that list. zh, zh-TW, ja, de added.
app.js 1,309,658 within its 1,310,460 budget, unraised: addRow and a
per-row forgetOf replace 3 add-button and 5 Remove-button builds.
- CLI: magpie provider pool <id> [--accounts a,b,…] [--cap percent|off]
[--stop on|off] [--careful on|off] shows and sets the whole pool.
- docs: gateway-routing.md and providers-accounts.md.
Run (mote, before the rebase at
|
||
|
|
34d38ed669 |
hermes: each profile picks its own model on the Agents page
dongshanfengdongshizhcn on Discord: "我的 hermes 有多个 profile,但现在
agent 的配置里面,似乎只能配置默认的 profile". magpie gave Hermes one model
picker, for the connected profile's config.yaml. A bot under
<root>/profiles/<name> could only follow it or keep its own model.
Hermes's layout comes from its own source (hermes-agent e5ea5fd9,
hermes_cli/profiles.py and main.py): named profiles live in
<root>/profiles/<name> (PROFILE_ID_RE, a .deleted tombstone, the identity
files), active_profile is the sticky one, "default" is the root, and a
profile's model is model.default/model.model under model.provider. magpie
already found these profiles (hermesProfiles/hermesOthers).
Now each profile other than the connected one has a field,
"profile:<name>" (hermesProfileFields). The opened Hermes row draws them as
Other profiles, one line per profile: its name, the app's model picker, and
`hermes -p <name>`. They are never a square of the row's own, and with one
profile only nothing new shows. Nothing needs setting up:
- a magpie model stashes the profile's own provider and model, then puts
magpie's provider and the model into that profile only;
- a model of its own is written as model.default and gives back the stashed
provider;
- Default puts back the profile's model from before magpie, or keeps the one
it has. Disconnect sends the same empty value, so a profile never loses
its model;
- a bot picked there is recorded (hermes:<path>:picked) and doesn't follow
the connected config's next model (hermesFollow);
- a sync keeps magpie's provider current in a bot on magpie while the
connected config isn't on it.
app.js stays under its budget through the previous commit; no budget was
raised. New string: "Other profiles" (zh, zh-TW, ja, de).
Run:
- go test ./internal/agent ./internal/gui ./internal/profile ./internal/tui
./internal/cli (-count=1). gui, profile and cli are ok. Two reds were already
filed: TestFolderVarsAreListed (CARGO_HOME, fixed on main by
|
||
|
|
a47596ea61 |
privacy: AstrLink Guard is the default local model; its menu stands apart from the switch
Settings > Privacy's "Find with a local model" row put the model menu 2px from the Off/On switch (.prefs .val's gap): two bordered boxes touching. The row's .val now has an 8px gap. With no model picked, pii.Choose is AstrLink Guard. Before, it was Privacy Filter whenever the model was on or Privacy Filter was on disk. Now Privacy Filter is chosen only while the model is on, Privacy Filter is downloaded and AstrLink Guard isn't, so a request isn't held back. In that case masking.picked starts AstrLink Guard's 38 MB download (toGuard, tried again an hour after a failure). Once it is on disk, AstrLink Guard is saved as the pick, unless the user picked a model in between, and Privacy Filter is let go. Existing users: - Privacy Filter on with no pick: moved to AstrLink Guard after the download. Privacy Filter stays on disk and can be picked again. - Privacy Filter explicitly picked: unchanged. - Model off: the menu now shows AstrLink Guard. Run at this tree, on origin/main: - go test ./internal/pii ./internal/masking: ok. TestChoose is updated, with Privacy Filter on disk both off (Guard) and on (PF). - go test ./internal/gui -run 'Budget|I18n': ok. - privacy-model.test.cjs, chromium + webkit, every language, 1100/640: 64/64. The new gap check fails with the CSS line removed (gap 2). - gofmt, vet (darwin, linux nogui, windows), linux and windows builds: ok. Not tried: toGuard's real download and switch-over. It needs the network, and no test covers it. |
||
|
|
e056779a67 |
gui: the app serves its page to a browser, behind its key (Settings › Browser access)
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 |
||
|
|
66061fd4df |
gui: the tray panel's Usage cards have the same per-account eye as the window (yogurt36)
yogurt36 on Discord asked for Hide accounts per account wherever people take a screenshot: the menu bar panel's usage as well as the window's providers, with one logic and one interaction. |
||
|
|
ed5cc959a7 |
gui: every slow page's skeletons get magpie's bird hopping bar to bar
The owner, after the Plugins page's README bird ( |
||
|
|
d3191a51c8 |
gui: with Hide accounts on, an account's eye shows that one account in this window (yogurt36)
yogurt36 on Discord, for a screen share: with Hide accounts on, one
account should be readable while the others stay masked. Now an
account's name on the provider editor's row (accountNameButton and the
one-account line) and on its Usage card (quotaWho) has a quiet eye, in
sight on hover or keyboard focus, with an aria-label. A click shows
that account, its address and the name the user gave it together
(kin), everywhere the window draws it, tooltips included: the shown
set is skipped in hits(), which every mask goes through. It lives in
memory only. The tray panel keeps hiding it, and closing the window
hides it again: the page stays loaded while the window is hidden, so
hideMain runs mainClosedJS (hideAccounts.closed) first. With Hide
accounts off there is no eye. Strings in zh, zh-TW, ja and de.
Run (macOS, playwright 1.62.0, rebased on 630fd1d69; at push
|
||
|
|
a5ce158e54 |
gui: a logo solid to its edges is drawn at the size of a line logo beside it
The owner saw the Agents list's logos at two sizes. They were: every logo is drawn to its 16-22px box, and a tile or disc logo (Codex, WorkBuddy, ZCode, Qoder) inks ~96% of that box edge to edge, while a line logo (Pi, OpenCode, Hermes, Grok) inks ~40% and Alma's and Cindy's tiles bring their own margin (82% of the box). Measured on every file in icons/ at 256px. The 25 logos solid to their edges (inked to within 7% of each edge, 70% or more of the box) are now drawn at 82%, Alma's and Cindy's size. The list is a data-icon rule in app.css, so app.js and its budget are unchanged. icon-tile.test.cjs measures every file in icons/ and fails when a tile logo is missing from the rule or a line logo is in it, and checks in the Agents list that Codex and ZCode draw at 82%, centred, and Pi whole. Run: - icon-tile, mono-icon-redraw, models-add-and-icons, plugin-own-icon and i18n-keys GUI tests, chromium and webkit: 38 of 38. - go test -run Budget ./internal/gui: ok. - Broken by hand: codex-color taken out of the rule, the test goes red on both the list and the drawn size (22/22). - Before/after screenshot of the screenshot's 11 agents, dark, zh: the tiles now match Alma's and Cindy's. Not run: the whole GUI suite. A plugin's own icon or a user's file: icon that is a tile is not measured and stays full size. |
||
|
|
ef0a03e137 |
otel: Langfuse is set up from its host and the project's two 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 |
||
|
|
39fed471cc |
gui: a connected agent's changes read before → now, not as disconnecting undoes them
Zhenzhen (Discord, 0.1.1521, omarchy, Pi on DeepSeek's API) opened Pi's
row: "改动了 ~/.pi/agent/settings.json · models.json", and every line
magpie had added (defaultModel/defaultProvider "magpie", the whole
"magpie" provider in models.json) was red, "−" and struck through, with
`"providers": {}` tagged "接入前的值". The row drew DisconnectPreview in
its own direction, what disconnecting does, so it read as magpie
deleting their config.
changesList now draws the forward view by default: a line magpie added
is a green "+", a value it replaced is "−" old then "+" new, nothing is
struck, and a file magpie created is tagged Created. The restore view
(↺ value before connecting, struck lines, Deleted) stays where it
belongs, in 断开并还原's dialog (askDisconnect passes back=1). Both
callers are the only ones: the row's connectPanel, which every
connected agent's row goes through, and askDisconnect. No new strings;
Created/Deleted/"value before connecting" already exist in every
language. app.js stays under its budget without a raise: eight
el+svg+append triples on the Agents page fold into one el call (same
DOM).
Test: agent-changes-before-now.test.cjs, a wired Pi with the preview
built from the real diffLines output for Pi-shaped files (captured with
a throwaway Go test). Chromium and WebKit, en/zh/zh-TW/ja/de, 890 and
420 wide: the row reads before → now, + green and − red, nothing
struck, magpie.json Created; the dialog keeps ↺, struck lines and
Deleted. Broken by hand: with origin's app.js and app.css it fails
("settings.json reads before → now"); with only the CSS reverted it
fails on the colours.
Run at
|