ac4af582301a4e8a29245dbba767eba31334ddf9
666
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
bc8b01d603 |
claude: the short system prompt is set in the Claude Code editor, not Settings › Replies
The scattered settings audit after netube99 on X. Short Claude system
prompt and Claude Code's interactive mode changed only Claude
subscription runs, yet sat in Settings › Models › Replies, while the
Claude Code editor already had its own "Claude Code runs as" switch for
the second, whose card said "Switched here or in Settings › Models ›
Replies".
Both rows now go in a claudeRunList in the Claude editor (PROV_PREFS), so
Settings' search still finds them and Open goes to the editor. In the app
the editor's own "runs as" switch is the one shown, and the duplicate
interactive mode row is hidden by CSS; in magpie web as a gateway, where
that switch is disabled, the row shows (the list gets a gw class from
renderReplies: body.gateway-mode is set only on a change, not at boot).
provPrefsField lets Claude's run list through in gateway mode, without
the warm-ups, which are this computer's. The card and the "off" reason
no longer name Settings (zh, zh-TW, ja, de written with them), and the
bridge's subsystem page names the editor.
Run (mote, mote-run, origin/main
|
||
|
|
39569d5604 |
claude desktop: an optional Claude Magpie app beside your own Claude (#5671)
baranwang on X asked to keep Claude Desktop's own (1P, Anthropic) sign-in while using magpie. Turning on "Separate app" in Claude Desktop's row on the Agents page (or `magpie claude-desktop launcher add`) moves magpie's 3P wiring into ~/Library/Application Support/Claude-Magpie-3p and adds ~/Applications/Claude Magpie.app. That launcher opens Claude.app with --user-data-dir on that folder, so it runs side by side with the user's own Claude.app. Its icon is Claude's icon with a magpie badge. Off is the default, and turning it off (`launcher remove`) moves the wiring back and removes the app. It is macOS only: Desktop's packaged app strips CLAUDE_USER_DATA_DIR, and on Windows it hardcodes LOCALAPPDATA\Claude-3p. The folder ends in -3p because Desktop adds -3p to any other name. Restarting the isolated app ends only its own process (pkill on its --user-data-dir) and opens the launcher again. Run at 1b25cda26 (this change on origin/main |
||
|
|
88b541a25c |
images: every pointer names Settings › Models › Images, where the page is
The image models moved under Settings › Models, but the Library's Magpie
Image sheet, the MCP server's instructions to agents, the gateway's
"no image model" errors, the video tool's text and the docs still sent
users to "Settings › Images", a tab that no longer exists (the scattered
settings audit after netube99 on X). Every user-facing string now names
Settings › Models › Images in en, zh, zh-TW, ja and de, as do the site's
Qwen docs (en, zh, ja), llms-full.txt, the subsystem pages and comments.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
ffbc45eac5 |
usage: a breakdown row's second line wraps at every width, not cut at 180px
In a wide window a Usage breakdown row's name column is a fixed 180px
and the line under the name (the sign-in, calls, credits, failures,
TTFT, speed) was one line cut with an ellipsis there, so everything after
the provider was hidden. Only the narrow web layout let it wrap. It now
wraps at every width; the narrow rule that did the same is gone.
Reported-by: shusoyo (Discord #general, 11-09)
Run (mote): usage-stat-sub-wrap.test.cjs 8/8 (chromium, webkit; en, zh;
1440 and 1000px). Broken by hand: with the old app.css it is 0/8 ("the
line wraps, not cut").
|
||
|
|
c7ebb6f8d9 |
settings: Video generation picks the model Magpie Image makes videos with
The same Discord (#feedback) user: a custom provider's video model still couldn't be chosen. A custom provider's video model was already found (seedance, kling, veo, wan, hailuo ids by name, or marked by hand with right-click › Makes › Video model, #1399), but generate_video always used AutoVideomaker's pick, the first video model of the first provider, with nowhere to choose another, as Settings › Images does for images. settings.VideoGen (provider/model or a routing group) is now the model a request that names none makes its video with, while it resolves; else AutoVideomaker's, as before. Image generation turned off turns video off with it, as before. Settings › Models › Images gets a Video generation row under Image generation: Automatic (naming the automatic pick) and every model Magpie Image can make videos with. A pick that no longer makes videos (provider gone or off, model unmarked) says so and the automatic one is used in its place; the settings API refuses a model that makes none, and keeps the pick when a save doesn't send it. The row is drawn by videogen.js, imported when Settings draws Image generation, with one call in app.js: drawn in app.js it put the core scripts 616 bytes over TestCoreScriptBudget (1,534,418 > 1,533,802, found by the first full run), and the budget is not raised. Run on mote: - At this change on |
||
|
|
bceeabd93a |
gui: a subscription's warm-up, check-in and resets are in its provider's editor
The owner, 11-07: "这些配置难道不是应该在对应的Provider那个弹窗里面吗?为什么会散落在Settings里?"
Settings › Allowances no longer holds Codex's auto-use resets and how
early before one expires, Codex's and Claude's warm-ups, or the daily
check-in of WorkBuddy, Trae CN, MiniMax, Qoder and the plugins that check
in themselves. Each is in its own provider's editor (PROV_PREFS: the lists
move from a hidden holder into the editor's .prov-prefs box and back).
Settings' search still finds them, each a row whose Open goes to the
editor. Task-done alerts stay in Settings. "Codex: auto-use resets" and
"Codex: how early before one expires" lose their "Codex:" in the editor.
In the editor a press inside a part that redraws moved the page: the
modal hold moved the dialog, which can't move once it meets the window's
edge, and lost a pressed element a redraw replaced. The hold now scrolls
the editor's body by what is left, and finds the replacement by its path
or by tag, class and text under its id'd ancestor. In a browser the
editor's body keeps its bar's room, as the app's already did: WebKit kept
the grid's columns from before a bar that came with a grown field, and
the editor scrolled 10px sideways.
Budget: app.js grew with the editor's parts; paid for by comments cut
(curlOf, scrollCloses, unrollSheet, quotaRange, ledGroupSpeed, the
Settings tabs, the warm-up and fold notes), no raise.
Run at this head (704fd85f3 before this message, on origin/main):
- mote: go test -count=1 ./internal/gui/ ok (TestCoreScriptBudget
included); go vet ./..., GOOS=windows go vet ./... and GOOS=linux go vet
-tags nogui ./... clean.
- mote: settings-groups and i18n-keys GUI files. i18n-keys' "a plugin's
words are its own" fails the same on origin/main (#5332, #5327, #5482).
- WSL, both engines, the files this can reach, mine vs origin/main
|
||
|
|
26e9c95665 |
settings: the LAN address row has no blank band under it
The owner (11-08): in Settings › Network, under Share on local network,
the Address row had an empty band under the address, so the card's
spacing was uneven. The row places its controls in a fixed height (50px).
With a pointer that hovers,
|
||
|
|
3ab10b2649 |
gui: the Partners light runs round the partners' tiles too, with the heading
The owner asked for the add sheet's whole Partners block to light when it opens, not only its heading (除了合作伙伴这个标题有流光动画之外……这整块位置 是不是也要有一个流光动画), and picked, from three mockups, the outline that runs round the block the way it runs round the heading. Their notes on it: the two play together (标题跟这一块要一起播放); they must not touch, but the sheet's spacing must not change (视觉上这个间隙没有做任何的更改,但是播放流光 动画的时候,它们俩是不挨在一起的); the block's outline starts where the heading's does and has as much room above its words as below. shinePartners now takes the tiles' grid as well as the heading, gives both a glow and a ring, and lights both on the same frame. Both are absolutely placed layers, so nothing on the sheet moves. The tiles' ring sits on the grid's edge (about 9px over and under the names, 8px beside the icons, its left edge on the heading's). There is only 6px between the heading's words' box and the tiles, so the heading's ring now sits 2px closer to its words (inset 19px 0 4px, was 17px 0 1px), which leaves about 4px between the two lines. Same 1.8s trace and glow, a 5% glow under the tiles; none with reduced motion, the system's or Settings'. add-partners-shine.test.cjs now also checks, in Chromium and WebKit, en, zh, ja, de, at 900px and 440px: the tiles' outline plays with the heading's, sits on the grid's edge, starts at the heading outline's left, is at least 3px from it, and that taking both lights away moves neither the heading's words nor any tile (measured after the sheet's own entrance settles); a search's redraw doesn't play it, a reopening does, reduced motion draws no layer in the grid. Run on mote at |
||
|
|
e5b5397c96 |
providers: a model's context window and max output are set in its Model settings row
sayagoodbyeplz on Discord: WorkBuddy's deepseek-v4.1-flash replies 128000 tokens, not the 384000 models.dev lists, and there was no visible place to set that for one model. The editor's Advanced Context window and Max output already took "model=size", but a user looking at the model never saw them. Each model's row in Model settings now has a Context window box and a Max output box beside "Listed as". The placeholder is the listed value (the vendor's list, else models.dev's, within the window), or the "*" value from Advanced when one is set. A value typed there is staged as model=size in Advanced's field, so both say the same thing, and the Save sends it in contexts/outputs as before. An empty box drops the model's own value. A bad value is refused with Advanced's message. Restore default clears both, and its title says so in every language. A classifier-only provider has neither box, as in Advanced. /api/providers gives each model a listedOutput (its reply limit without the user's Max output) so the placeholder doesn't show the user's own value back. The boxes are drawn by modellimits.js, imported when the editor draws a model's row (like keyspend.js), and nine comments in app.js are cut, so the core stays in its budget with no raise (1,533,541 of 1,533,802 on |
||
|
|
b0926e81a2 |
import: a link can say where its key's balance is read (balance=, balance_path=, balance_method=)
A relay's "Add to magpie" link can now name the URL that tells a key its balance, where the amount sits in the reply, and GET or POST. magpie takes it only on the host of one of the link's own base URLs, over https, with no userinfo or fragment, so a link can't send the key anywhere its requests don't already go; anything else refuses the whole link. balance_path or balance_method without balance is an error. No header or token is taken from a link: an account-wide token is worth more than a key, and a URL stays in browser history. - provider.ParseImport: linkBalance checks and sets BalanceURL, BalancePath and BalanceMethod. - CLI: the import preview shows the balance URL and doesn't ask it before yes (showProviderAsking). - GUI: the import dialog shows method, URL and field (.imp-bal). - Docs: docs/import in en, zh and ja (table rows, a note on headers, the builder's three fields with the same host check, a security bullet); docs/reference.md's parameter table. Run on mote at this tree (rebased on |
||
|
|
e215d335a6 |
gateway: a gateway key can cap its requests at once; the rest wait their turn
young02036 on Discord: a provider can be given a concurrency, so why
can't a gateway key? A key now has an optional MaxConcurrency, from 1
to 1000. Left unset (every key today), nothing changes.
- access: Key and Change get MaxConcurrency, and Identity carries it, the
issuer's cap included. The concurrency-key action refuses a value
below 0 or above 1000.
- gateway (key_slots.go): every route that asks a model is held to the
key's cap, however the request came (loopback, LAN, a Remote magpie, a
Responses socket's turn). One request too many waits in the key's
queue in arrival order. It shows as "slot" in Active, and its wait goes
into the try's Queued. A request whose agent goes away while it waits
leaves the queue and sends nothing. A stream holds its slot until it
ends. serve's routes (chat, responses, messages, ollama, gemini, the
Codex backend) wait inside the try, after keepQueued, so a streaming
agent gets keepalives while it waits. The other model routes (images,
embeddings, rerank, audio, videos, search, decisions, native) wait
before their handler runs. forward and codexUpstreamOn take the slot
too, so nothing reaches a vendor without one. A key issued under
another waits for its own slot, then for its issuer's.
/v1/magpie/concurrency lists each capped key under "keys", and counts
its waiters in "waiting". A key's limit (key_limit) reports the cap.
Not held, as a provider's MaxConcurrency doesn't hold them: GET,
HEAD, OPTIONS, count_tokens, :countTokens and MCP.
TestKeySlotEveryRoute fails when a route is judged neither held nor
free.
- cli: magpie gateway-key concurrency <id> [<n>|off]. It refuses 0, a
negative, over 1000, a fraction, a word, --help or an extra argument
with its usage.
- gui: the key row gets a badge in the provider concurrency badge's
style. It opens the app's menu with No limit, 1/2/3/5/10 and Other…,
and Other… takes a number typed in place. A value that isn't a whole
number up to 1000 is refused and nothing is sent. Browser and
read-only keys have no badge. Strings are in en, zh, zh-TW, ja and
de. An unset badge, which a hover shows, gives way before the masked
key (flex-shrink 8). Without that, at 420px in en and de, the extra
badge squeezed the key until its copy button slid under the pointer
that came to drag the row, and gateway-key-arrange went red.
- docs/subsystems/gateway-routing.md describes it.
Run (on mote, at this tree on origin/main 0f8c3d867; rebased onto
|
||
|
|
37df73b1bb |
balance: a key holds several credits that expire, each added and removed on its own
tenacious_eagle_96548 (Discord, 11-08) has two promotional credits on one
key, one ending tomorrow and one the day after. v0.1.3305 kept one grant
per key, and its form showed the date only after Enter or a blur, with no
button to confirm.
- OwnBalance.Expiring is now a list (`expirings`, up to 20). Spending
goes to the grant that ends soonest first (ties by when it was typed),
and each grant drops out at its day. A write prunes ended grants.
- The pill and the menu say "Expires in N days" per grant, amber from 7
days. The menu has a Remove item per grant, "Add credit that
expires…" and "No credit that expires" to clear them all.
- The form shows the amount and the last day together, the day filled in
30 days ahead, with an Add button; Enter adds, Escape cancels, a bad
amount or a past day is refused in place. The app's own menu, no
native select, no stripes. A pill with two or more grants wraps at a
grant on a narrow row (a class, not :has(), for Safari before 15.4).
- CLI: `--expiring amount@day` can be given several times, `--expiring
off` clears all, `--expiring-remove [amount@]day` removes one. --help
prints usage; a day that isn't a date, or is past, is refused.
- /api/provider/keyexpiring adds `{expiring:{amount,until}}`, removes
`{expiring:{at,until},remove:true}`, clears `{expiring:null}`.
Old data: a v0.1.3305 single `expiring` grant is read as the first grant
and saved as `expirings` on the next write, for every user. An older
magpie reading the new file sees no grants (the balance itself stays).
Run on mote at
|
||
|
|
c3a9574de4 |
gui: a key's row keeps its controls shown and stays put under the pointer
tenacious_eagle_96548 (Discord, #general): in a provider's editor a key's row showed its controls only under the pointer, so it kept growing and shrinking, and moving away to fill in something else collapsed it. Cause: app.css (#841) gave a key's unset controls (No limit at once, No spend cap, Set balance, Switch off, Remove) no room off the pointer. A hover made the row wrap from 38px to 59px and pushed the rows below down. With Set balance open and typed into, moving the pointer to the Name field collapsed the other pills, and the field moved 158px right and 25px up under the caret (real magpie web, sandbox HOME on mote). Fix: the list is drawn only in the provider's editor, where every key is there to be set, so a key's row now shows every control, laid out the same under the pointer as off it, as a phone's already did. The name and the masked key stay whole; what doesn't fit beside them goes under the row's first line. The "held" class that kept a clicked row open is gone with what it worked around. Subscription accounts' rows (opacity only, no shift), grips and the ⋯ menu are unchanged. New key-row-steady.test.cjs: chromium and webkit, en/zh/zh-TW/ja/de, app 560/1000px and tab 420/1000px. Every control is shown off the pointer, nothing in any row moves with the pointer over any row, and a balance being typed keeps its place, caret and "100" when the pointer goes to the Name field. key-row-chips-fit's "one line when not hovered" became "laid out the same hovered or not"; stale hover comments updated in key-own-balance, key-spend-cap, key-switch, key-gemini and key-plan. Run (mote, through mote-run, at this head on origin/main |
||
|
|
c736906b17 |
providers: part of a key's typed balance may expire on a day
tenacious_eagle_96548 (Discord, #general): some vendors split a balance
into money that stays and credit good until a date. A key's balance typed
by hand can now carry that part (`expiring`: {amount, until, at}, in the
balance's currency, until = the last day it counts).
- Spending order: the expiring part is spent first, as DeepSeek spends
its granted balance before money topped up. It takes the spend from its
`at` up to its end (midnight after `until`, local time) or now; only
what it took after `From` comes off the rest, so a refill or typing the
balance again doesn't count it twice.
- Left is the whole balance. From its end the remainder counts no more,
and unspent credit is gone.
- Typing the balance again keeps the part in the same currency and drops
it in the other, where its amount would mean another sum.
- A balance saved before has no part and reads exactly as it did
(TestTypedBalanceSavedBeforeExpiring).
- Set from the pill's menu: "Credit that expires…" asks the amount, then
the last day (a day gone by, or the other currency's sign, refused);
"No credit that expires" takes it off. GUI route provider/keyexpiring;
CLI `magpie provider key-balance <id> <key> --expiring amount@yyyy-mm-dd|off`.
- Shown: the pill "≈$100.00 left · $30.00 expires in 30 days", the Usage
page and panel line "Expires in 30 days ≈$30.00", amber from 7 days;
TUI and `magpie quota` "($30.00 until Dec 7)". New strings in zh,
zh-TW, ja and de.
Run (mote):
- go test of internal/provider, internal/gui, internal/cli (with
TestCoreScriptBudget: the days' lines in app.js are paid for by five
balance comments cut there, no raise; core 1,533,559 of 1,533,802); the new tests
again with TZ=UTC and TZ=Pacific/Kiritimati (every clock held);
gofmt -l clean; GOOS=linux and GOOS=windows go vet of those packages.
- GUI: key-balance-expiring.test.cjs 20/20 (chromium and webkit, 400px,
en/zh/zh-TW/ja/de), with every balance-*, key-*, i18n-* file: 768
pass, 6 red, each red the same alone on origin/main
|
||
|
|
5a27348058 |
providers: a key's balance picks its currency beside the field, the number kept
Changing a key's balance from $ to ¥ meant clearing the balance, switching
Settings' currency, then typing it again (a bare number kept the old
balance's currency). The balance field now has a currency button beside it
(USD/CNY, the app's menu, not a native select). It starts at the balance's
own currency, else Settings' one, which stays the default for new
balances. Picking keeps the typed number and posts nothing; Enter or
leaving the field saves, and the pill then reads ≈¥40.00 left. A typed ¥
or $ flips the button as you type. Nothing is reinterpreted: Settings'
currency still never touches a saved balance, and usage and cost displays
are unchanged. No server or API change; keybalance.js is lazy-loaded, so
app.js and the core budget are untouched.
Run (mote):
- key-own-balance.test.cjs: 20 of 20 ok (chromium + webkit, narrow width,
every language), with new cases: $40 → CNY picked → Enter posts
{balance:40,currency:"cny"}; ¥100 → Escape posts nothing; → USD, Tab
away posts {balance:100}; no row runs past the window.
- Whole GUI suite (earlier run at this change): every file ok except
i18n-keys "a plugin's words are its own", red on main already and filed
(#5327, #5332, #5426, #5482).
- Real GUI, sandbox HOME on mote (go build -tags nogui, ports 3591/3592):
typed 40 → ≈$40.00 left; Enter balance…, picked CNY, field kept 40,
Enter → ≈¥40.00 left, no page errors; `magpie provider key-balance`
read ¥40.00 typed. Screenshots taken.
Broken by hand: the old keybalance.js against the new test times out
waiting for the currency button; dropping the blur guard (saving when
focus moves to the button) makes the menu pick time out because the field
saved and redrew under it (chromium and webkit). Both red, restored.
Not run to the end: the full Go and GUI suites are queued under
suite.lock on mote behind ~20 other sessions' suites (~/runs/bc-suite);
no Go file changed. Not tried: the real desktop window, WebKitGTK on
Linux, Windows.
Reported-by: tenacious_eagle_96548
|
||
|
|
d0ce551344 |
providers: a browser editor keeps its place through a refetch
In a browser (web mode) WebKit gave the editor's redrawn body its scroll bar a frame late; with "Model settings" a word shorter than the old label, the foot wrapped differently, the body grew 48px and a place kept at the bottom was clamped (provider-fetch-holds, webkit zh 420px, red at the stack's head only). The body keeps its bar in a browser too, as it already did in the Windows and Linux apps. Broken by hand: without the rule provider-fetch-holds is red in webkit zh 420px; with it provider-fetch-holds and model-api-preset pass 16 of 16 on mote. Run, on this stack over origin/main |
||
|
|
7a6211d047 |
providers: a model's own headers, in Model settings
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 |
||
|
|
b77400826a |
usage: the Overview read again keeps its cards and its place, and shows it is reading
jiabubu on Discord: a refresh of the Usage page's Overview showed nothing while it read, flashed the page and dropped cards for a moment, and pressing Usage again while on the Overview flashed it or moved its scroll. - Pressing Usage again (show() calls the plugin's open, loadUsage(true)) put the skeleton up, which hid the sections, collapsed the page and clamped its scrollTop. loadUsage now puts the skeleton up only for a first read or another period or zone (usageFor/usageKey); a page that already shows that read reads again quietly through refreshUsage, so nothing is blanked and the scroll stays. - The refresh beside the period turns while such a read is out (#usageReload.reading, after 200ms), and while every card is read (loadQuotas) each card's refresh turns (#subscriptionUsage.reading, quotaReading in page.js). A card's own busy turn is left to its own animation (:not(.busy)). No turning under reduced motion. - renderQuotas draws the cards again in one go, as their reset countdowns need, but now keeps their logo nodes (keepIcons), and the Overview's lists do too: a logo made afresh blinked out while its picture loaded. - app.js stays in its budget: a three-line comment in renderQuotas cut to one. Core 1,533,507 of 1,533,802 before the rebase on |
||
|
|
f8525323dd |
providers: a key with no balance URL takes a balance typed by hand, counted down by magpie's own usage
Some API-key providers tell no balance magpie can read (no Balance URL, no relay query found), so their keys showed none. Now the user types what the vendor's page says is left, on the key's row in the provider editor (Set balance) or with `magpie provider key-balance <id> [key [usd|off]]`. The key's card shows that less what magpie's usage priced the calls it sent on the key since it was typed (usage.KeySpent, the spend caps' count), marked as an estimate: "≈$12.50", the pill "≈$12.50 left", its title saying what was typed, when, and what was counted since. Typing it again counts from then; No balance takes it off. A balance the vendor tells always wins: a provider with a Balance URL, a plan source, Cline's or OpenCode Zen's card takes none typed, and a relay whose query is found shows its own; when the probe finds none (errNoBalance) the typed one is shown. A typed balance stays saved as the user left it: the editor's save keeps it, a key's replaced value carries it. An estimate is never kept in the balance history and tells routing nothing (the routing allowances cache is left alone). keybalance.js is loaded by keyspend.js (itself loaded when the editor draws a key) for a provider that takes one, so app.js and the core's script budget are unchanged. Words in zh, zh-TW, ja and de. Run at this tree (mote): - go vet ./... (darwin), GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./... at base 46b10af87; at this tree go vet of gui, provider, cli and usage; - go test -tags nogui -count=1 ./internal/gui ./internal/provider ./internal/cli ./internal/usage: provider and usage ok; gui and cli red only on #5644 below; TestCoreScriptBudget ok (1,533,747, as main) - the provider tests under -race -count=3; - GUI: key-own-balance (new: Chromium and WebKit, en zh zh-TW ja de, 900 and 400px, 20/20), key-spend-cap, old-webkit, i18n-keys, gui-de, gui-ja, gui-zh-tw, balance-found, key-balance-card, i18n-en-no-cjk: 104 pass, 1 fail, i18n-keys "a plugin's words are its own", red the same on origin/main |
||
|
|
2d5d1c1d25 |
gui: a long menu scrolls under the page's thin thumb on a Mac too
The owner: Settings' Search API menu showed a thick dark scrollbar on a Mac. The thin thumb on a Mac covered pages, dialogs, framed editors and the heatmap only; a menu (.pop.proto-menu, .pop.row-menu) and a picker's list (.pop ul) were left to the system's bar, which with a mouse or "Show scroll bars: Always" is the classic wide one with a dark track. They now take the same 8px thumb. Windows and Linux had it already. Run at this head (rebased on |
||
|
|
60cb1bd9e1 |
usage: Hide accounts and Used/Left stand apart in the Allowances head
The owner's screenshot: 「账号打码」 sat flush against the Used/Left
segments (这两个之间竟然没有空隙,贴在一起了). Only the trend's range had a
margin; the mask button, added beside it later, had none. The head is now
spaced by a gap of 8px between each control, in place of that one margin.
Run (mote, at 2b3f76d88; the new test again 20/20 rebased on
|
||
|
|
784113472d |
gui: motion answers sooner: strong ease-out, folds and popovers under 300ms, no scale(0)
The owner asked for every animation to follow Emil Kowalski's "make your app feel faster" rules (x.com/emilkowalski/status/2118687605776597482): ease-out for anything the user starts, a strong curve over the stock one, and UI motion under ~300ms. Spinners, attention flashes, decorative loops and the chart intros are left as they were. - New token --ease-out: cubic-bezier(.23, 1, .32, 1); --morph-ease is now the strong ease-in-out (.77, 0, .175, 1). - Agents' fold, and the panel's edge that moves with it (UNROLL/ROLLUP): .62s/.42s -> .34s/.26s on --ease-out; its rows .56s with a 48ms stagger -> .32s with 24ms. - An agent row's details (ROW_OPEN/ROW_CLOSE, .ag-open, .ag-body): .48s/.40s -> .32s/.26s. The curve stays the gentle-start spring the comment chose so the panel's edge keeps up; only the time is shorter. - Hover reveal of a row's menu: up to .52s -> .28s. Chevrons .3-.5s -> .22-.32s. - Popovers: pop-in .42s -> .24s; pop-out was .22s on an ease-in curve, now .15s ease-out. - The new-dot started from scale(0); it starts at scale(.5), opacity 0. - Sheets, sidebar sub-lists, modals (.57s -> .44s open, .38s -> .30s close), Context tiles and fades, plugin cards: 460-620ms -> 240-400ms. - Theme crossfade .35s -> .25s; copied/new-account pops .36-.5s -> .26-.3s. Run on the Linux VM (magpie-desktop, WSL), both engines, every language: - Whole GUI suite at this change: 21559 pass, 431 fail of 21990. The run overlapped another session's suite (15-minute load 39). #5559 has 478 of 21666 red on this VM at main. - 17 files that touch the changed motion (model-chip-steady, page-width-steady, zero-priced-free, segs-press-redraw, rest-try-now, provider-fetch-again, codex-predictions, side-toggle, tray-cell-click, menu-input-scroll, agent-details-ready, agent-expand-steady, held-animations, group-morph, header-centre, inner-scroll-contain, recovered-file), concurrency 2, at the parent |
||
|
|
c8eb7b3877 |
search: a search API's keys are a list, each switched off, moved and removed on its own
Web search took one key per API in one field (辰林鸭~ on Discord: only one
Tavily key). Settings › Models › Web search now lists an API's keys under
it as a provider's accounts are: each masked on its own row with a tick
(off / on), Show, Copy and Remove; several pasted at once (commas,
semicolons, lines), the reply saying how many were new and how many it
had; the order changed by dragging or Alt+↑/↓. A resting key says why and
until when on its row ("asked last until 14:05: rate limited"), from the
gateway's rest (SearchKeyRest, SearchQuota.Ref); rotation on 401/403,
402/432/433 and 429 (#1477) is unchanged.
provider.SearchAPI keeps Key as the keys on, comma-joined, so the gateway
and an older magpie never ask one switched off; keyList is written only
while a key is off. A Key that differs from the list (an older magpie, a
sync) wins, its keys on in its order, the list's off keys after. The last
key on can't be switched off or removed. The GUI names a key by
SearchKeyRef (a hash): POST /api/settings/search-keys (add, ref+on,
ref+remove, arrange) and /api/settings/search-key with ref. Saving an API
with no key keeps its keys, off ones too. Backup and WebDAV sync carry
the off keys, or leave them out with the rest. `magpie search` says
"+N off". docs/subsystems/gateway-routing.md has "The keys as a list".
Run (mote, at this tree, base
|
||
|
|
9072e2b888 |
settings: Sync's backup versions fold under Versions, its count and newest in sight (chen2652)
Settings › Sync › Back up by itself listed every kept version, each a row
with Restore…, and the list grows with Versions kept (up to 30). Now the
Versions row folds them: its name carries a chevron (turned down while
open), its name or the line under it opens and folds the list in place,
and the fold is kept over Sync's redraws for the window's life (closed at
first). The keyboard's focus stays on the fold over the redraw. Restore…,
Back up now and the restore's report are as before.
That line, "{n} backups · newest {when}", was one of the hint lines
Settings hides on a hover screen since 11-02, so on a desktop the count
and newest showed nowhere; it is a state, so it carries .say and stays in
sight. No new strings (the fold's text is Versions). Chevron turns in
.15s ease-out, none under reduced motion; no select, borders or gradients.
docs/subsystems/sync-backup.md says it.
Run on mote:
- auto-backup.test.cjs and sync-signins.test.cjs: 42 of 42 pass
(Chromium and WebKit, 1100 and 420px, en zh zh-TW ja de). The new
checks: the Versions line is in sight, the list folded at first, opened
by its line with the page not moving (view scrollTop and the row's top
the same 300ms on), folded by the chevron, opened by Enter with focus
kept.
- Broken by hand: origin/main's autobackup.js and app.css under the new
test: 11 of 11 red in Chromium (the line is a 1x1 hint, no fold).
- Full GUI suite, go vet ./... and go test -timeout 45m ./... (under
lockf ~/suite.lock): not a valid run. mote's disk filled during it
(138MiB free, 22GB in its temp folder): 8,673 ENOSPC failures, vet and
go test could not write their builds. The reds that weren't ENOSPC are
in files this change doesn't touch: account-eye, codex-auto-reset,
gateway-caller-keys, gateway-key-models, header-centre, i18n-keys ("a
plugin's words are its own": three plugin words also in Go files) and
key-replace; not checked on origin/main, as mote had no room.
Not tried: the real app, a touch screen (where hints aren't hidden), the
full suites (above).
Reported-by: chen2652 (Discord)
|
||
|
|
8de63c8b5a |
gateway, usage, gui, otlp: a request its agent canceled is no failure (#2398)
An agent that cancels its request before it is answered is logged 499 "the agent canceled the request": a person stops the reply, or sends the next message while it is coming and Claude Desktop cancels it and asks again, or Codex takes a subagent's report (#2398). The gateway already says nobody failed (no rest, no reroute: TestCanceledRequestRestsNobody), but Record.Failed is a status >= 400 or an error, so every page counted it as a failure: the Requests card's "N failed" and success share, its Failed filter, the CSV's error column, the Routing page's "errors your agent saw", the Context page's error rate, the failed colour in the Requests list, Routing and Recent calls, and the OTLP export's error status. A Claude Desktop session on 2026-10-27 had four, each a message sent mid-reply; #2398 had 91 of a day's 92 failures. usage.CanceledBy tells the agent's cancel (499 with AgentCanceled) from magpie's own limit on a request it asked of itself, logged 499 too and still a failure (#2318). The cancel is logged with an error type of its own, agent_canceled (usage.CanceledErrType, set in failedWith), so the record says what it was and nothing guesses it from a 499, as #2398 asked. Record.Canceled reads the type, and a record logged before it by its status and message, so the old log reads the same with nothing migrated. A middleware's usage rows carry the type, so a module can tell the cancel from magpie's own limit, which its rows (no error text) couldn't. Record.Failed leaves the cancel out; Totals counts it apart (Canceled, in count and plus); RetriedRequest and the first-token and speed sums ask Answered, so a canceled request is timed nowhere, as before; Codex's memory of the last model still skips it. Routes and Recent calls say canceled (set as a route is done and as a day's history is read, so old days read the same); the Routing totals and the Context page's errors leave it out. Ledger rows say canceled, and the pages show it muted, in neither the failed nor the answered colour: the Requests list and its detail ("499 · canceled"), the Requests card ("N canceled", the success share of the requests not canceled), the overview tile, the Routing page (a "gone" outcome, no speed) and Recent calls (muted). New strings are in zh, zh-TW, ja and de. The OTLP export: the records the gateway gives its observers for a request and its try carry the type too (canceledAs), and a root span's error.type follows Record.Failed, so a canceled request's span and its try's go with status code 499, no error and no error.type. TestOTelWaterfallFailureAndCancellation's canceled case held two failed spans (the try the vendor refused as the agent left is recorded canceled, as the request is); it now holds neither failed, both 499 and no error.type. That change to the test is the point of this one. mdwsk88's patch (aea0027fd) ran its tests at |
||
|
|
542ee03b4c |
usage: each request says its cache hit rate, as the Routing page's do
teenux (Discord, #feedback) saw a cache hit rate on each request in the
Routing page's list but none on the Usage page's Requests tab. Each
Usage request now has a Cache hit rate column after Cache read, worked
out as Routing's request list does (promptOf in routing/client.js): the
tokens read from the cache over the whole prompt, uncached input plus
cache reads and writes, through app.js's cacheHitOf. It is said as
Routing says it, a whole percent ("90%"), with Routing's tooltip ("Cache
hit rate: The share of the prompt read from the cache"). A vendor that
counts no cache (cache_unknown, #3464) reads "—" with "The vendor
doesn't count the cache"; a request with no prompt counted reads "—"; a
miss reads 0%. The row's own fields only: nothing new is fetched.
Folding: at the page's 1200px cap the raw cache columns are usually out
already (tight), so the hit rate folds with the first token's column
(lc-opt2, tight2) rather than with them; while it is out the row's
details say it, and while it is in they don't say it twice. Every
string already had its zh, zh-TW, ja and de, so no i18n entries were
added.
Not the same: for a request with billable retries Routing sums every
try's usage, and a Usage row holds one usage record, so the two can
differ there.
Run on mote (macOS 27), Chromium and WebKit, five languages:
- new internal/gui/tests/ledger-cache-hit.test.cjs: 12/12 ok
- 65 GUI files the change reaches (this one included) (every test touching the ledger
table, its details or the Requests tab) plus i18n-keys and
i18n-en-no-cjk: 1147 of 1165 ok. Reds, all filed and not from this
change: i18n-keys "a plugin's words are its own" (#5327, #5332,
#5426, #5482), gateway-caller-keys en at 560px (#3797),
usage-ledger "newest live route needs no return-to-live button"
(#3104, #4078). Two more reds were this change's and are fixed here:
usage-ledger's header list and usage-ledger-detail's always-shown
labels (now leaving lc-opt2 out, as they left lc-opt out);
usage-ledger-ttft's lc-opt2 header locator now names its column.
Rerun of usage-ledger, usage-ledger-detail and ledger-cache-hit:
only the two filed return-to-live subtests red.
- go test -tags nogui ./internal/gui/ (TestCoreScriptBudget and the
other budgets): ok. No Go changed, so no gofmt/vet.
Broken by hand: origin/main's page.js -> ledger-cache-hit red ("a
Cache hit rate column"); the rate as cache_read / in (Routing's
denominator dropped) -> red on the values (deepEqual).
Not tried: the real app with real history; Windows and Linux GUIs.
Reported-by: teenux (Discord)
|
||
|
|
d55881730d |
gateway: a key can be held to some MCP servers and tools
wakaka on Discord (#help, 11-06) asked for gateway keys limited to some MCP servers and tools, as keys already are to models (#882). A key's MCP list (caller-keys.json "mcp") holds entries "server" (every tool of it) or "server/tool"; "-" alone is no MCP server; an empty list is every server, as before. A key issued under another is held to its issuer's list too. Every MCP route checks it: - magpie's own servers (web search, vision, image, Magpie Browser, plugin tools) through serveMCP: initialize/tools/list/tools/call are refused or filtered per server and tool, and /v1/magpie/key-limits names "mcp"; - the Library hub ("magpie"): only the backing servers and tools the key may use are listed, and a call by name or by fallback is refused; - /mcp/<name> and /mcp/run/<name>: the server is refused, tools/list is filtered in JSON and SSE replies, tools/call refused; a reply the filter can't read (an encoded body) is a 502, never passed through. GUI: "MCP servers" in the key row's menu opens the app's own picker (no native select) with All, No MCP server, each server and its tools (GET /api/caller-keys/mcp lists magpie's own servers and the Library's). A key held to some shows a badge saying which, that opens the same list; a free key shows nothing more in its row, on hover either. A hover badge was tried first: it pushed the row past 560px (gateway-caller-keys) and squeezed the masked key under a drag at 420px (gateway-key-arrange). CLI: magpie gateway-key mcp <id> github fs/read_file | none | all. zh, zh-TW, ja, de strings; docs/reference.md and the gateway-routing and library subsystem pages. Not covered: a model's own built-in web search (a vendor tool, not MCP). GET /api/caller-keys/mcp is named in the CLI parity test's notYet (its list is what `magpie gateway-key mcp` takes; TestEveryRouteHasACommandOrIsNamed caught it at the rebased head). Run on mote (mote-run), at the pushed head: - go test ./internal/access ./internal/cli ./internal/gui ./internal/library ./internal/gateway at a9c40186d (this change on |
||
|
|
54dc257f10 |
gui: a Mac window out of sight 30s lets go of its layers (#5530)
A window hidden with orderOut keeps every layer's buffers in WebContent:
WebKit stops drawing a hidden page but holds what it last drew. The
reporter's hidden window held 1133 MB of graphics in 335 buffers
(140 RenderLayerBacking), and it stayed after 90s idle.
Out of sight 30s (the window only, never the tray panel), the page gets
magpie-asleep: content-visibility: hidden on body, laid out at once,
since a hidden page runs no rendering update of its own. WebKit then
drops every layer but the root's. Shown again, the class goes as the window
is told it is back, and the content and scroll positions are as they
were. Telling the page before Show was tried and left out: the page then
reads WebKit's own document.hidden, still true, as it is told it is shown
(TestPanelHiddenByWailsMarksPageOutOfSight went red). Shown within 30s, nothing
changes.
Measured on mote (macOS 27.2, 1x display, real `make app` build, sandbox
HOME, window 1470x820, 40 providers x 30 models; WebKit's occlusion check
turned off in the probe since mote's screen is locked, else the page never
draws at all):
- Plugins (688 buttons), hidden: before 50 PlatformCALayerRemote, 10
RenderLayerBacking, 27.0 MB dirty graphics, unchanged at 70s (control,
sleep cleared); after 30s asleep 19 / 1, 20.3 MB.
- Providers (280 buttons): 43 / 7, 14.4 MB hidden; asleep 16 / 1 but
18.4 MB: the root tiles are drawn again blank and are no longer
volatile, which costs about one window's tiles when a page has few
layers. It saves every other layer's buffers, which is the reporter's
case.
- Shown again: 50 / 10 layers, frames running, content and scroll kept.
Not reproduced: the reporter's 140 large backings; which page made them is
asked on the issue. Taking the webview out of its window while hidden
freed 5 MB more and was left out (a native change for little).
Ran on mote: window-asleep (new), window-visibility and held-animations
in chromium and webkit, all ok. Broken by hand, each red in both engines
in the test that guards it: no sleep timer (the 30s test), the panel put
asleep too (the panel test), the timer not cleared when shown (the
shown-within-30s test). go test ./internal/gui: ok but
TestMainWindowCorners, red the same at origin/main
|
||
|
|
80ae904c23 |
routing: routing groups get a page of their own, beside Routing
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 ( |
||
|
|
1f439ecc5e |
gateway keys: a limit can count only some models or providers (zola_xynb)
zola_xynb on X asked for a cap per model or per provider under one gateway key. A key limit can now name models (access.Limit.Models, "<provider>/<model>" or "<provider>/*"), so one key can have, for example, a month of $20 on openai/* next to a month for the whole key. Limits without models still cover the whole key, as before. - budget: sums are kept per window and scope, and count a ledger row only when its provider/model matches (any of the model's ids). reserve holds a request to a scoped limit only when the model it names is served there. windowsOf keeps every scope's sums, so the ledger is not read again on each request. - gateway: keyLimited puts the key's spent scopes on the caller (withSpent), count_tokens included. A direct request for a spent model gets a 429 with Retry-After and no X-Magpie-Limit-Reset, so a remote magpie rests only that model. A routing group, a provider's fallback and embedding/image/video/decision groups skip spent members (groupKeeps, allowedCandidates) and get a 429 only when none is left. System One, count_tokens and magpie's own calls for the key are held too. Model lists are unchanged. A refusal turned away before routing now records its ErrType in the ledger. - CLI: magpie gateway-key limit <id> add month --cost 20 --model openai/* (--model repeatable, --models a,b). - GUI: the key limit editor has a Models field that opens the app menu (multi-pick: All models, every model of a provider, each model). It has no <select> and no new screen. The badge, line and tabs name the models. Strings are in every language. - docs: reference.md and subsystems/gateway-routing.md. Run at d52725d32 (this change on |
||
|
|
251cce2059 |
usage: a click on All N accounts folds that provider's accounts under it (justfreefall on X)
justfreefall on X (CODEX (2), "既然已经有汇总信息了,能不能出个按钮把下面两个折叠?"): the All N accounts strip already sums the accounts, so its accounts can go. The strip gets the per-account card's own chevron (quota-acct-fold, aria-expanded, Fold/Unfold title, no new strings). A click on the strip or the chevron, or Enter/Space on the chevron, folds that provider's account cards in the Usage page and in the tray panel's Allowances; again unfolds. Default open. Kept per provider in localStorage magpie.usageAllFolded beside the other view choices, and a storage event redraws the other window. The head's "Show ..." button stays in its room, hidden and inert, so the strip does not move under the pointer. A menu-bar cell that asks for one folded account unfolds them first (focusQuotaCard). quotaall.js reads the choice on first use, so loading it touches no app.js global (usage-merge runs it in a bare vm). Core script budget: not raised. app.js +35 bytes, met by shortening comments. Run (mote, macOS 27, unless said): - go test -tags nogui ./internal/gui/: ok at the rebased head (130s); Budget tests again after the last edit: ok. gofmt -l: clean. - usage-all-fold.test.cjs (new): 10/10, chromium + webkit x en zh zh-TW ja de, window 440x520 and panel 360x760. Broken by hand: with main's assets it is red (no .quota-all-fold). - usage-merge, usage-all-fold, tray-cell-click, quota-caption-contrast, old-webkit after the last edit: all ok except tray-cell-click 4/4, red the same at origin/main |
||
|
|
640825b09a |
usage: the Requests card's traffic line reads whole, and a row says how many images went by file
matrix0487 on Discord:
- The Requests card's line "↑ 13 GB · ↓ 13 MB · 图片文件省下 44…" was cut
with an ellipsis. It was one nowrap span.
- A row's details say "图片文件省下 10 MB" and should say "10 MB(3 张)".
The card line is now made of whole parts (usageParts, the pattern the
token line has since #2378). A card too narrow for all three puts the
saving on a line of its own. A part that is wider than the card by
itself (German at 420 wide) wraps inside itself; it is never cut.
The count:
- withDeepSeekFiles counts the image blocks it puts a file id in place
of, on each try, and upBytes keeps the most of any one try (a retry
sends the same images again, as the saved bytes are counted).
- It goes into usage.Record as `image_files` (omitempty) beside
image_files_saved.
- packedRow keeps Tries and ImageFiles in int16 each (clamped to
MaxInt16), so the row stays 152 bytes. request_snapshot carries the
new field, and heat_disk hashes Tries as before.
- The detail row says "{size} ({n} image|images)": zh "10 MB(3 张)",
zh-TW 張, ja 枚, de "Bild/Bilder", en "image/images".
- A row from before the count was kept has no image_files and shows
the size alone, with no parentheses. The card's period total gets no
count.
Run on mote, at this tree:
- gofmt -l (clean), go vet ./..., GOOS=linux go vet -tags nogui ./...,
GOOS=windows go vet ./..., go build ./...: ok.
- go test -run 'TestRowImageFilesKept|TestRowBytesKept|TestRowsOfOneSession|
TestDeepSeek|Snapshot|Heat' ./internal/usage ./internal/gateway: ok.
- TestRowImageFilesKept: the count survives pack/unpack beside Tries,
100000 clamps to 32767, an old row reads 0, the JSON has
"image_files":3 and leaves out 0, and packedRow is 152 bytes.
- TestDeepSeekImageFilesCountedInRow: two images in one message and
one again in a later message make 3 in the stored row, twice, and a
request with no image makes 0.
- GUI, BROWSER=chromium and webkit: usage-ledger-bytes runs every
language at 1180 and 420. The 3-image and 1-image rows read in each
language's unit, singular in en and de, and the old row stays bare.
The reporter's period (13 GB, 13 MB, 44 MB) at 1180, 760 and 420 has
every part whole and inside its card.
- The 79 usage-*/led* GUI files (concurrency 2): 641 of 659 pass in
chromium and 637 of 654 in webkit. Every red is filed and red on
origin/main
|
||
|
|
07fd06b4b5 |
usage: a narrow Requests list says each request's first token under its duration
Requests has a TTFT column (#2522), but it is the first column a narrow window leaves out (tight2), and then the value was only in the row's details. unscientific9 asked to see it in the list itself. Now, while that column is left out, each duration cell gets a second, small, muted line: "首字 5.5 秒" / "TTFT 5.5 s" (the core's "TTFT {ms}" string, "≈" for a time told from a session file). app.css draws it from a data-ttft attribute with ::after. That keeps it out of the cell's text, so readers of td.duration's textContent are unchanged. A row with no first token (a failure, or a reply not streamed) gets nothing. A wide window shows only the column, as before. The narrow hint now names only what is left in the details ("Sent, Effort and the cache"). The old "…the first token…" string is gone from all four languages. Run on mote, at this tree: - usage-ledger-ttft, usage-speed, usage-ledger-detail, session-identity, usage-ledger-bytes and i18n-keys, BROWSER=chromium and webkit: all pass except i18n-keys "a plugin's words are its own". That test is red on origin/main for "View routing" and "No session ID" (#5332, #5426), strings this change does not touch. - usage-ledger-ttft runs every language (en, zh, zh-TW, ja, de) at 1600, 760 and 420 wide. At 1600 nothing is under the duration. At 760 the line is the details' first token, "≈" for the Codex row, empty for a failure and for a reply not streamed, smaller than the duration, muted, and the page doesn't scroll sideways. At 420 the same holds. - The 79 usage-*/led* GUI files in both engines (see the next commit). - Broken by hand: with the data-ttft line skipped, usage-ledger-ttft goes red in every language ("expected 'TTFT 5.5 s', actual ''"). Not tried: the real app's WebKitGTK on Linux, and the Windows webview. Reported-by: unscientific9 |
||
|
|
08982805eb |
gui: spinners stand still under reduced motion instead of flickering
_yukirock on X (0.1.3036, macOS 27.3): spinners ran far too fast. The
reduced-motion rule cut every animation to .01ms but left endless ones
endless, so a spinner restarted every few microseconds and each frame
caught it at a random angle (seen frame by frame in the reporter's
video: the arc jumps 90-180 degrees per 60fps frame). It hits anyone
with the system's Reduce Motion, or magpie's own (Settings > General).
The rule now also sets animation-iteration-count: 1, so an endless
animation runs once, ends at once and shows its base style, as the
spinners that declare `animation: none` there already did (ag-up,
quota-refresh, saving). routing.css's busy spinner asked for a 2s turn
under reduced motion; the global !important rule always overrode it, and
it now stands still with the rest.
reduce-motion.test.cjs puts a sign-in spinner in the page and waits up to
1s for its animations to finish: they do while motion is reduced, and
never otherwise. (Counting running animations two frames on was red in
Chromium at the rebased head: a compositor animation can take longer to
start.)
Run on mote (Chromium and WebKit):
- reduce-motion plus every GUI file that reads animations under reduced
motion (33 files, 1034 tests): 1011 pass, 23 fail. The failing four
files (context-map, found-skill-pick-remove, mobile-web,
tray-cell-click) fail the same on origin/main
|
||
|
|
b95a78d43c |
gui: the editor says where magpie found a relay's balance, with Use
A relay added by hand with no Balance URL has its balance found by magpie, but nothing in the window said so. A user who saw a wrong amount couldn't tell it was a guess or where to put it right. Under the Balance URL, in Advanced, the editor now shows "Found by magpie: <url> <field>" with Use, which copies the query into the Balance URL and Balance field to be changed. Check balance draws the line again from what it found, and when it found nothing it says "No balance at /v1/usage or /api/usage/token" instead of "No Balance URL to ask". /api/providers carries balanceFound and balanceFoundField. The check's reply carries looked, found and foundField. The line is in balfound.js, loaded when the editor draws a relay's balance with no Balance URL. Its one call and the check's text in app.js are paid for by three provider editor comments cut down, so there is no raise: the core is 1,533,452, 350 under its budget. zh, zh-TW, ja and de are translated. Run on mote: - go test -count=1 -timeout 45m ./internal/gui: ok, except TestMainWindowCorners/macOS_26_SDK, mote's macOS 27 (#3949). - GUI, both engines: balance-found (new, 900px and 420px, every language) 22/22. balance-url-first, balance-fix, balance-method, balance-field-default, key-balance-card and old-webkit: ok. i18n-keys: "a plugin's words are its own" is red (#5327), as on main. Broken by hand: with the import taken out of app.js, balance-found is 0/11 in chromium. Not tried: the whole GUI suite at this head (run after the push), and the real app with a real relay. |
||
|
|
e2aaf21f73 |
gui: a custom provider's Balance URL is asked above its balance token
A relay's user wanting their balance opened the editor and found "Account balance" asking for a new-api System Access Token or a sub2api JWT and user id, while the setting that worked (Balance URL https://app.yylx.io/v1/usage, token left empty) sat at the foot of the form under More endpoints (小鱼 of yylx.io, WeChat, 11-05). The Balance URL and Balance field now sit right above Account balance in Advanced (balSlot), and Advanced opens when a Balance URL is saved. The token's hint says first to leave it empty, that most relays tell a key's balance at the Balance URL above (sub2api's …/v1/usage, new-api's …/api/usage/token), and only then what the token is for. zh, zh-TW, ja and de have it. In Advanced's narrower column the method picker and URL wrap, so the URL keeps at least 120px at 420px. Run (mote, Playwright 1.62.0): - balance-url-first (new), balance-fix, balance-method and the other balance-* files: 186/186 in Chromium and WebKit, at 900 and 420px, en/zh/zh-TW/ja/de. - The whole GUI suite, cut short after 733 tests (it ran for hours beside other sessions): red only in account-eye chromium en/ja (#5052) and account-weight webkit ja 390 (#4644), both open and in files this change doesn't reach. - i18n-keys: "a plugin's words are its own" red, the same on main (#5327). TestCoreScriptBudget: the hint took the core 494 bytes over its budget; five comments in the provider editor were cut (573 bytes), so it is 79 under, with no raise. - go test ./internal/provider ./internal/gui ./internal/cli ./internal/tui at the rebased head: ok but internal/gui's TestMainWindowCorners on mote's macOS 27 (#3949, open) and the budget before the cut. Broken by hand: balance-url-first on the old app.js fails at "a saved Balance URL opens Advanced" (chromium). Filed: #5336, Advanced is 46px too wide at 420px on main (the Rests tick's label); the new test checks only the balance rows for it. Not tried: the real app on Linux (WebKitGTK); no motion or new API here. |
||
|
|
1826c4bd99 |
providers: a Remote magpie that is this magpie says so and is left out, unless kept (hanslin1666)
B uses A through a Remote magpie provider, and sync carries that
provider to A, where it points at A. Each of its models was one of A's
own, listed again beside it and taken by A's found groups, and a request
through it passed through A's gateway twice.
A fetch of a Remote magpie's list now reads its models' magpie_via: when
the magpie that listed them (the last entry) is this magpie's own
catalog.Self, remote-self.json keeps the provider id and the address it
answered at (noteSelf). Another lister, or a list with no via, takes
the record away; an empty list or a failed fetch changes nothing; a
provider moved to another address is not self until a fetch there says
so. The file is this computer's own, never in a backup or sync.
Such a provider is left out (SelfLeftOut in On, SwitchedOff and
remoteMagpies): not in /v1/models, the catalog or a found group. A
request naming one of its models, an agent's pick synced from B, is
served here with the remote's id taken off (ThroughSelf in Resolve and
ResolveRoute), once through the gateway. A 404 for it says why and how
to keep it.
The Providers row shows "This magpie" (greyed while left out), with the
reason as its title; the editor has a note and a "Use it anyway" tick
(KeepSelf, POST /api/provider/keepself). KeepSelf belongs to the user
and to this computer: Mirror and Restore keep the local value (false for
a provider new here), davsync's hashes blank it, and a provider save
keeps it. Strings in en, zh, zh-TW, ja, de.
Docs: providers-accounts.md (two magpies row), sync-backup.md (what
stays on each computer).
Run at this tree on origin/main
|
||
|
|
d02b8a000e |
gui: an agent's own models' section says it is the agent's own sign-in (maxleebeta)
An agent's model picker (Pi and every agent with own-provider groups)
lists the providers the agent is signed in to itself below magpie's
models. Their section header was only the vendor's name, e.g. "OPENCODE
GO", the same as the user's magpie provider of that name, so maxleebeta
read Pi's own OpenCode Go list as magpie ignoring the one model picked
for magpie's OpenCode Go.
A section of direct options (Option.Direct) not already named for the
agent now reads "OpenCode Go · Pi's own sign-in" ("OpenCode Go · Pi 自己的
登录"), in sentence case, faint like the header, no accent. Its key is
distinct, so magpie's and the agent's own groups of one vendor are two
headers. Claude Code's "Claude Code" groups (named for the agent)
are unchanged. New string in zh, zh-TW, ja, de.
Run (mote, playwright chromium + webkit):
- agent-own-direct.test.cjs, extended: headings are exactly
["OpenCode Go", "OpenCode Go · <own sign-in>"], the own one between
magpie's and Pi's models, no text-transform, same height as magpie's
header, no left border or background image; 20/20 (both engines x
en/zh/zh-TW/ja/de x 980/420). i18n-keys, claude-picker-fold,
claude-picker-magpie-first, rail-tip green.
- Broken by hand (chromium en 980): suffix never added -> red; header
key not distinct -> red (headings ["DeepSeek","OpenCode Go"]).
- Whole GUI suite on WSL magpie-desktop (mote was at load ~600):
19,997 tests, 538 fail across 125 files. Those 125 files rerun at
main
|
||
|
|
083821dc96 |
plugins: a search entry can use the plugin's own sign-in, with its own rests
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
|
||
|
|
0ebe6c72c9 |
providers: each account row in the editor has its own Check in now, when the check-in reaches it and it isn't in today (xwoffice_91592 on Discord)
xwoffice_91592 asked for 立即签到 on each account in the provider editor
sheet (Trae CN, a plugin's subscription, one row per account with its
Credits line). The editor's rows read GET /api/login/usage, which carried
no check-in. It now passes those cards through provider.LoginCheckins,
which marks them as the Usage page's cards are (WithCheckins: checkins,
checkinBy, checkin, checkinOff) and adds checkinKey, the account's key
in its vendor's check-in (markCheckins sets it).
The row's button is Settings' Check in now for one account (xiaowu_95660),
not a fork. ciAcctFill in checkinnow.js presses ciNowSend with
{key, user} and checkinBy, so the same POST /api/usage/checkin-account,
the same status-line success and failure, then the row's usage is read
again. When to show it is checkinDue, taken out of checkinRow so the
Usage card's press and the row decide alike: the check-in reaches it, it
isn't off, and it isn't in today (a failed day, an "again" answer, or a
Qoder campaign not open yet still count as due). It sits at the end of
the account's usage line, small (.ci-acct), and wraps whole there rather
than being cut. app.js is 51 bytes smaller (comments cut); checkinnow.js
is lazy and not in the core.
Run (mote, worktree at origin/main
|
||
|
|
95a0ee1b9e |
providers: a long model id no longer squeezes its name field away in Names, prices & levels (#5170, chiperman)
chiperman's case: beside deepseek-v4-1-flash-economy-20261017 the model's display-name field shrank to ~20px at 900px wide (77-94px at 400px), too small to click. The field could shrink to nothing (min-width: 0) while the id beside it kept its whole width. The field now keeps a 96px floor. It still fills only the room the id leaves (flex: 1, basis 0, up to 220px), so a long id gives way after the field reaches 96px and ends in an ellipsis. A short id is shown whole as before. Ported from chiperman's 8691d31 (issue thread; PRs are collaborators-only), with one change. Their `flex: 0 1 220px` made the field and the id shrink together, so a short id that fit was cut: "example" went 48 -> 41px at 1100px in WebKit, and readable-focus's "selecting a model ID" went red in WebKit (selection ran past the cut id). Only the min-width is raised here. Their regression test is kept (the reporter's id in provider-same-as at 900px). Added: one test per engine, at 400/900/1440px in en, zh, zh-TW, ja and de. It checks the field is >= 96px, the id is beside it, inside the row and ellipsized, and that a short id is shown whole. Run on mote (macOS 27, Playwright 1.62.0, chromium + webkit), at |
||
|
|
7033f50722 |
gui: the panel opens the main window from its edge nearest the tray
isaac_bai on Discord, after v0.1.2857 named the header's icon "Open the
main window": with Windows' taskbar at the bottom, the panel stands above
the tray and its header is the panel's whole height from the icon; the
button left of Quit was where his pointer already was. yogurt36 had asked
for one opener, not two, so the panel still has exactly one, now on the
edge nearest the tray:
- Hung below its icon (the Mac's menu bar, a taskbar or bar at the top)
it is the header's icon, as before.
- Standing above it (Windows' bottom taskbar, a bottom panel on Linux) it
is "Open the main window" left of Quit in the foot (#openMain), and the
header has no icon. The string is the one the icon's name already
uses, in all five languages.
Which side: once togglePanelNow has placed and shown the panel,
tellPanelSide reads the panel's bounds and its screen's and sends
magpiePanelOpenAt("foot") when the panel is nearer the screen's bottom,
"head" otherwise (panelOpenAt, panelside.go; the Mac is always "head").
Under Wayland a window can't read where the compositor put it, so there,
and until the app says, layout.js sets body[data-open-at] by the system:
"foot" on Windows, "head" elsewhere. CSS shows one of the two from it.
Tests:
- TestPanelOpensTheWindowFromTheEdgeNearestTheTray: Windows bottom/top
taskbar, a tall panel, a second screen above the first, Linux X11
bottom/top, Wayland, a screen not read, the Mac, unknown places; only
"head" or "foot" reach the page.
- TestPanelToldItsSideWhenShown: both show paths in togglePanelNow call
tellPanelSide after placing; app.js has magpiePanelOpenAt.
- panel-open-once.test.cjs, Chromium and WebKit x en/zh/zh-TW/ja/de:
on a Mac platform exactly one opener, the header's, named per
language, opening /api/window/main, foot ["profBtn","quit"]; told
"foot" it moves. On Win32 exactly one opener, the foot's, left of Quit
(["profBtn","openMain","quit"]), the foot's buttons fitting apart with
their words whole at 360px, opening /api/window/main; told "head" it
moves back; an unknown side changes nothing.
Run on mote via mote-run:
- At this head (rebased on
|
||
|
|
d10f377657 |
providers: Names & levels is Names, prices & levels, where a model's own price at one provider is set (ferock4669)
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 |
||
|
|
1dead5dc7b |
provider: magpie's own Codex account switches leave the Codex app running unless Restart the app is ticked (atom0964)
atom0964 on Discord (#help) has two ChatGPT Plus accounts in magpie, with Codex always signed in to the first and Only switch Codex's sign-in both off, on Smart routing. The Codex desktop app kept restarting by itself. They tried several combinations of the ticks and it still did. Why: with both off, SwitchWhenSpent signs Codex in to the next account at 98% and back to the first below 90%. Each switch was noted for the Codex app (codexAppSpentSwitch), and KeepCodexAppOnItsProvider ended its app-server once no turn ran; the ChatGPT app shows that as an error and relaunches (#4550). With Codex kept on the first account there is no switch, but the used-up takeover (magpie made Codex's provider for a used-up account and given back once it has room; |
||
|
|
e41ef6288c |
providers: a spend cap on an API key, per day, month or in all (sparkling_lemur_62868)
sparkling_lemur_62868 on Discord: a team's OpenAI key holds granted credits that other docker services spend from too, and they want magpie to stop at a share of it. Their workaround was two magpies behind a gateway-key limit. What changed - provider: KeySpendCaps on a provider, keyed by the key's fingerprint (key_spend.go): USD over a local calendar day, a local calendar month, or in all since it was set. Since is kept while the cap stays one in all. SetKeySpendCap and ParseSpendCap refuse an amount outside 0 < usd <= 1,000,000 and an unknown period, and leave the saved cap as it was. Subscriptions are refused, since an account has its own usage-window cap. - usage: KeySpent(keyID, start) is what magpie's own calls on the key cost at the Usage page's prices. Turned-away calls and app-reported ones are left out. It reads usage.jsonl once per key and start, keeps the sum for 5 minutes, and Append counts each new call into it (spentNew). A read that a write races is read again. - gateway: perKeyEvery bars a key at its cap (spendHeld) as a usage cap holds an account. The next key serves, then the fallbacks. With none, the reply is 429 "spend cap reached: ..." naming each key, what it spent of which cap, and how to go on. Retry-After is when the soonest period renews; a cap in all gives none. A spend hold is not a usage cap: Stop at the caps and strictKeep don't end at it (capHeldOnly). The trace's barred row carries the cap, the spend and the period. - GUI: a pill on each key's row in the provider editor, for example "$7.50 of $20.00 today". It opens the app's menu (No spend cap, Per day..., Per month..., In all...) and then takes the amount in place, as the lane-limit pill does. A key at its cap gets a line under its row: "At its spend cap · back in ...". Every string is in all five languages. The pill and the line are in keyspend.js, which app.js imports when it draws a key's row, so the core's script budget is not raised. /api/providers' keyList carries spend, and POST provider/keyspendcap sets it. - CLI: magpie provider spend-cap <id> [key [usd [day|month|total]|off]] lists each key's spend and sets or removes a cap. - docs: providers-accounts.md and gateway-routing.md. Caveats, also in the tooltips: - What counts is magpie's priced usage, not OpenAI's bill. - A model with no known price counts $0. - Requests already under way when the cap is reached still finish, so a key can go a little past it. Run on mote at the pre-rebase head ( |
||
|
|
63dc359fb4 |
providers: a subscription account's rest, or its model's, shows on its row (maxleebeta)
maxleebeta on Discord (#feedback): WorkBuddy answered 429
{"type":"rate_limit_error","message":"WorkBuddy: 您的使用量已超出频率限制,将在
2026-11-03 23:57:19 UTC+8 重置,您也可以切换其他模型继续使用。"} while the
provider's card said 1,934/2,350 credits left (82%), and nothing on the
Providers page said the account was held back.
Routing already handled the refusal: resetsWhen reads the time (UTC+8, the
space before 重置 included), failure() gives failQuota, and since it says
切换其他模型 the rest is that model's alone (restID), by "resets", till
15:57:19 UTC; the account's other models are still asked (#1669). What
was missing was the page: a key's rest showed on its row, an account's
never did.
- gateway.RestsUnder(prefix) lists the rests in force under a key prefix
(provider@ for a subscription's accounts, provider@user/model for a
model's), with Key and the rest's note (Model, By, Error).
- providerJSON.accountRests gives them by user in lower case, the model
filled in from the key when the note has none; provider.KeyRest gains
By, Model and Error.
- app.js: the account row in the provider editor gets a line per rest
(accountRestLines): "<model> resting · 429 quota used up · back at
<time>" or "Resting · …" for the whole account, the vendor's words
beside it (shown whole when it names a time magpie couldn't read, so
an unknown format still says why), and Try now (gateway/unrest by the
rest's key). The key row's rest line is now the same helper
(restLineOf), so app.js grows ~800 bytes, under the core budget.
- New strings in zh, zh-TW, ja and de. docs/subsystems/gateway-routing.md
says where the Providers page reads them.
Not changed: the "-sg" maxleebeta saw in pi is WorkBuddy AI's own model
id (deepseek-v4.1-flash-sg, the paid Singapore id beside the free
deepseek-v4.1-flash); pi's footer and model picker show ids by design,
and the name magpie writes for it is the vendor's ("Deepseek-V4.1-Flash",
"(SG)" added by the plugin only where two ids share a name). Neither
magpie nor the plugin appends "-sg"; the CN build has no -sg ids.
Run (mote, through mote-run):
- go test ./internal/gateway ./internal/gui ./internal/provider at f0df4bb2b
(base
|
||
|
|
e189542dfb |
providers: a new-api relay's user id is its own field beside the balance token (zxc56823)
zxc56823 (Discord #general) added a new-api site with a key and an access token. The balance card said 请在供应商的「请求头」中添加 New-Api-User = 你的 用户 ID, so they typed 272298 as a header's *name* and left its value empty. The editor drops a header with no value, so New-Api-User never reached /api/user/self. new-api v0.9's authHelper still answered 401 "未提供 New-Api-User", and the balance stayed unread. CC Switch asks for "User ID" in a field of its own and sends it as New-Api-User beside "Authorization: Bearer <access token>". magpie sends the same request apart from Bearer, which new-api strips. The id can't be worked out from the token or the key, so the field can't be zero-config. - Provider editor, Account balance: when the Balance URL is /api/user/self, a "User ID" field sits beside the token, with the line that says where the id is shown. The field keeps the id in the New-Api-User header row and redraws Headers. It keeps its focus while typing, and turns amber when what's typed isn't digits. - A header named by digits alone with an empty value is the user id. headersOf in app.js and userIDHeader in provider.go (cleanHeaders on save, and the balance read for an unsaved check) both send it as New-Api-User=<digits>. A New-Api-User with a value of its own wins, and the digits header is dropped. So the reporter's saved form now works without being retyped. - The 401's hint and the card's text name the User ID field, not Headers (en, zh, zh-TW, ja, de). - The core script budget is unchanged. The ~1.6KB is paid for by four comments cut in app.js. Run at this tree (on origin/main |
||
|
|
c9824bb364 |
usage: each request's row says the credits its reply said
jiabubu (Discord, #feedback) saw a WorkBuddy request's credits shown before, and now nowhere. The gateway still keeps them: usage.Record.Credits from the chat usage's `credit` (#2512) reaches the ledger through the WorkBuddy plugin on every endpoint shape. The ranking, Overview, tiles and Sessions show them too. The Requests list's rows never did: a plan's model there reads "—" for a price, and its detail had no line for credits. Now the cost cell of a row whose reply said credits shows "N credits" (the same ledCredits words as the ranking) in place of the dash, or under the API price reference when the model also has a price. The expanded row has a Credits line. A reply that said none still shows "—". This applies to every credit-priced provider, since it reads the record's credits and not the provider. Tests: - internal/gateway/plugin_plan_credits_test.go: a moved workbuddy-ai plugin replies with WorkBuddy's credit usage. Chat, Messages and Responses, each streamed and whole, each land 0.01 credits in the ledger. - internal/gui/tests/plan-credits.test.cjs: a new test checks the row's cell, its title, a row with no credits, a priced row with credits and the detail, at 1400px and 420px. Run at this head (mote, via mote-run): - plan-credits.test.cjs: 36/36 in Chromium and WebKit, en, zh, zh-TW, ja, de, 1400px and 420px. - go test -run 'PlanCredits|TestCoreScriptBudget|I18n|Lang' over internal/gateway, gui, usage and usageapi: ok. - gofmt -l is clean. GOOS=linux and GOOS=windows go vet for gateway, gui and usage: ok. - The other Usage page files the change reaches, alone, fail the same on the base as with it: - usage-agents-hide: 22 (#3414, #2276). - usage-fold: 4 (#3415). - usage-ledger: 6, "newest live route needs no return-to-live button" (#4078, #3104). usage-curve-zoom-back passes alone. - Rebased from |
||
|
|
8e9b048b65 |
settings: a row's explanation shows on hover, not under every name
The owner (11-02, a screenshot of Settings › 模型): hide the lines that
explain a setting and show them on hover, so the page reads quiet and
open ("很简洁,很有呼吸感"). Settings' rows now rest as a name and a
control. The pointer resting on a row (450ms, so passing over rows shows
nothing), or a key reaching its control, shows its explanation whole in a
card under the row's name, or over the row where the window ends; the
card takes no pointer and no row moves. It goes when the pointer or focus
leaves, a key is pressed, or the page scrolls (focus's card follows its
row instead, as Tab scrolls it into sight).
- app.css: in #view-settings, under (hover: hover), a .row.pref's plain
.sub lines are clipped out of sight, not removed, so a screen reader
and the search still read them; each carries --hint: 1, which the card
reads. A search shows them in place again, as before. A touch screen
keeps them all.
- Stays in sight: errors (.err, .bad), states (.say, [role=status],
.proxy-check), warnings (.image-gen-hidden, .sync-sign-in,
.vision-not-marked), .no-names, .pv-hits, .feat-why, .font-note, the
proxy in use (#proxySub), and any line with a button, link, input,
code or a search provider's failure note in it (.acts, which
settingshints.js sets on each such line as it is drawn, through a
MutationObserver, so before it is painted: Safari before 15.4 has no
:has(), and old-webkit holds the styles to 15.0). Disclosures stay too: what tracing sends (otel's
sessions row) and the allow list's addresses, as do a disabled
pattern's matches. .say is new, on the lines that are a state, not an
explanation: the version row's update state, a sync's last sync, the
sync notice, the web page's "Served" line, the local masking model's
state (downloading, on, failed; its two explaining lines, before it is
on, are hidden) and what Check in now came to.
- One-line rows are one height: a row left with its name alone was 48
to 51px by its control (the owner, 10-22: one-line rows of one
height), so under (hover: hover) every Settings .row.pref has a 27px
content-box min-height, 51px with its padding, its line above outside
it. Check in now's row aligns to its top, so its result line grows the
row down and the button stays where it was pressed.
- app.js stays in the core budget (1,533,799 of 1,533,802 at this
head, on main's 1,533,789) with three comments shortened, no raise.
- settingshints.js: the card and the .acts marks, a module app.js
imports at start, not in index.html (one line in app.js; old-webkit's
list of such modules names it). Its :focus-visible check is in a try,
as Safari before 15.4 throws on it.
Tests, run on mote (macOS) at this tree:
- settings-hints.test.cjs (new): Chromium and WebKit, 1100 and 420px,
en/zh/zh-TW/ja/de, Settings › Models. At rest the Image recognition MCP
server's line is out of sight and still in the page; a gone model's
error and an unticked image model's warning stay in sight; hover shows
the whole line in a card off the row's name, inside the window, no row
box moved, pointer-events none; the pointer leaving hides it; Tab (or
Option-Tab in WebKit) to the row's copy button shows it; a search shows
it in place; a line given a link shows at once and rests again when
the link goes. 20/20 green.
- Broken by hand: with the clipping rule's body gone, 20/20 red on "the
explanation shows at rest"; with app.js's import line gone, 20/20 red
waiting for the card; with the .acts observer gone, Chromium 10/10 red
on the link line. Before the kept lines and the row height were
in, checkin-now-account was 20 red (the result line hidden, then the
button moved 7px) and settings-general 10 red at 1000px (one-line rows
48, 50 and 51px); both green with them.
- settings-lines-wrap.test.cjs: a hidden explanation is skipped by its
"cut short" measure and checked whole in its card instead (#visionMcpRow
and the searcher row). 20/20 green.
- 22 more GUI files checked a Settings explanation's text, width or
wrapping in place; each now checks the text and that it is hinted, and
skips its geometry (redact-*, privacy-model, settings-general,
searcher-pick, disabled-models, the *-setting rows, images-codex-one,
and reply-model-setting, new on main since: red 20 of 22 on ".sub
fits" until it got the same check, then 22/22).
These 24 files: 536 pass, 2 fail, both images-codex-one's #pop picker
race, red the same on untouched origin/main
|
||
|
|
ae060550b9 |
claude-desktop: a tier's pick runs with its tier's Claude prompt (behavesAs)
moer2831 on Discord: a model picked for one of Claude Desktop's tiers ran
in the Code tab on Claude Code's generic prompt, not the one of the
Claude model of that tier ("通用提示词和对应模型提示词差距挺大的,感觉直接
蠢了一个度"). Desktop 4.29 and later hand Claude Code behavesAs only from
a profile's inferenceModels (z3t in 4.4212's app.asar: modelPicker
options with each entry's behavesAs).
What changed:
- gateway.DesktopInferenceModels: while a model is picked for a tier,
the list is every row /v1/models gives Desktop, by its id and in its
order (a non-empty list replaces discovery, pzn), with supports1m,
prefer1m and labelOverride as Desktop read them off the row, and a
pick's anthropicFamilyTier/isFamilyDefault. A pick that isn't a Claude
model gets behavesAs = its tier's newest Claude id (claude-opus-5-5,
claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5-1). Nothing picked
(or a pick no longer listed): no list. Unreadable picks are unknown.
- agent: desktopSyncModels writes it into magpie's Desktop profile on a
tier's Set, as Desktop comes on magpie and on Sync; temp+rename, only
when it changed; taken away when nothing is picked. The list is
magpie's only while its hash is one magpie recorded (stash mark
claude-desktop.models); any other list (the user's) is never written
over or removed.
- Claude Code's modelSettings gets the pick's own window even when it
matches the default (claudeBudget.behaves), since behavesAs would
otherwise give it the Claude model's.
- GUI: the tiers menu ends with one line, "Claude Desktop reads the
tiers as it starts: restart it after a change." (en, zh, zh-TW, ja,
de). The Agents row's Restart already lights from the profile hash.
- docs/subsystems/agent-wiring.md and gateway-routing.md.
Run on mote at this tree (base
|