382c8c0bdfdcedadbfa35ce1df7bd34f583ec17b
7519
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
382c8c0bdf |
proc: magpie serve reaps the processes it adopts (Kling__Lab on X)
254 <defunct> children of `magpie serve` after 7 days, growing ~9 an hour (magpie, uv, node, npm, magpie-bun, code-review-graph), only a restart cleared them. Every command magpie starts is waited for (the AST guard TestEveryStartedCommandIsWaited holds, and I read each Start site and Output/StartTree/StartReaped by hand: none is missed). The zombies are the grandchildren: an agent CLI's MCP servers whose parent ended are adopted by magpie where it is PID 1 (a container) or a child subreaper, and nothing waits for a process it never started. proc.KeepReaping (Linux, from serve) does nothing unless magpie adopts (PID 1 or PR_GET_CHILD_SUBREAPER), and then reaps a child of its own that was a zombie at two looks 5s apart. Not tried: the reporter's container; the cause (PID 1 / subreaper) is inferred from the report, not seen. Run: TestAdoptedOrphansAreReaped (subreaper test process, 6 orphans) and the proc package through wsl-run on magpie-desktop: ok. Broken by hand (KeepReaping returning at once): 6 adopted zombies left, red. |
||
|
|
422f90e80b |
davsync: WebDAV answers a Digest challenge, MD5 and SHA-256 (caelum1990 on X)
Sync signed in with Basic only, so a server that takes Digest only (Apache mod_auth_digest, some NAS and nginx setups) answered 401 and magpie said the password was wrong. digestTransport (RFC 7616, qop=auth, -sess too) wraps the dav client: a 401 with a Digest challenge is sent again with a Digest header made from the same user name and password, SHA-256 chosen over MD5 when both are offered, and the challenge is kept, so the requests after it carry Digest with a rising nc and Basic is not sent to that server again. A PUT's body is made again from GetBody. A Basic server is untouched. Run: go test ./internal/davsync under mote-run, ok; vet darwin, linux nogui and windows on the package. New: TestDAVDigest (MD5, SHA-256 against a fake Digest-only server that checks response, nc replay, opaque, uri and the PUT body), TestDAVDigestWrongPassword (still reads as a wrong password; a Basic server is left alone). Broken by hand: newDAV without the transport, TestDAVDigest red with "refused the user name or password (HTTP 401)". Not tried: a real Digest server (only the fake, built from the RFC's formula); auth-int and SHA-512-256 are not answered. The first request of a connection still carries Basic, as before, so a Digest-only server over plain http sees the password once; nothing else was changed in that path. |
||
|
|
efc3e1e56b |
remote quotas: a Remote with no picks tells every card, a usage-only provider's included (fcooji on X)
On 0.1.3959 Claude Code set to usage only on the remote magpie showed no usage on the local magpie that added it as a Remote. A usage-only provider lists no model there, so a Remote with nothing picked here exposes only what the remote lists, and cfd49e36a/93b855d90's filter by enabled models dropped the Claude card. Only the user's own picks (Provider.Models) narrow cards now; no picks, or Select none, tells all of them. Run (mote): TestRemoteUsageOnlyProviderStillShowsItsCard is red with the new rule turned off by hand (map[office/codex:true]), green with it; -run 'Remote|Quota|Card' in internal/provider and internal/gateway ok; go vet darwin/linux/windows of internal/provider ok; gofmt clean. Not tried: two real magpies in sandbox HOMEs (a fake peer and list server in the test), the GUI suite (Go only), the full Go suite (started after the tag). |
||
|
|
2ae8e61a4f |
usage: an upgrade reads session files again only when the code of their rows changed (#2278)
requests-v1.bin and log-v1.bin were keyed on a hash of every .go file in internal/usage, so nearly every release that touched the package threw both away. The first start after such an upgrade read all ~24k call shards again: on the owner's real accounts (mote, acctp sandbox) that is 13.8s of CPU and ~3.4GB allocated before the page settles, against 2.4s warm. Each file now keys on the source its rows are made, written and read through: rowSource (15 files) and logSource (23 files), embedded by name. The row pricer and a file's chunk builder are lifted out of readRequestBlocks (sessionRowPricer, sessionChunk) so they can be roots. TestRequestDiskNamesTheCodeOfItsRows type-checks the package and walks every declaration reached from those roots (uses, package vars assigned elsewhere, interface calls, encoding/String/sort methods); it fails when a reached file is not embedded or an embedded one is not reached. Of the last six usage-changing releases, four (3962, 3958, 3941, 3908) would have kept the cache. Run: - go test -count=1 ./internal/usage on mote: ok 51.9s. - go vet ./internal/usage for darwin, windows, linux on mica: ok. - Broken by hand: session_provider.go left out of rowSource's embed -> "rowSource: session_provider.go is reached but isn't in its go:embed", FAIL; restored. - Real accounts on mote (pageheap.sh, page open, CPU at mark): w47v first start after an older binary 13.80s, numGC 217 (rebuild, expected); w47v again 2.45s; w48v (w47v plus a live init() in effort_split.go, a different binary) 2.59s, numGC 56; back to w47v 2.43s. Before, the same swap cost ~14s. Not tried: Windows or Linux real start. |
||
|
|
363adb3528 |
plugin: the auth-lock test checks the loop ran while the lock was held, not how often a timer ticked (#5271)
TestAuthLockWaitDoesNotFreezeTheHost counted a 20ms setInterval over a 300ms sleep and wanted 8 ticks. A loaded runner fires the timer late and counts fewer while the loop is free all the same: 7 of 8 on mote (#5271), 6 on ubuntu CI at |
||
|
|
6af6ae9885 |
usage: a log of MCP calls and probes keeps its blocks on disk too (#2278)
log-v1.bin was written only once a gateway block had filled. A log of
MCP tool calls and probes has none (the real-account sandbox's 8.3 MB
log is 25,223 MCP lines and 2,539 probes, 54 probe blocks, 0 gateway
blocks), so full.n stayed 0, the file was never written, and every
start parsed all 27k lines again: readLogSnapshot took 60 MB of the
start's allocations. The probes that were kept went as JSON and were
parsed back a record at a time.
A full point is now marked too when a probe block fills while no
gateway row stands after the full blocks, and it records how many probe
blocks were full there (logFull.probes). Those go to the file as binary
entries, as the gateway blocks do, read from its mapped pages; only the
probes after them, up to the full point, still go as records. The file
is written again when its full point reaches further (by offset, not
the gateway block count). The magic is magpie-log-v2, so a v1 file is
parsed over once.
Run:
- go vet ./internal/usage; go test ./internal/usage ./internal/gateway
(mica, -timeout 45m): ok usage 31s, ok gateway 859s.
- TestStartReadsKeptProbeBlocks (new): an MCP-only log of 3 blocks + 100
is kept, a start reads 3 blocks from the file, and reads as a whole
parse. Broken by hand (no probe full point): red, "a log of probes
wasn't kept".
- Real-account sandbox on mote (acctp, page open 2.5 min, version
0.1.3961 builds): log-v1.bin written on the first start (645 KB);
warm starts, w45v (v0.1.3961) against this:
CPU at mark 3.21s, 3.00s -> 2.50s, 2.39s
allocated 701 MB -> 646 MB, 629 MB
readLogSnapshot cum 60 MB -> 2.6 MB
numGC 66 -> 56
Footprint 128-133 MB -> 132-135 MB, liveHeap ~80 MB both: the same
within noise.
Not tried: a log with both gateway and probe blocks across a v1 -> v2
start on a real account (the unit test's mixed log covers the format).
|
||
|
|
5a44051eb5 |
gui: Discover's long-list hook moves into plugingrid.js, and the core budget carries the rest
TestCoreScriptBudget has been red on main since |
||
|
|
abacab7207 |
provider: a model's listing providers share one copy of each provider
listedBy, the providers listing each model (for a model no catalog entry
has), appended a copy of the whole Provider (1.3KB) for every model of
every provider. It now keeps one copy per provider and every model points
at it; the one caller copies the provider it returns, as before.
Measured on mote with a real-account sandbox HOME (network blocked),
2.5 min with the usage page open, alloc_space of listedBy:
w44 (
|
||
|
|
61be687ffa |
claudetui: /usage's saved figures are not told when the refreshed panel's redraw stalls (#6376)
TestShimWaitsPastSavedUsage/refreshed went red on macOS CI at
|
||
|
|
482653868b |
gui: a provider row's read-once test measures the row's own work apart (#6375)
TestProviderInfoReadsTheListOnce was red on main since |
||
|
|
5a0e0378c0 |
plugins: Discover draws only the cards near the view in a long list
The owner, 11-13: "这个页面有点卡,记得做列表虚拟化" (Plugins › Discover with Subscriptions picked, 369 cards). Every redraw of Discover's body (npm's numbers coming in, a count changing) made all of them again. A grid of 48 cards or more (a kind picked, a search that matches hundreds, npm's hits) now draws only its rows near the view, 700px past each edge, and keeps the whole list's height in its padding above and below. The rows follow the scroll and the width (a ResizeObserver on the page): columns are read from the grid's own computed columns, so narrow widths and every language lay out as before. Row heights are measured as they are drawn. A card with focus stays in the page, held where it would be, so keys go on from it. Cards are made once per list and kept, so a click lands on the same node. A list shorter than 48 is drawn whole, as before. The code is in plugingrid.js, imported when Plugins first draws, so the core doesn't grow: TestCoreScriptBudget was 3,299 bytes over with it in plugins.js. Until the import lands, a long list is drawn whole, and the body is drawn again once it has. Measured with plugin-discover-virtual.test.cjs's PERF=1 on mote (load ~25 to 55, so the times are high). The time is from the Subscriptions click to the cards drawn, with a market of 503 plugins (370 subscriptions). - Before (origin/main): chromium 69.0ms at 1180px and 56.5ms at 420px, webkit 77ms and 74ms. 370 cards and 9,312 nodes in #view-plugins. - After: chromium 6.2 to 9.7ms, webkit 10 to 13ms. 30 cards and 810 nodes at 1180px, 10 cards and 312 nodes at 420px (de: 9 and 285). Guard: plugin-discover-virtual.test.cjs (new), in chromium and webkit, in en, zh, zh-TW, ja and de, at 1180px and 420px. It checks: - at most 72 cards are drawn, and the list keeps its whole height; - wheeling to the middle never shows an empty stretch, and the focused card is kept; - at the bottom pv-369 is in view and its Install posts its spec; - "pv-12" lists all 11 matches, and "pv" draws at most 72; - nothing scrolls sideways, and there are no page errors. Broken by hand: VMIN at 1e9 (every list drawn whole) turned it 22 of 22 red. Run on mote at this tree, before the rebase (mote-run): - go test ./internal/gui: ok (the budget too). gofmt -l: nothing. - plugin-discover-virtual: 22 of 22. - Every GUI file that draws plugin cards or Plugins (the 54 that grep finds pm-card, view=plugins or pluginAgentsTo), with i18n-keys and i18n-en-no-cjk: all pass, except the reds below. Reds, the same at origin/main |
||
|
|
aa84b568d6 |
claudetui: the undrawn-Claude test leaves its fake room to start
TestShimSaysWhatAnUndrawnClaudeWaitsOn/keychain went red on macOS CI
at
|
||
|
|
5f5307ab6d |
gui: each embedded file is hashed once, not on every load
revalidated read each embedded file again on every request to make its
ETag, and the page "/" read and hashed every file it names to version
their URLs. A release's files never change, so each one's sum (and the
versioned page) is now kept in a sync.Map after its first read. A dev
build (-tags dev) reads from disk and keeps nothing.
Measured: TestStaticFilesHashedOnce, 20 loads each, on mote:
with the memo green (app.js under 1x its size, page under 6x its)
memo off by hand app.js 26,516,856 B; page 165,916,424 B (~8 MB a
page load) - red
Run on mote: go vet ./internal/gui and -tags dev; go test -run
"StaticFilesHashedOnce|VersionedFilesKept|WebCompresses|PageFilesRevalidate|Revalidat"
./internal/gui ok.
Not tried: the full GUI suite (no change to what is served).
|
||
|
|
a8b0e80f65 |
usage: the request page's probes are made into a chunk once per change
readRequestBlocks made probeChunk again on every poll of the Requests and Usage pages: a rowChunk holding every probe since the period's start minus a day, interned again each time. On the real-account sandbox it was ~45 MB of 952 MB allocated in two and a half minutes (rowChunk.add under probeChunk, #2278). probeChunk now keeps the last chunk it made, with the probe blocks, since, renames and hosts it was made from. A frozen block is never written again (a new probe reopens the tail as a copy), UsageRenames hands back the same maps while providers.json is unchanged (Renames.Same compares them by identity), and hosts are compared by content, so the same inputs make the same chunk, which no reader writes. Any of them changing makes it again. TestProbeChunkMadeOncePerChange: the same inputs give the same chunk; a later since, a changed host and a new probe each make a new one. Measured on mote with the real-account sandbox (pageheap.sh, the request page polled to the mark): probeChunk allocated 43.81 MB at the base (w42) and 24.54 / 24.10 MB with this (w43, two runs). It is not zero there because the sandbox's network is blocked, so every probe fails and logs a new row, which makes the chunk again. Run on mote: go test ./internal/usage ok (33.9s); the test is red with the memo turned off by hand. |
||
|
|
e6184b368a |
provider: a provider's models.dev models are read, not copied three times
Provider.available, the base of every Available and Exposed, made three copies of a provider's catalog models on each call: catalog.Provider cloned the built list, available appended it into a list of its own to drop an id two catalogs share, and the list without experiments and previews was grown from nothing again. On a page open with the owner's accounts that was 74 MB of 952 MB allocated in 2m32s, the largest flat allocator of all. catalog.ProviderShared is the built list itself, for a reader (catalog.Provider still hands out a copy). available reads it through catalogsOf, which copies only when two catalogs are joined, and sizes the released list before filling it. The shared list is never returned: every way out of available returns Decorate's list, the released copy or the signed-in account's own. The built list is clipped, so an append to it reallocates. Run: go test ./internal/provider ./internal/catalog on mote (ok, provider 135s). Measured on mote's real-account sandbox (acctp, the Usage and Providers pages polled for 2m32s, pageheap.sh), w41 = the parent, w42 = this commit: allocations 993 -> 858 MB, available's cumulative 144.5 -> 52.3 MB, CPU at the settle mark 3.32 -> 3.18 s; footprint 130 MB and live heap ~76.7 MB both unchanged. The parent's full suite at d1e823d5f (same Go tree) was 99 ok, 0 FAIL; this commit's provider and catalog packages ran again, not the full suite. |
||
|
|
ac15036ab4 |
provider: a catalog entry points at its provider instead of copying it
Entry.Provider was a Provider value, 1,328 of an Entry's 1,760 bytes, copied into every model of every provider each time a catalog, an agent's list or a routing group's entries were built. It is now a *Provider: entriesOf and decide's list give every model of one provider the same one (sharedEntry), and a group's entry points at its first member's. It is read only; every place that hands it on as a value (Resolve, CanFast, ownAgent, modelAllowed, …) dereferences it, so what they get is a copy as before. entryFor keeps its signature for the one model ServedEntryOf builds; offEntries' entries now carry their provider too. Measured on mote with the owner's real accounts (acctp sandbox, page open for 2m32s, w40 = before, w41 = this, alternating): - catalogOf's allocations 106 MB -> 67 MB, providerEntries' 88 -> 78 MB - CPU at the page's settle mark 3.42/3.33 s -> 3.18/3.30 s - live heap unchanged (76.3/76.1 -> 76.7/75.9 MB): the lists are rebuilt, not kept, so the copies were churn for the GC, not held Run: go build and go vet ./... and the tests compiled (go test -run ^$) on mote; the full suite at this tree (d1e823d5f) on mica: 99 packages ok, 0 FAIL (agent 317s, gateway 972s, gui 188s, provider 220s, usage 56s). |
||
|
|
66f98d9d65 |
gui: the add sheet's tools show in the title bar once scrolled out of sight
The owner, 11-12, on the Providers page's Add sheet: 向上滑动,然后这些区域 不在可视区域的时候,这些区域应该自动浮现在Header处. Beside the sidebar (side-nav, a window 1024px wide or more), the sheet's search, Custom provider and Import… now show in the title bar's empty right, left of its buttons, once the sheet's head row has scrolled out of sight. They are put there the way Library's, Plugins' and Settings' tools are: position: fixed inside --tools-l/--tools-r/--top-h, which app.js tools() keeps out of the crumb's way (its head query now includes #addSheet .add-tools.afloat). Scrolled back up, they are in their row again. Close stays in the sheet; the screenshot's box didn't cover it. The group is pinned, never copied, so there is one search: the words typed and the focus stay with it both ways. Each change is a 180ms fade in going into the bar and 140ms coming back, cubic-bezier(.23, 1, .32, 1), opacity only, so reduced motion keeps it. Nothing moves in the sheet: the head row keeps its height while its tools are up. Narrow (no sidebar, which covers 420px and the panel): the bar has no free room, so the sheet's whole head (label, tools, Close) is held at the top of the page while the sheet is under it, the way Settings' head is in a narrow window. It has the same blur strip and a hairline once stuck. At 760px and under, the tools take a line of their own under the label. The code is in a new addfloat.js, which renderAdd imports the first time the sheet opens. In app.js it took TestCoreScriptBudget 487 bytes over (1266031 > 1265544); with the move the budget passes and isn't raised. old-webkit's list of scripts loaded on demand names it. Run at 39ac4fafe (on origin/main |
||
|
|
046a131304 |
gui: an agent's Long conversations is one row, and its context window is picked
The owner (11-12): an agent's sheet showed Long conversations twice, every
agent's row above the agent's own, which read as the same setting twice.
Now the sheet shows one row, the agent's own (.own-compact hides
#fullContextRow there). It shows the agent's own value, else every agent's,
and a change posts settings/agent-compact {agent, own: true, full, at}, so
it is that agent's alone. Settings keeps every agent's row for when no agent
holds one. The Context card's note says "Long conversations in {agent}" when
the agent holds its own value (context.js), in en/zh/zh-TW/ja/de.
The agent's context window (agentwindow.js) is picked, never typed as a
syntax: one size for all its models from the app's menu (Each model's own,
128K to 1M, Other size… typed as 300k), and "Set a model apart" adds a
model from the agent's model picker with its own size, a line each, with a
remove button.
Tests rewritten to the one row, keeping what each guarded:
- compact-one-value: Tuned for you and Long conversations are one window,
now through the agent's own value and its post.
- codex-compact-held: Codex's held values are under the agent's row.
- agent-prefs: what an agent's opened row and its panel sheet show
(#fullContextRow hidden, .row.agent-compact visible).
- compact-at: a typed size posts settings/agent-compact for Claude Code,
and never settings/full-context.
- codex-memories-settings "no Codex, no memories row": waits on the
merged row, lists the visible rows in its message.
- agent-compact, agent-window: the new row and the picker.
Run on mote (macOS, Playwright 1.62.0, chromium + webkit, every language
each file covers, narrow and wide), at
|
||
|
|
be8e352a20 |
editor: Proxy takes no room unless Custom is picked
The owner (11-12, "这些空白看起来好难受"): the Custom address and its login
were visibility:hidden while not picked, so each account kept an empty
strip (43px) between its proxy segs and the next account's name. They are
display:none now, so the gaps are even. proxy-gaps measures the segs'
bottom to the next element's top at 900 and 420 in every language;
account-proxy's no-move check now covers the lines above the pick.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
c21683cbf2 |
editor: Export accounts is the last account row, with an export glyph
The owner (11-12): Export accounts to a file goes last of the four account
rows, after Add an account by setup-token, and has an arrow out of a tray
instead of the plus: it adds nothing. login-export checks both.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
8f7ddb9e06 |
editor: Routing, Rate limited and Stays fold under Advanced
The owner (11-12): these are changed by few, so they sit at the top of the
editor's Advanced fold, collapsed by default. The fold opens on its own
when one isn't its default (routing, affinity or sink set), unless the
user already opened or closed it for this provider. Tests that pick a
routing seg open Advanced first; routing-advanced checks where the three
sit and when the fold opens, for a subscription and a relay.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
62044305e3 |
editor: a check-in or warm-up row holds its hidden line, so the dialog grows no second scrollbar
A provider's check-in and warm-up rows keep a .sub line out of sight,
position:absolute under hover. Their .who is display:contents and has no
box, so the line was held against the .dialog: with Advanced open the
dialog grew a scroll of its own (e.g. 1117 over 810) beside the editor's,
and in WebKit every row was 8px narrower (de 560 "Gewicht 3 · 75%" ran
2px past its row). Happens on main whenever Advanced is opened. The row
is now the line's containing block. account-weight opens Advanced and
checks the dialog doesn't scroll.
Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
26/26; routing-advanced, proxy-gaps, login-export, routing-save,
key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
routing, export): 698/730. The same reds on origin/main
|
||
|
|
909cd5c758 |
gateway tests: TestSearchQueueKeepsCodexAlive's hard cap starts at the headers
macOS CI at |
||
|
|
f9bc297a5e |
gui tests: TestPluginPageReadsWhatItDeclared's limiter check passes on every -count round
The check called pageSetAllowed with the fixed key "x", and its last call
stored "now + 2s" in the package's limiter. The next -count round's first
call, under a second later than that, was refused, so the test was red on
every round after the first ("pageSetAllowed"). The check now uses a key
of its own run.
Run on the Linux box (wsl-run, magpie-desktop; mote and mica were at load
58 and 72), at origin/main
|
||
|
|
3d4c8edcea |
gui: Open the Codex app is in Codex's row menu, not a button on its row
|
||
|
|
dbaf9d68cc |
edit: TOMLTables' list is kept with the file's other answers
The Codex agent's drift lists its config's tables on every look
(TOMLTables), and the list came from the whole parse. Over a Codex
config.toml with ~11k projects, the drift polls of an open page kept that
parse (3 to 5 MB) alive and it was never let go. GetTOMLTop and
GetTOMLTable answers were already kept beside the parse. The table list
is now kept there too, copied out of the file's text, so the idle drop
can let the parse go while a page is open.
Run (mote, at
|
||
|
|
1281046a02 |
gui: the Library's Variables tab is called Environment variables
What it holds are environment variables an agent starts with, and "Variables" alone read as something else (the owner: 应该叫环境变量). The tab, its empty line, its add buttons and the new item's sheet say environment variable in en, zh, zh-TW, ja and de (环境变量 / 環境變數 / 環境変数 / Umgebungsvariablen). "Environment variables" moves into the core i18n.js: otel's page uses the same words, and i18n-keys keeps a plugin's words its own. Run (mote, at origin/main |
||
|
|
32d6be0d05 |
gui: Memory has a brain of its own, in the sidebar and on its requests
The owner (11-12): Memory should have its own icon, a brain. The Library's Memory tab had a bookmark, and Memory's own requests (the conversations it reads into memories, made as memdistill.Agent "memory") were drawn in Routing's graph, Usage and Sessions with the generic cube under their raw id, since "memory" was no client. - icons/memory.svg: a brain, 16-grid, stroke 1.4 with round caps and joins, as the sidebar's marks are; drawn as a one-tone mask. - navicons.js: the Library's Memory tab draws the same path. - agent.others: a client "memory", named Memory, with that icon, so /api/state's clients and agent.Looks (Usage, Sessions) name and draw it. It has no User-Agent: its requests are known by their token. - TestEveryClientHasNameAndIcon: memdistill.Agent is among the ids the gateway records, so it must be a client with a real icon. - tests/memory-icon.test.cjs: the sidebar's Memory tab draws the path icons/memory.svg has (and no other tab does), and a request from "memory" in Routing is drawn with the memory mask, not the cube. Chromium and WebKit, en/zh/zh-TW/ja/de, 1100 and 420px (no sidebar at 420px, so there the request only). Run on the tree rebased onto |
||
|
|
ff8b437117 |
gui tests: library-loading's tab lists include Claude plugins (#6204)
|
||
|
|
0e181b6f88 |
gui: the saved-proxy form's fields are the app's own, and no field falls back to the browser's
The owner, 11-12, on Settings › Network › Proxies › Add (Name, http://127.0.0.1:7890, Username (optional), Password (optional)): "输入框 太简陋了。根本就不是我们整个产品的输入框组件。" proxyFormRow gave its four fields only the class proxy-credential, which sizes them in .proxy-form and styles them nowhere, so they drew as the browser's white inset boxes on either theme. They are input.words now, the same field as the gateway address and the share password on that page. The class: app.css gets a :where() base rule (zero specificity) for every text input and textarea: 1px var(--line) border, 7px radius, var(--card) background. Any rule that names a field still wins, so a field only takes it where it had the browser's look before. input-look.test.cjs opens every Settings part (Network with the saved-proxy form open and each Custom proxy pressed), a custom provider's editor and a signed-in Codex editor (every fold open, each Custom proxy pressed), and a routing group's editor (every fold open). No visible text field may have an inset/outset border, or a white background on the dark theme, and an input no rule names, put into the group editor, must not be inset. Chromium and WebKit, en zh zh-TW ja de, 1100 and 420px, light and dark. Run on mote (mote-run), at |
||
|
|
af7edcc02a |
gui: the Library's project section is titled by what it holds
The owner (11-12): the MCP tab's 项目中 ("In projects") read oddly over
the servers a project gets. The heading now says what the section is:
"Project servers" on the MCP tab and "Project skills" on the Skills tab,
which shares the section (项目服务器 / 项目技能, 專案伺服器 / 專案技能,
プロジェクトのサーバー / プロジェクトのスキル, Projektserver /
Projekt-Skills).
Run on mica, at this tree: project-servers, project-skills-groups,
project-scope, library-mcp-agentless, library-all, i18n-keys and
i18n-en-no-cjk, chromium and webkit: all ok (6, 12, 6, 22, 26, 4, 4).
project-servers checks the heading in en and zh, project-skills-groups
in every language. Broken by hand (t("In projects") back): both go red,
6 of 6 and 12 of 12.
Not tried: the real app; the change is the heading's words.
|
||
|
|
5c00da3b25 |
gui: a group's note says it is optional
The owner (11-12): the note field under a group's name read as one more thing to fill in. Its placeholder now starts with "Optional", in every language: 可选,例如:给工作 Key 用 and the like. Run on mica, at this tree: group-note, group-keys, group-redact and i18n-keys in chromium and webkit, every language, 1100 and 420px: 86 of 86 ok. Broken by hand (the old placeholder back): group-note goes red. Not tried: nothing beyond the GUI tests; the change is the placeholder's words. |
||
|
|
109559913a |
gui: a group's gateway keys and masking sit under Advanced
The owner (11-12): few people bind a group to gateway keys or change how it is masked, so the group form showed two rows most never touch. Both rows now sit in the group's Advanced fold with the rest of what is set rarely, and the fold opens by itself when either is set, so a bound or masked group still shows it. Run on mica, at this tree: group-keys, group-redact, group-note and i18n-keys in chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 420px: 86 of 86 ok. Broken by hand (the two rows back at the form's top level): the keys, redact and note tests fail, 50 of 82 red. group-redact now reaches its chip with reader.cjs reach(): Playwright's scrollIntoViewIfNeeded is put back by the app's scroll hold at 420px, which made it click the wrong place there. It also checks the click does not move the page. Not tried: the real app with real gateway keys. |
||
|
|
fa7e466acd |
gui: Settings' gateway row is titled a port when a port is what it takes
The owner (11-12): the row over a field that takes 3425 read 网关地址 (Gateway address). Only the port is typed there; it is titled Gateway port (网关端口, 閘道連接埠, ゲートウェイのポート, Port des Zugangspunkts), and the field's aria-label with it. With MAGPIE_ADDR set the field shows the whole host:port, off, and the row keeps Gateway address, as Chicring asked before. Run (mote, both engines): gateway-port, i18n-keys, i18n-en-no-cjk, 14 of 14 ok. Broken by hand: settings.js put back as on origin/main, gateway-port red in both engines (expected 'Gateway port'). Not tried: the real app. |
||
|
|
648cd3fdbb |
gateway: the management API leaves other keys that manage magpie alone
|
||
|
|
2bcbae35ef |
gui: Partners' heading in the Add sheet ends in "Become a sponsor"
The owner asked for an elegant sponsor button at the right of the Add sheet's Partners heading (在右边加上一个优雅精致的我要赞助的按钮). It is a quiet pill with an accent heart outline: 我要赞助 / 我要贊助 / スポンサーになる / Sponsor werden. Hover changes colour and border with `ease`, gated to a fine pointer, and :active scales to .97. A click opens the same mail usemagpie.ai's "Become a sponsor" writes (mailto:yetoneful@gmail.com?subject=Sponsoring%20magpie). /api/open lets through that one exact link (sponsorMail), not mailto: at large. Web mode sets location to it. The heading and the button share a .kind-row. The heading keeps its own box, so the Partners shine still wraps only the words. The shine test now finds the tiles after that row. Run on mica (mote was at load 33-57): - node --test add-sponsor-me, add-partners-shine, add-sheet: Chromium and WebKit, en/zh/ja/de at 900 and 440px. The new file and the shine file are green. - add-sheet chromium is red 1 of 3 with "Cannot read properties of null (reading 'serverPin')". It is red 1 of 3 on untouched origin/main |
||
|
|
1f9d2c36c6 |
edit: the YAML looks keep a slim tree, not yaml.v3's nodes
GetYAML, GetYAMLMap and GetYAMLList read the file through filememo, which kept yaml.v3's whole node tree for as long as magpie runs: ~160 bytes a node behind a pointer, with a tag, styles, comments and places that no look reads. For dsh's 68 KB settings.yaml, read by RenameLegacy at start and by dshGet on every poll, plus Hermes' config.yaml, that tree was the largest thing left in an idle tray's heap. The looks now keep a yamlLook instead: a node's kind, a scalar's value, and the nodes under it held inline. GetYAMLText still marshals yaml.v3's tree, so it keeps one under its own memo kind; only MiniMax's file is read that way. Run (pushed head's tree, on mica and mote): - go vet ./internal/edit ./internal/agent; go test ./internal/edit ok; go test ./internal/agent ok (190s, mica). - TestYAMLLooksReadAsTheNodeTree holds every key path of a file with anchors, aliases, merge keys, flow and block lists, complex keys and comments to what lookupYAML on yaml.v3's tree reads. Broken by hand (a mapping key copied as its tag, not its value), it goes red. - Idle tray, real account sandbox with the owner's 25,379 probe lines, at 150 s, three alternating runs: live heap 9.21 MB (w38, v0.1.3941) vs 8.39 and 8.41 MB (this); footprint 77 vs 75 and 74 MB. edit.parseYAMLRoot is gone from the inuse top. Not tried: Windows or Linux (no OS-specific code here). |
||
|
|
d85ee9e53f |
usage: the probes are kept in packed blocks, as the gateway rows are
The request log's probes (magpie's own tests, model lists, MCP tool calls
and searches) were a slice of whole Records, 952 B each, and every read
that continued the log appended to a copy of it. The owner's real log has
25,379 of them (25,223 MCP tool calls): ~24 MB of live heap in every
running app, the tray's included, for rows only the Requests page lists.
Now they are rowChunk blocks of logBlockRows, frozen (packed) when full,
the last one reopened as a copy for the next append (probeRows), the way
readLogSnapshot keeps gateway rows. probeChunk and log-v1.bin read them
back through chunkRows; a block whose Latest is before since is skipped
whole. log-v1.bin's format is unchanged.
Tests: TestProbeBlocksContinued (3 blocks + an appended block: the earlier
snapshot reads as before, the continued read equals a fresh parse, since
cuts at the right row). Broken by hand: dropping the continued snapshot's
probe blocks turns it red. TestStartReadsKeptLogBlocks covers the disk
round trip with probes.
Run at this head on mica: go vet ./internal/usage; go test ./internal/usage
./internal/gateway/... ./internal/gui, all ok (gateway 869s).
Real app on mote (sandbox HOME from the real-account sandbox, plus the
25,379 probe lines of the owner's real log), tray idle at 150s, cold:
before (w36, v0.1.3938's code): footprint 105 MB, live heap 48.4 MB,
readLogSnapshot 26.5 MB of it
after (w37): footprint 70 MB, live heap 16.0 MB, readLogSnapshot out
of the top; warm start (log-v1.bin read back): live heap 15.6 MB
Requests page, web mode, same HOME: requests.csv byte for byte the same
on both builds; /api/usage/requests' 100 rows the same apart from the 4
probe rows the first run itself wrote (token refreshes through the dead
proxy).
Not tried: Windows and Linux (no OS-specific code here).
|
||
|
|
41e330bdf8 |
gui: an agent's settings sheet opens from the panel again (#6139)
|
||
|
|
19fd0dfb87 |
catalog: mmddSnapshot compiles on first use
|
||
|
|
b552740c4b |
cli: name POST /api/settings/codex-client and codex-open as not yet a command
|
||
|
|
926b1e7dfb |
provider, gui: put back what 8c7328f3a took out of main by mistake (35aaaa4b9, 2fa79aef3, 797a23cad)
|
||
|
|
f1f512c1ec |
library: a repository's heading folds an agent's profiles into one chip, and a row's profiles chip lines up with the hand (Yanzhongixuy on X)
0.1.3926, several Hermes profiles: the Skills page's source headings (anthropics/skills ...) drew one icon per profile, a long strip, and the one chip |
||
|
|
8c7328f3a6 |
remote quotas: a Remote set to Select none still tells its cards (@LOYSoLuI4PG4WlN on X)
On 0.1.3929 a Remote magpie added for the Usage page's quotas showed none of the remote's subscriptions any more. |
||
|
|
797a23cade |
gui: the tray holds its page words in one language, not all four
The tray's tooltip names a usage window as its card does, with the page's own translations from assets/i18n.js. pageWords parsed all four language blocks (zh, zh-TW, ja, de, ~20k entries) once and kept them for the life of the process: 6.5 MB of an idle tray magpie's heap, for the few dozen words one language needs. It now parses only the block of the language asked for and keeps that one; a change of language reads the file again. Run (real account sandbox on mote, `tray`, no page, 150 s): - w35 (before): footprint 71 MB, live heap 16.7 MB; pageWord 6.5 MB cum. - w36 (this): footprint 67 MB, live heap 12.4 MB; pageWord 0.5 MB cum. On mica: go vet ./internal/gui; go test -run 'PageWords|TrayTip|Tray' ./internal/gui ok, with a new TestParsePageWordsInOneLanguage (one block read; ja then zh each give their own word). gofmt clean. Not run: the full suite. |
||
|
|
2fa79aef35 |
provider: a save of the bytes the file already holds changes nothing (#6289) (KdhsiiKshshhs on X)
writeLogins and writePrivate rewrote logins.json with identical bytes, which moved its mtime and called filememo.Forget, so every read after parsed the 230 KB file again (anton1615 measured 182 reads in 15 s, CPU 3.3x after each write). Now a file that holds exactly these bytes, at the mode the write would give it, is left alone: no lastgood generation, no rename, no Forget. A stat or read that fails is "not equal" and writes as before. Real changes keep steady.WriteFile's temp-and-rename. The same check is in writePrivate, writePrivateQuiet and (writeChanged) the sibling writers of codex-autoreset, codex resets-used and Kiro's token file. Nothing else bumped the mtime in the reporter's path: the other writers of logins.json (rememberLogins, Claude/Codex sign-in syncs) all go through writeLogins. Changed() still runs on a told save, so a list built before it is not reused (TestLoginsListedOnceARequest unchanged). Run on mote: TestUnchangedLoginsSaveKeepsFileAndParse and TestWritePrivateSameBytesLeavesFile, -count=20 green; both red with fileHolds forced to return false (mtime moved). gofmt clean; go vet on darwin, linux nogui, windows nogui; go test -tags nogui ./internal/provider ./internal/filememo ./internal/lastgood (result below in the push notes). Not tried: the reporter's 130-account gateway; the full suite before the tag. |
||
|
|
35aaaa4b94 |
codex: a setting for which client the requests to ChatGPT say they come from, CLI or Codex Desktop (ouhthuo on X)
ouhthuo wants the originator "Codex Desktop", with which, they say, a high-effort gpt-6.1-sol request is routed to a newer model. magpie sent codex_cli_rs on every request, and codexSign even overwrote a real Desktop's own originator. Settings > Codex > "Codex client" (CLI, the default, or Codex Desktop; the settings key codexClient is "" or "desktop", POST /api/settings/codex-client, no free text). codexClientHeaders is the one place that sets originator and User-Agent, so the model requests, the /wham usage and reset calls, the token refresh, the device and code sign-in exchanges and "test as" all follow it. Desktop sends originator "Codex Desktop" and the UA shape codex-rs builds for it: Codex Desktop/<codex version> (<os>; <arch>) unknown (Codex Desktop; <app build>). Source: codex-rs login/src/auth/default_client.rs and a captured Desktop UA. The default is unchanged; base_instructions and the identity prompt are untouched. The OAuth authorize URL keeps codex_cli_rs. The row sits in the Codex agent preferences, 5 languages. The two Codex menu buttons share one helper (codexMenuPick) so app.js stays inside its budget without raising it. Run (mote): TestCodexClientSetting (red with codexClientHeaders ignoring the setting), settings, settingsapi, gui and provider Codex tests ok; gofmt clean; go vet darwin, windows and linux nogui clean; GUI codex-client, codex-service-tier, codex-open-button, i18n-keys, i18n-en-no-cjk, settings-general, click-scroll in chromium and webkit ok. Real Codex account in a sandbox HOME: gpt-6.1-sol and gpt-6-sol at high effort answer under both identities with identical usage; the reply's model field only echoes the requested name, so whether the served model differs can't be told from here. Red and not mine, already filed: settings-search (#6133, #5982) and agent-prefs "Settings line" (#6139) fail on origin/main, TestMoveToPlugin #5524. Not tried: the real Desktop app (not installed here); the app build number in the UA is the newest seen in local logs and can go stale. |
||
|
|
227171f69b |
tests: the tallies fixtures key a seat with a plan as the gateway does (RayYanOnline on X)
routing-acts-calm and routing-acts-idle wrote the day's tallies under the two-part key; tallyKey adds the plan since 2240e5b34 (
|
||
|
|
1488762dae |
settings: MCP server addresses get the This computer / Local network switch (xzhih on X)
Settings > Models showed Image recognition's, Image generation's and Web search's MCP server at 127.0.0.1 even on a magpie shared on the network. While sharing is on, each address row now has a switch beside it, This computer and the far address named as the gateway names it (addrWho: Local network, Public address, On the internet). The far address is the one the sidebar uses (sideLAN), so MAGPIE_PUBLIC_URL, container and LazyCat rules carry over; nothing is copied. The pick is kept (magpie.mcpWhere); an app starts at This computer as before, a page other machines opened (magpie web) at the far address. Sharing off: no switch, as before. The Library hub and the plugin tools line follow the pick through mcpAddress (no switch of their own). The two image rows moved from app.js into plugins/gateway/settings.js with the switch; app.js ends smaller, and the core budget is met. Run on mote at this tree: mcp-address-lan.test.cjs (new, 22 tests: chromium and webkit, en zh zh-TW ja de, 1100 and 420px) 22 pass; with mcpAddress's hook removed 11 of 11 chromium tests fail. vision-mcp, image-mcp, search-mcp, public-url-default and 98 tests in all pass; the lan/mcp/ gateway/settings/search/vision/image GUI subset (122 files, 2181 tests): 2114 pass, 67 fail; the six failing files I reran (side-effort, settings-hints, settings-search, lan-join, images-codex-one, settings-lines-wrap) fail the same 35 tests on a clean origin/main copy, so they are not from this change; filed separately. The other failing files' names were lost to a tail (not reread). go test ./internal/gui (core budget included) ok; go vet darwin, linux nogui, windows ok; gofmt clean. Not run at the rebased head: the Go suite beyond internal/gui; the whole GUI suite and go test ./... (mote and mica both held a GUI suite; queued after the tag). Not tried: a real LAN server. Library hub address and the plugin tools line show the picked address but have no switch of their own; they read it when drawn. |
||
|
|
8097860ab1 |
gui: put back what 76ceff87c took out of main by mistake
|