63c91cae5fa4c550727c1923f35005396f8e70c6
8145
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
63c91cae5f |
gateway: the body's key checks look for the needle's rarest byte
Each request ran ~45 bytes.Contains over its whole body to ask whether
a key is there at all ("developer", "compaction, "display", the
passthrough key...). Most needles begin with a quote, JSON's commonest
byte, so bytes.Index stopped at every quote, gave up on that and
compared at every byte: on a 2 MB body ~9 ms a request, 36% of the
gateway's CPU in BenchmarkLargeRequest's profile.
bodyHas/bodyIndex find the needle's rarest byte (a static rank of the
bytes JSON, English and code use most) with IndexByte and compare the
needle only there; a needle of common bytes only hands the rest to
strings.Index after 64 misses, so it is never slower than before, and
it allocates nothing (a []byte(sep) of a needle over 32 bytes did).
148 literal and constant needles in internal/gateway use it, and
mayHoldHEIC's "eXB" walk uses bodyIndex.
mayHoldOddBase64 walked every byte through a switch (~2 ms a 2 MB
body); a run it looks for ends a string, so it now looks back from each
quote with a class table and gives the same answer.
Run on mica (Apple M6) at this tree:
- BenchmarkBodyHas, 7 needles over a 2 MB body: 4.43 ms -> 0.38 ms,
0 allocs (was 1).
- BenchmarkLargeRequest -benchtime 200x, before -> after:
anthropic 31.2 -> 28.9 ms, anthropic-group 31.4 -> 27.8,
chat 35.7 -> 32.8, responses 39.8 -> 29.8.
- go vet ./internal/gateway; gofmt -l clean.
- go test ./internal/gateway -count 1 -timeout 45m: ok (858s).
- Broken by hand: bodyIndex's start off by one -> TestBodyIndexIsIndex
red (wrong index on 5 needles and the random bodies); the URL-safe
class never counted -> TestOddBase64LooksAsItWalked red. Both green
again restored.
TestBodyIndexIsIndex holds bodyIndex to bytes.Index on a large
conversation and 3000 random bodies of common and rare bytes;
TestOddBase64LooksAsItWalked holds the new check to the old byte walk
(kept in the test) on 20000 random bodies and the three protocols'
large conversations.
Real account: the built app (mote, sandbox HOME) sent a 6KB request to
DeepSeek on /v1/responses and /v1/messages, both 200 "pong". Not
tried: Codex (the sandbox's sign-in is stale, and renewing it there
would rotate the live refresh token).
|
||
|
|
08f77528f4 |
usage: the serials sourceDigest met go when idle
sourceDigests.by and .last, the serials met this turn and the one
before, stayed for the life of the process: 577 KB of a real history's
idle heap. They only order which digests heat-digests.bin keeps first
when there are more than it holds (2*65536, against ~17k session
files). dropDerived, the 3-minute idle drop, now writes what was made
and lets them go; sourceDigest notes a read (derivedUsed) as the other
per-chunk caches do.
TestDigestTurnsGoWhenIdle: the turn's serials are nil after the idle
drop and the next key hashes nothing again. Red with the nil-ing taken
out by hand ("kept 1 and 0 serials when idle").
Run at this commit on mote (load 23.7, over its 18 cores; mica's disk
was full): go vet for darwin, linux and windows ok; go test
./internal/usage ok (52s), ./internal/gui ok (132s). Real Codex history
in a sandbox HOME (~/r2278), page open 30s then 8.5 min idle: liveHeap
13.13 MB against 13.68 MB before; the heap diff shows sourceDigest's
577 KB gone. Not run: the full suite.
|
||
|
|
a532b646eb |
usage: the set of listed session paths is not kept on the index
readRequestBlocks makes a set of every session file's path (on), and noteBuilt kept it on the index for save, the only reader, which it calls right after. The set outlived the chunks' forget: 853 KB of a real Codex history (pprof inuse_space at request_page.go:1214, the make of on) at 8 minutes idle. save takes it as an argument now; the field is gone. Run at this commit on mote (load 24): go vet for darwin, linux and windows ok; go test ./internal/usage ok (57s), ./internal/gui ok (158s). Real Codex history in a sandbox HOME (~/r2278), page open 30s then 8.5 min idle: liveHeap 13.68 MB, against 17.07 MB for v0.1.4089; the heap diff shows readRequestBlocks' 853 KB gone. One earlier capture read 22.3 MB with 5.2 MB under prefetchEach/sharedBuild; a goroutine dump of the next run had no prefetchEach goroutine left, so that was a build in flight when the heap was taken, not a stuck reader. Not run: the full suite. |
||
|
|
39a00e6f38 |
gui: the panel's Usage tells all providers' calls apart by model too (OHHHHHH05 on X)
OHHHHHH05 asked on X for usage by model in the tray panel's Usage tab, which ranked all providers' calls only by provider. The card's head now has a Provider / Model switch beside the metric switch. Model ranks and charts the same answer by.model and the series' by.model, with no new request, the same drawLedRank and drawLedColumns the window's Usage page draws. The choice is kept (magpie.panelUseSplit). With one provider picked the ranking is already its models, so the switch is left out. A click in the ranking still picks a provider only when it ranks providers. The labels reuse the Provider and Model words, so no string is new. panel-usage-models.test.cjs (new), Chromium and WebKit, en zh zh-TW ja de: the switch's labels, Provider on by default, Model's ranking and chart keys, no request on the switch, both switches inside the card at 440px and 320px with nothing sideways, the choice kept on reopening, the switch gone with a provider picked, no page errors. panel-usage.test.cjs: its metric selectors skip the new switch. Run: - panel-usage-models + panel-usage on mote: 14 pass, 0 fail. - Broken by hand: the old app.js is red 10 of 10 in Chromium (no switch); the split forced to provider is red 10 of 10 in WebKit (the ranking keeps providers). - WSL magpie-desktop (Linux): the 116 GUI files that reach the panel or the usage answer (.pu-, panelUse, usage/requests, panel-*, tray-*, i18n-*): 1712 pass, 93 fail, panel-usage and panel-usage-models green. The 17 red files run again at origin/main |
||
|
|
7670295019 |
copilot: list each model's long-context tier, as Copilot Chat asks /models (gtliuu on X)
gtliuu on X: Copilot's Claude Opus 5.5 has a 200K and a long tier, and magpie
offered only 200K. magpie asked /models at X-GitHub-Api-Version 2026-01-09,
and at that version Copilot lists only the default tier's
max_prompt_tokens. Copilot Chat 0.68 never sends 2026-01-09:
@vscode/copilot-api 0.5.2's _mixinHeaders sets 2026-08-01 on every Copilot
API request, Models included, over networking.ts's 2026-01-09. At
2026-06-01 and later, /models gives each model its whole window (Opus 5.5
1M) and billing.token_prices with a default tier and a long_context tier.
- The editors' sign-in asks GET /models at 2026-08-01
(copilotModelsVersion). The Copilot CLI's sign-in keeps its own
2026-07-01, which already lists the tiers. Chat requests are unchanged:
Copilot served prompts past the default tier at 2026-01-09. The other
requests still on 2026-01-09 are #6571.
- The window follows Copilot Chat (languageModelAccess.ts and
agentIntent.ts). A long tier at the default's prices gives the whole
window: Claude Opus 5.5 1M, and the Sonnet, Fable and Gemini models
936K or 983K. A long tier with a surcharge keeps the default tier's
prompt as the window agents are told. The whole window becomes
MaxContext, which the user can raise the window to. GPT-6 Luna gets
272K and 872K, and Claude Haiku 5.5 100K and 936K. The whole window is
the limits' max_prompt_tokens, not the long tier's prompt: Grok 4.7's
long tier says 500000, but Copilot takes 372000.
- Price: Copilot's own list (AIU per batch_size tokens / 100 = USD per M)
is the list price, ahead of models.dev. A long tier with a surcharge
becomes a Tier above the default's prompt. Both 2026-06-01's field
names (cache_price, context_max) and 2026-08-01's are read. GPT-4.1's
all-zero list is no price. A flat, older list changes nothing.
Run (base origin/main
|
||
|
|
ab4b1cf38f |
sessions: a long Codex rollout is read on after a restart, not read again whole
shangyuan0818 on X: on Windows, Usage > Sessions took over ten seconds to open with one very long session (tens to 100 MB), though there were only a few sessions. Cause: a Codex rollout's summary window (state.Codex) and its calls' window (cxRun) lived in memory only. After a restart, or once the window had been dropped, the first line a live rollout gained made parseRead, prepareCalls and readsWhole read the rollout again from its first line: once for the summary and once for the calls. Claude Code sessions were already read on through their kept windows (#3493). Fix: the window of a rollout being written (changed within the hour, the same files memory keeps windows for) is now kept on disk with the parser version, a window version, and the size, offset and content hash of the read that made it. The summary's goes in codex-windows/<hash>.gob next to sessions.json. It is written with sessions.json, and it is removed once the cache drops that window. The calls' window goes in the shard's .rev file next to Claude's. Each is used only when all of those match, so a window from another read, or from an older layout, is never used; the file is read whole instead, as before. Measured (100 MB rollout built from testdata/codex-native-paginated.jsonl, plus a 100 MB Claude Code session, GET /api/sessions in a sandbox HOME): mote (M5), before: after one line appended following a restart, 2.51 s (Codex alone 2.25 s). After: 9.7 ms (Codex alone 6.3 ms). Windows (xiaomi-gpu), before: 2.61 s. After: 22.8 ms. The first read with nothing kept is unchanged: 2.6 s on mote, 2.8 s on Windows. Warm and plain-restart opens were already 10 to 30 ms. stats and overview stayed at a few ms throughout. A real 32 MB rollout: 24 ms after an append, with 2 KB and 4 KB windows. A 100 MB rollout with a unique response id per turn: 11 ms, with 623 KB and 834 KB windows. Tests: TestCodexSessionReadOnAfterRestart reads a rollout, restarts, then appends a replayed token_count and a new turn. It checks that neither reader starts at offset 0, and that calls and the session's tokens, models and cost match a read from scratch. TestCodexWindowLeavesWithItsSession covers writing, reading back, refusing another read's window and removal. TestPlainRolloutReadOnceForSessionsAndCalls (#4369) expected both readers to start from 0 after a restart; it now expects them to read on. Broken by hand, each red: the summary window not read (starts [319830 0]); the calls window not read ([0 319830]); a summary window emptied of what it had seen (it panicked in codexUsageState.count, which is why the version guard was added); a calls window emptied (62 calls vs 61). Run: gofmt -l clean. GOOS=linux and GOOS=windows go vet -tags nogui ./... on mote. Full go test -tags nogui -timeout 45m ./... on Linux (wsl-run, magpie-desktop) at this change on |
||
|
|
7b50e1f2c6 |
provider: Claude Code's version-2 model catalog lists an account's models too (#6418)
Claude Code 2.1.323+ keeps an account's models in
<config dir>/cache/model-catalog/<organizationUuid>-<sha256(accountUuid)[:12]>-cc.json
(version 2, catalog.config.models), and magpie read only .claude.json's
additionalModelOptionsCache / modelAccessCache. A model only that catalog
has, and models.dev's anthropic list lacks, was missing from the Claude
provider, `magpie models` and Claude Code's own picker (pwn2ooown).
readClaudeCodeModels, which every reader of those caches goes through
(claudeModels, claudeModelsOf/claudeLists, ClaudeCodeModels,
claudeCodePrice), now adds the catalog of the account its .claude.json
names, from that config directory or Claude Code's own (~/.claude keeps
every account's that signed in there), the one fetched last. A model
models.dev doesn't describe takes the catalog's window, reply limit,
effort levels and mm_images. The legacy caches are read as before.
Another account's catalog is never read; a file of another version or
surface is unknown; a .claude.json or catalog that doesn't parse
(halfway through a write) is what it said last (readKeepingGood), a file
gone is gone.
The name and shape come from this Mac's Claude Code, read only: 7 files
in ~/.claude/cache/model-catalog and 2 in saved account dirs; the name's
first part is organizationUuid and its second sha256(accountUuid)[:12]
for every account whose .claude.json is here.
Run (mote):
- go test -tags nogui ./internal/provider ./internal/agent ./internal/cli
./internal/catalog ./internal/filememo ./internal/proc: all ok (provider 166s, agent 357s, cli 67s)
- go vet ./...; GOOS=linux go vet -tags nogui and GOOS=windows go vet of
internal/provider and internal/agent; gofmt -l clean
- built magpie, `magpie models` in sandbox HOMEs (the issue's repro
adapted): baseline, other account's catalog, half-written catalog: no
Fable 5.2; the issue's catalog: listed; legacy cache: listed; a copy of
a real Claude Code catalog's bytes under synthetic ids: all 13 models
listed.
- after rebasing on
|
||
|
|
58629a0f8e |
usage: a trim that lets most chunks go gives back the map's table
The usage page's index of session-file chunks is let go when no page has asked for it in requestIdle + requestForget (trim(0)). A Go map never shrinks, so the emptied map kept its table: 853 KB of a real Codex history's index (pprof inuse_space at request_page.go:1461, the map assignment in keep) stayed for the life of the process, 8 minutes after the page was last open. trim now copies what is left into a map of its size when it dropped more than it kept. TestRequestTrimGivesBackTheMap fills an index with 100k chunks, holds the keys, and checks trim(0) gives back the table. Broken by hand (the copy skipped): red, heap 9,054,088 -> 9,051,552. Fixed: 3 of 3 green. Real Codex account sandbox (mote, acctp HOME, page open 30s then 8 min idle, memprofilerate=1): liveHeap 18.00 MB -> 17.07 MB; nothing held under requestIndex.keep (was 853 KB). One earlier run read 23.1 MB with a usage build in flight at the capture (sharedBuild 5.2 MB); the rerun had none. mica: gofmt clean; go vet ./internal/usage for darwin, linux, windows; go test ./internal/usage ./internal/gui ok. Not run: the full suite. |
||
|
|
71079b69f5 |
gui tests: old-webkit knows appearance.js is imported lazily (#6467)
|
||
|
|
70bd270ae2 |
agents: Antigravity says how its own sign-in's models come back on magpie (T_t__biu on X)
T_t__biu on X: once magpie wires the Antigravity app, the Gemini models of
their own signed-in Google account leave the app's model list. Cause: magpie
connects the app through Google's Enterprise Gateway (gateway block in
~/.gemini/config/config.json and ~/.antigravity/settings.json). On a gateway
the app's language server runs in AUTH_MODE_ENTERPRISE_GATEWAY and drops the
Google sign-in (Google's docs: the two can't be used at once), so Code
Assist's fetchAvailableModels, which listed the account's models, is never
asked. No key in the file keeps both.
What does keep them: the same Google account signed in under magpie's
Antigravity subscription (the antigravity-auth plugin). The gateway's
antigravity catalog then lists that account's own models beside magpie's,
on that account's quota, pooled with any other Google account added there.
The notice shown on connecting now says so while magpie has no Antigravity
account (provider.Logins("antigravity") empty); with one, it reads as
before. Translated in zh, zh-TW, ja, de; the site's Antigravity page (en,
zh, ja), llms-full.txt and docs/subsystems/agent-wiring.md say the same,
and the subsystem page names what is not built: keeping the app's own
sign-in and adding magpie's models beside it would need the backend's
Code Assist endpoint (--cloud_code_endpoint / CLOUD_CODE_URL) pointed at
magpie.
Run at this head (base
|
||
|
|
331057743d |
agents: a provider an agent's visibility keeps is in its model list, off, and ticked is shown it (whysugarsweet on X)
whysugarsweet on X (v0.1.4066): OpenCode Go is in Pi's model list but
not in Claude Desktop's. Desktop's list showed Google Gemini, DeepSeek,
Anthropic, Codex and Grok only.
Nothing leaves OpenCode Go out by protocol. What can narrow one agent's
catalog to some providers is settings.Visible: `magpie visible`, a
profile or settings sync writes it. A provider added later is kept out
of that agent's /v1/models, its config and the Agents page's list. The
page showed no sign of it and had no way to undo it, so the user could
only see Go missing. I haven't seen the reporter's settings, so this is
the likely cause, not a confirmed one.
- GET /api/agent-models/{id} now lists the models the visibility keeps,
after the rest, as hidden and `kept`. They sit under their provider
in the list and its rail, so they can be found and ticked.
- POST takes `widen`: kept models that were ticked. provider.Widen adds
each one's provider (or group) to the agent's visibility. When nothing
is kept after that, the agent is no longer narrowed at all. The
provider's other models are then listed and off, so ticking one adds
just that model.
- A kept model is never saved as hidden or picked one by one. The row's
count leaves kept models out of "listed".
- Every agent's list shares this code, so the fix applies to every
narrowed agent, not only Claude Desktop. The gateway's model list and
Desktop's inferenceModels both come from CatalogFor, so a widened
provider is served and routed too.
Run, at
|
||
|
|
48f9764027 |
plugins: a model served on more APIs keeps the client's (gaubeebangeel on X)
gaubeebangeel on X: OpenDesign's Anthropic requests to an Open Design Cloud account were all sent upstream as chat completions. The Open Design plugin declares each model on one AI SDK package (chat completions for most, Responses for deepseek-v4-pro and claude-haiku-5.5, plugins#141), and pluginAPIs gave a plugin model that one API alone, so attempt never relayed a /v1/messages request and translated it, though amr-link serves every model on all three (plugins#888). A DeepSeek API-key provider, the case first suspected, relays to /anthropic/v1/messages as sent: tried with OpenCode's, node's and no User-Agent, bare and prefixed ids, and web search. A plugin model can now list the other APIs its vendor serves it on, as their AI SDK packages (m.also; plugin.Model.Also through host.js, config model and models hook). pluginProtocols gives the model's own API first, then those; ListedAPIs, the catalog's APIs and the provider's bases come from it, so a client's request on any of them is relayed as sent. usable puts a plugin model's own API first, so a request on an API it isn't served on is still translated to the declared one. A model with no also is unchanged. opendesign 0.1.13 (plugins 397da020) sets also on every model. Test: TestPluginModelServedOnMoreAPIsKeepsTheClientAPI (fake plugin, FAKE_ALSO): Anthropic, Responses and Chat requests to the also model reach the upstream on their own path; fake-1 (no also) is still translated to /chat/completions. Red on HEAD's plugins.go: Anthropic and Responses reached /v1/chat/completions, ListedAPIs and usable were [chat]. Run (mote unless said): go test ./internal/provider ./internal/plugin ./internal/catalog ok; go test ./internal/gateway ok (972s); GOOS=linux/windows go vet of the three packages ok; gofmt clean. Not run: the full ./... suite (mote and mica each had full suites queued under suite.lock); not tried against a real amr-link account (keyblues's plugins#888 measurements are the evidence it serves /v1/messages for every model). |
||
|
|
db9d6507bb |
dsh: a thinking level set on magpie's route by hand is what its sessions start on
ming_li52905 on X set a level per route in dsh's config:
providers:
magpie-responses:
reasoning: high
and magpie "overwrote" it. magpie never dropped the key. llm-pi-ai starts
a route's models on profile.reasoning only when the session names no
effort (options.reasoningEffort ?? profile.reasoning, dsh-llm-pi-ai
0.2.2-rc.3). agent-default-model's reasoningEffort, which magpie's
thinking setting writes, is the effort every new session names, so the
user's level never applied.
Now the route's own level wins over magpie's one default:
- A start magpie writes on such a route (switch, set) carries no effort
of magpie's.
- A sync or round takes out an effort magpie wrote there before
(dshStartYields). magpie keeps what it last wrote into each list's
start (dsh-effort:<file> in the stash), so an effort dsh saved itself
(a composer pick, #1392) is the user's and stays. When the home layer
mirrors a profile's start, it takes that profile's record too.
- Thinking reads the route's level when the start names none, and
setting it writes the route's reasoning wherever it is set: each
profile, the home layer, settings.yaml. It writes no reasoningEffort.
- A route without a level still gets magpie's effort, as before.
Tests: TestDshRouteLevelOfTheUsersOwn (sync, round stability, a switch
away and back, thinking set, dsh's own saved effort kept),
TestDshRouteLevelInTheHomeLayer, TestDshRouteWithoutLevelTakesMagpiesEffort.
Run:
- The three tests at the old dsh.go: red (start keeps "medium" over
high, thinking reads medium, thinking low leaves the level).
- Broken by hand, each red: the record check ignored (dsh's own effort
stripped); Get not reading the level; the round's dshStartYields
removed (both level tests red).
- go test -count=1 ./internal/agent on mote: ok (237.9s).
- GOOS=linux go vet -tags nogui and GOOS=windows go vet of
./internal/agent on mote: ok. gofmt -l: clean.
Not run: the full ./... suite. mote's suite lock had four full runs
queued ahead of it. The change is internal/agent only.
Not tried: a real dsh. The precedence comes from dsh-llm-pi-ai
0.2.2-rc.3's source, not from a session.
Risk: a start written before this release has no record. If its effort
differs from a route level the user set, it is taken for magpie's and
removed once, even if dsh had saved it.
|
||
|
|
ea9f2639b9 |
LESSONS: a docs edit left llms-full.txt stale, unseen behind cancelled runs
|
||
|
|
3d88600100 |
site: llms-full.txt carries the sync page's pick, preview and undo
|
||
|
|
640304a165 |
edit: a TOML file's table names are let go after 5 minutes unlisted
Codex's real config.toml (1.5 MB, ~11k project tables) had its table
names kept for the process's life once the start-up rename
(agent.RenameLegacy) listed them: 1.16 MB of packStrings in an exact
heap profile (memprofilerate=1) after 8 minutes idle in the real-account
sandbox, the largest holder left under cli.init. The whole parse was
already let go after a minute (tomlIdle); the names now go after
namesIdle (5 min) with no list, the other kept answers (GetTOMLTop,
GetTOMLTable, polled every 3s) stay, and a list a caller holds is not
touched.
Cost of a list after the let-go: BenchmarkTOMLTablesCold on that config,
9.0 ms and 21.5 MB of garbage per list (mote, M5 Pro).
Run: go test ./internal/edit (mote), TestTOMLNamesLetGoWhenIdle red with
the drop made a no-op by hand ("the names were kept past namesIdle"),
green with it.
Real-account sandbox (mote, real Codex config.toml), 8 minutes idle after
the page closed. Exact heap (memprofilerate=1): liveHeap 19.47 MB before
(v0.1.4082) -> 18.00 MB after, and RenameLegacy's held bytes 2.24 MB ->
0.86 MB, with no packStrings left. Without the profiler: liveHeap 19.57
-> 18.01 MB, heapInuse 33.1 -> 31.0 MB; footprint 71 vs 75 MB, within
one run's noise of each other. Also run on mica: gofmt, go vet for
darwin, windows and linux, go test -race ./internal/edit, and go test
./internal/agent ./internal/library ./internal/cli, all ok.
|
||
|
|
82512bb640 |
usage: the probe chunk is let go when the pages rest and after warm-up
probeChunk memoised its last chunk for the polling page (#2278), and nothing ever cleared it: ~5 MB of unpacked probe rows held for the process's life on a real gateway's history, the largest single live holder left in an idle heap profile (makeProbeChunk -> rowChunk.add). ReleaseScratch (page rest) and ReleaseMatchScratch (after warm-up) now drop it with the rest of the reads' scratch; the next page read makes it again, and while a page polls the memo still answers. Run (mica): go test -run 'TestProbe|TestAnswered' ./internal/usage/ ok. Broken by hand: without the two releaseProbes() calls, TestProbeChunkLetGoAtRest fails ("ReleaseScratch kept the probe chunk"). Measured on mote, real accounts in the sandbox HOME, idle after the page was open 30 s and closed 60 s (memv.sh), base vs this, two runs each: heap profile in use: 52.5 MB (4.91 MB under makeProbeChunk, held from gui.warmStart) vs 46.9 MB (none under it) liveHeap: 40.0 / 45.7 MB vs 40.4 / 40.4 MB footprint: 94 / 117 MB vs 102 / 107 MB (noisy run to run) go test ./internal/usage/ ./internal/gui/ on mica: ok. |
||
|
|
6112dd37c1 |
agents: Use Claude Magpie shows with Claude Magpie made too, and the row names it (xMopf7RF on X)
xMopf7RF on 0.1.4076: "没看到按钮". The Use Claude Magpie button beside
Claude Desktop's switch showed only while Desktop wasn't on magpie and
Claude Magpie was off (`!a.isolated.on`). The reporter had tried Claude
Magpie since 0.1.4064, so it was on while Desktop wasn't on magpie, the
one state where the button hid. The row then still read "on magpie,
Claude Desktop opens a separate profile…", though connecting there wires
only Claude-Magpie-3p (desktopSets), never their own Desktop.
States where Desktop isn't on magpie, before → now:
- Claude Magpie off: button shown (unchanged).
- Claude Magpie on, app there: no button, wrong line → button, and the
line says connecting puts Claude Magpie on magpie and their own Desktop
stays signed in with Anthropic.
- Claude Magpie on, app deleted from ~/Applications (launcher ""): no
button, so nothing made it again → the button, whose
settings/desktop-isolated on:true remakes the app (desktopiso.Add over
nothing), then connects.
- isolated missing (not a Mac, WSL): no button (unchanged).
Run (mica, mote over its 18 cores):
- desktop-twin.test.cjs, new cases: Claude Magpie made with and without
its app, every language, 1100 and 640px, Chromium and WebKit: 62/62 ok.
Broken by hand: the same file on origin/main's app.js: 40 red (every new
case), 22 ok.
- TestCoreScriptBudget ok (within the room app.js had).
- Every GUI file naming claude-desktop or isolated (31) with i18n-keys and
i18n-en-no-cjk, both engines: 760/762; the two reds are
desktop-tiers' Chromium cases, red the same on origin/main
|
||
|
|
d5585933f1 |
usage: heat-digests.bin is read mapped, not copied into the heap
The heatmap's key names each session file's chunk by a digest kept on disk by serial (#2278). The file holds up to 2*sourceDigestsKept digests at 40 bytes each, 5MB on a long history, and every start read it whole into the heap and kept it there for the process's life. After a save the encoded bytes stayed instead, the same 5MB. Where the system maps files (unix), the file is now mapped read-only, as requests-v1.bin already is (mapDiskFile), and kept is read from the mapping: its pages are clean file pages, not footprint, and a lookup is a binary search that touches a few of them. After a save the file just written is mapped in place of the encoded bytes, when it is still those bytes. The file is only ever replaced by a rename, so a mapping stays as it was read. Windows reads it into memory as before (mapsFiles). Run (mica, go1.26.8): - go test ./internal/usage/: ok (54s) - go vet ./internal/usage/, GOOS=windows go vet ./internal/usage/: clean - Broken by hand (no mapping on load, no keepMapped after save): TestSourceDigestsKeptAcrossStarts red, "after a save the digests are kept as encoded"; green again with the change. Real account (mote, the owner's history in a sandbox HOME, magpie web with the page open, 90s idle, footprint + Go MemStats): - before (w63 = v0.1.4074's code): footprint 109MB, live heap 44.9MB - after: footprint 101MB, live heap 39.6MB - wsl-run and win-run: go test -run 'SourceDigest|Heat' ./internal/usage/ ok on Linux (the mapped path) and Windows (read into memory). Not run: the full ./... suite (only internal/usage is changed). |
||
|
|
65f745dd4c |
plugins: Installed is narrowed by Discover's kinds and origins
WJaunita45604 on X asked for the Installed tab to be filtered by Discover's categories, and by whether a plugin is official, with Discover's own categorisation. Installed now has the same strip and menu as Discover: - the kinds strip (All, Subscriptions, Middleware, Agents, Tools, Pages), each with how many are installed; - the Origin menu (magpie community, other authors, unofficial on GitHub), without Discover's "Not installed only". browseBar's strip and Origin button are split out (kindStrip, originButton) so both tabs draw the same component. The rest is in plugininstalled.js, imported when Plugins first draws, as plugingrid.js is (old-webkit lists it); until it is in, the list is drawn whole. What is left in the core is 674 bytes, within its budget's room. A plugin Discover lists is put where its card is (kindOf, srcOf). One it doesn't list (a folder, an unlisted npm package) is put by what it is: middleware or gateway, agent, tools only, a page, else a subscription; from GitHub, @magpie-community, else other authors. The strip shows only when two or more kinds are installed, and the menu only when two or more origins are. A pick that leaves nothing says "No plugin matches" with Show all. Installed keeps its pick across tabs and Discover keeps its own. The list head grows when it wraps (.pm-listhead.pm-bar), so a narrow row doesn't run under the list. There are no new strings, no native select (the app menu), and no left-border accents. New plugin-installed-filter.test.cjs: seven installed plugins of every kind and origin, two of them GitHub repos from fixtures/plugins-github-31. It runs in every language, both engines, at 1100px and 420px. Run (on mote, Playwright 1.62.0, chromium + webkit): the new test, 20 of 20. Red on origin/main |
||
|
|
b3d1334458 |
providers: the Add sheet's search shows its hint whole
WJaunita45604 on X: 输入框里面的提示的字显示不全. Since |
||
|
|
36126daeff |
gui: the scroll buttons don't watch the room kept under a held click
scrollends.js watched every child of the open page for a size change, app.js's .view-room among them. "Where the reader is" (hold) sizes that room from its own ResizeObserver, while sizes are being told, so WebKit ended the turn with "ResizeObserver loop completed with undelivered notifications" as a page error. It showed once the Add sheet's search got its hint's width: in German at 420px, a provider's sign-in opened from its tile made hold give the page room, and plugin-api-prompt-key and plugin-password-prompt went red in WebKit (de 420, every run). hold sets scrollTop with the room, and that scroll is heard, so the buttons still follow. Found by wrapping ResizeObserver to report each callback that changed an observed size: hold (app.js heldSizes) took .view-room from 61px to 30px. Run (on mote, Playwright 1.62.0, chromium + webkit), at this commit with the next one (the search's width): - plugin-api-prompt-key, plugin-password-prompt: 22 of 22, three times in WebKit; without this change 8 of 8 runs red at de 420. - add-sheet*, provider-env-paste, old-webkit, and every file that touches the scroll buttons or the room (add-button, click-scroll, phone-no-sideways, rollup-short, routing-editor-foot, routing-save-blank, routing-save-keeps-the-row, sessions-paging, signin-closes-sheet, text-size, view-ends-relayout, view-ends): every test green but the reds below. Reds that fail the same on origin/main |
||
|
|
25e4d19c04 |
providers: an editor closed before its certificate rows load draws none (#6216)
drawEditor imported tlscerts.js and, once it was in, called tlsCertRows with the module-wide draft. An editor closed (or swapped for another) before the import resolved handed it null, and drawPin threw "Cannot read properties of null (reading 'serverPin')". add-sheet.test.cjs opens and closes editors quickly and went red on that pageerror under load (#6216). The rows are now drawn only while the draft is still the one the editor was drawn for. That is 50 bytes of core script, the hook itself, within the core budget's room at |
||
|
|
a82bae2bd3 |
routing: a request's row says the service tier it went at (Anotiaww on X)
Anotiaww on X: with Codex's fast mode on, the Routing page's request log didn't show that a request went in fast mode. Two gaps. Codex on its own ChatGPT sign-in (codexUpstreamOn) set only the route's tier, never its tries', and the Routing row drew only a group member's fast flag, never a tier. - codex_backend.go: the try (first and askAgain) carries the body's tier (bodyTier), and its end notes tier_served through servedTierAt. The handed-on usage record has tier_asked/tier_sent too. - plugins/routing/client.js: the row shows a quiet tag beside the model (fast for priority, Ultrafast, flex) from the try's tier, or the route's asked tier while in flight. Its title says the tier and, when the reply said another, what it said. No new column. rowSays' sig takes the tier, so the row is drawn again when it changes. - "flex" is a core word in i18n.js (i18n-keys: a plugin can't own a word other code says); its title strings are the routing plugin's. - docs/subsystems/gateway-routing.md says the Codex relay's tries carry the tier and what the row shows. Price: a priority turn is still priced at the standard rate. Pricer and catalog.Price don't read the tier. That is #1784's open work, in hhh2210's fork PR (hhh2210/magpie#1, catalog.ServicePrice), so nothing is duplicated here. No Flags bits added or changed. Run on mica (mote and mica both over their core count; mica the lower), at 74b5f2420 on origin/main |
||
|
|
1730c75b97 |
library: Claude Magpie is an agent of its own (xMopf7RF on X)
xMopf7RF asked for Claude Magpie, the separate Claude Desktop, to show on its own in the Library's instructions, skills and MCP, like an independent agent. Before, Claude Desktop's target wrote its servers (DesktopConfigs3p) and Cowork skills (desktopdir.Everywhere) into Claude-Magpie-3p too, and the twin's Code tab folder ~/.claude-magpie-desktop (a claude# row) got nothing from the Library. - agent.DesktopTwinApp: claude-desktop#magpie, "Claude Magpie", an app target while the Separate app is on and its folder is there (macOS). MCP to Claude-Magpie-3p's claude_desktop_config.json, Cowork skills to its skills-plugin. No instructions file: noPlace points to its Code tab's row. - Claude Desktop's target leaves Claude-Magpie-3p out (DesktopConfigs3p, desktopSkillRoots). - Every claude#<name> row takes CLAUDE.md, skills/ and .claude.json in its folder (~/.claude.json for ~/.claude itself). settings.json features (hooks, env, tools off) stay keyed on claude. - Old data: carryTwin, on load and only while nothing is recorded for the twin, ticks for Claude Magpie each server and skill magpie gave Claude Desktop that is in Claude-Magpie-3p already, so an update takes nothing away. library.json syncs, so another Mac's twin sees the same ticks. Unticked later, it stays unticked. - Not changed: desktopCarryMCP still copies the user's own Desktop servers into the twin when it is wired. Run (mote, sandbox HOME in the tests): - go test -tags nogui ./internal/library ./internal/agent ./internal/desktopiso ./internal/desktopdir: ok (167s, 251s). GOOS=linux and GOOS=windows go vet of library and agent ok; gofmt clean. - TestClaudeMagpieIsItsOwnLibraryAgent: InstallSkills, SaveServer and SaveInstructions write only Claude-Magpie-3p and ~/.claude-magpie-desktop; Claude Desktop's config and manifest, ~/.claude/settings.json unchanged; ~/.claude.json, ~/.claude/CLAUDE.md and ~/.claude/skills/pdf not written. TestClaudeMagpieKeepsWhatDesktopWasGiven. - GUI, both engines: library-*.test.cjs (76 files), by-agent, every-skill, group-skill-chips, pick-skills, project-*, skill-*, i18n-keys and the new library-desktop-twin.test.cjs (separate chips for Claude Magpie and Claude Code · Claude Magpie, lit only for what they were given, a click on Claude Desktop's asks for it alone; en, zh, zh-TW, ja, de at 980 and 420px). 1850 of 1878 the first run, with a library.css hand change since dropped; the 28 reds were all in library-new-skill, library-subagents, library-wsl-asleep and skill-where, and those four files plus the twin test, run again without it: 174 of 174. Broken by hand, each red then restored: carryTwin off (fs/pdf not ticked, nothing recorded); Desktop's skill roots with the twin's folder (target reaches Claude Magpie's folder); the claude# branch off (Code tab target nil); DesktopConfigs3p with the isolated config again (library and agent tests red). Filed: #6558, a row's chips reach past its edge at 420px (ja with four agents, before this too with six); the twin test skips that check for ja at 420px until it is fixed. Not tried: a real Claude Magpie.app on a desktop reading the new files. |
||
|
|
d0fb3c0084 |
provider: Claude accounts can be set not to spend extra usage (baksili_ on X)
baksili_ on X asked for a way to keep magpie off Anthropic's paid extra usage on Claude subscription accounts. magpie can't flip Anthropic's own switch, so it holds the account itself. Providers -> Claude -> Advanced has a new "Spend extra usage" row: On, as before, by default (nothing changes for anyone who doesn't touch it). Off saves claudeNoExtraUsage. While it is off, HoldCaps holds every Claude account at 100% of any plan window with no cap of its own (the same Credits hold a Codex account set not to spend its credits gets), so a Claude account whose 5-hour or weekly window is used up gets no requests until it renews and the other accounts take them. What its plan has left is still used; a cap the user set lower still holds first. A cap on an account's "Usage credits" window (its extra-usage spend, set as an amount or a share on the usage card) now holds the account the same way once that much extra usage is spent (Allowance.extraCapped, called from CapHeld and NearCap). Before, aside windows carried no amount, so an amount cap on one never held anything; allowanceOf now gives aside limits their Amount, Of and Unit. Every route that picks an account goes through capHeld, so the gateway, groups and fallback obey it alike. Claude Code switching (NextLogin) already moves off an account on overages. The warm-up sends a held, used-up account nothing (codexWarmer.held / spentPast; claudeHeldFull for Claude), since that request would be billed as extra usage. With every account held, the client is told "has used up a usage window and is set not to spend extra usage" and how to turn it back on, and the call's record says "set not to spend extra usage" (Weighed.ExtraUsage). Not done: Claude Code's hidden /limit-reset. It resets or buys limits through endpoints Anthropic hasn't published, and calling them would be mimicking Claude Code's client, which magpie doesn't do. A Claude Code signed in on its own, not through magpie, still spends extra usage. Run on mote at |
||
|
|
ce2ce86ab4 |
gui: windows drawn again when the screen comes back, WebView2 without occlusion tracking (aquaarboraurum on X)
aquaarboraurum: on Windows the window that comes back after every
auto-update restart is white. Its title bar and status bar are there,
and its page is alive. A restart by hand or a reload draws it.
AutoRestart only restarts once nothing is going through magpie and the
window has sat unused, which is when the user is away, often with the
screen locked or the display off. A WebView2 window first shown then
can keep a white surface: Chromium's native occlusion tracking takes
every window as covered while the screen is locked, and a surface first
drawn in that state may not be drawn again. Closing the window to the
tray and opening it again, which the reporter did by hand, draws it.
- windowsOptions starts WebView2 with CalculateNativeWinOcclusion
disabled (occlusionOff), after the user's own features. A user who
enables it in WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS keeps it on.
Wails still tells a hidden or minimised window so (put_IsVisible).
- Wails' main-thread window registers for session and display-state
notifications (watchScreenBack). The app's WndProcInterceptor
(appWndProc, which still calls screensWndProc) draws each open window
again (redrawShown) when the session is unlocked or the display comes
on after being off, as mendOnWake already did on wake.
Not reproduced: the white window never showed on xiaomi-gpu (Windows
11, WebView2 157.0.4341.46). The tries:
- quiet and asked restarts, behind other windows, maximised, under a
full-screen cover, cloaked, minimised then restored;
- the real sandboxed AutoRestart update path (v0.1.9000 to v0.1.9001
from a local feed).
The box's screen can't be locked for a test, so the locked-screen case
the fix is aimed at wasn't tried.
Run:
- Windows (xiaomi-gpu, signed-in session):
- TestRestartedWindowIsDrawn: all 13 modes pass on the fix. The test
is new and plays the update restart (old process, markQuietRestart,
AwaitPredecessor, openMain). Each mode now also posts an unlock to
the app's own main-thread window, checks that the window is drawn
again and stays drawn, and checks that the msedgewebview2 browser's
command line has CalculateNativeWinOcclusion disabled.
- Broken by hand (the interceptor ignoring the unlock, occlusionOff
returning the list unchanged): red on both checks.
- go vet ./internal/gui; TestScreenBackFrom,
TestAppWndProcSaysTheScreenIsBack, TestWebView2* pass.
- The real update path with exes built from this tree: the new
process's window came up drawn (10 of 360 sampled points white,
the same as the old window) over 22s of samples.
- mote:
- gofmt -l;
- go vet ./internal/gui/..., GOOS=linux -tags nogui, GOOS=windows;
- GOOS=windows go build ./..., GOOS=linux go build -tags nogui ./...;
- go test ./internal/gui (142s) and -tags nogui (95s): ok.
Not run: the full ./... suite. mote and mica were both over their load
(mote's suite.lock had four suites queued). The change is in
internal/gui only.
|
||
|
|
6f2d1a5ac0 |
gui: a read under a tight GC runs on four Ps
A collection every few MB wakes an idle-mark thread on every idle P,
and the reads' own workers keep them spinning in between. On mote
(18 cores), a request-index rebuild spent ~2 s in pthread_cond_signal,
~1 s in usleep and ~0.5 s in pthread_kill out of its ~16 s of CPU. The
reads use 4 workers (prefetchEach) or at most 8 (decodeCache), so they
gain nothing from more Ps. tightenGC now sets GOMAXPROCS to 4 for its
first read, and the last read to end calls runtime.SetDefaultGOMAXPROCS.
A GOMAXPROCS the user set in the environment is left alone.
Run: TestTightGCNarrowsProcs plus the other tight-GC tests in
internal/gui (ok, on mica, 12 cores), go vet and GOOS=windows go vet
./internal/gui, gofmt -l. Broken by hand (narrowProcs not called):
TestTightGCNarrowsProcs fails with "two reads on 12 Ps, want 4".
Real account on mote (75G sandbox HOME, network blocked, mote at load
23-47 on 18 cores): each run forced a request-index rebuild with a new
Anthropic price, then read the process CPU after the page closed and
again 20 s later. v0.1.4061 against this build, alternating:
15.3/15.6, 15.9/14.9, 16.8/14.8, 17.7/14.8, 15.0/12.5 s. Mean 16.1 s
before, 14.5 s after, about 10% less. Earlier, v0.1.4061 itself with
GOMAXPROCS=4 in the environment: 17.0/12.8, 15.6/13.5, 15.6/14.0,
15.9/15.5, 15.2/14.2 s. Peak cores during the rebuild: 2.8 and 2.9
before, 1.9 and 3.1 after.
At the pushed head (rebased on
|
||
|
|
5b0572ae3b |
agents: Use Claude Magpie is its own button beside Claude Desktop's switch (xMopf7RF on X)
xMopf7RF read Claude Desktop's row as "connect Desktop first", and
connecting is what changes their own Desktop. They asked for one button
beside Claude Desktop that makes the clone and touches neither their
Desktop nor ~/.claude. The button that does this has been in the row
since v0.1.4029, but it was a quiet link at the end of a long status
line that warns about connecting. Their screenshot has no button at all,
so it was easy to miss or they were on an older version.
Now it is a real button (ag-add) beside the switch, where Claude Code's
model picker stands. The status line no longer holds it. What it does
is unchanged: Separate app on, then connect, which wires only
Claude-Magpie-3p (v0.1.4064 keeps ~/.claude out of it for a new twin).
It shows only while Desktop isn't on magpie and the twin isn't made yet,
on a Mac.
Run:
- At the pushed head, after the rebase: desktop-twin, desktop-isolated, desktop-isolated-claude and i18n-keys
in Chromium and WebKit, every language, at 1100 and 640px: 38/38 per
engine. desktop-twin now checks that the button isn't in .ag-st, sits
level with the switch 8 to 28px left of it, and that the status ends
before it. It waits for the fold's animations first.
- Every GUI file whose fixture has claude-desktop or isolated (38
files), both engines: WebKit 345/345. Chromium 343/345: the two reds are
desktop-tiers ("no tiers square"), red the same at origin/main
|
||
|
|
55327848bb |
LESSONS: a budget raise that cut a menu item, and a move out (23457a51f, 817d35ffa)
|
||
|
|
6e03b746be |
gui: plugin pages load on Windows again, their sandboxed frame kept in the window's process (Mute06162 on X)
Mute06162 on X (0.1.4066, Windows): every plugin page (用量速览, 对话,
模型指纹, GPT号池) showed "This page stopped working / <page> didn't
answer", and Codex found "Worker request cancellation setup: The
parameter is incorrect" and "Resuming Windows asset request: The
parameter is incorrect" in the log. Both are Wails' own lines
(request_cancellation_windows.go, v3.0.0-beta.24).
Cause, reproduced on xiaomi-gpu (WebView2 157.0.4341.46): WebView2 runs
the plugin page's frame (sandbox="allow-scripts") in a process of its
own (Chromium's IsolateSandboxedIframes; CDP lists it as an "iframe"
target). Wails registers its WebResourceRequested filter with
AddWebResourceRequestedFilter, and that isn't raised for this process's
requests: the frame got its index.html (a navigation), but bridge.js,
app.js and style.css went to the network as http://wails.localhost/...
and failed with net::ERR_CONNECTION_REFUSED. The bridge never said
hello, so after 10s the page was broken. Wails' request cancellation
auto-attaches the frame's target, takes it for a worker, and its setup
on that session fails with E_INVALIDARG: that is the log line.
Fix: windowsOptions starts WebView2 with IsolateSandboxedIframes
disabled (sharedFrameProcess), merged into the one --disable-features
with the user's own, unless the user enables it in
WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS. This is app-wide, so it covers
every sandboxed frame magpie makes: plugin pages and plugin panels
(pluginpages.js, the only two), in the main window and the tray panel.
The frame keeps its sandbox: an opaque origin (its context's origin is
"://"), its CSP, messages only.
Run:
- Real repro on xiaomi-gpu, sandbox HOME (C:\Users\yeton\magpie-wvf),
testdata/page-plugin (magpie-usage-glance, the reporter's 用量速览),
`magpie app` started in the console session by a one-shot scheduled
task, driven over CDP:
- origin/main
|
||
|
|
817d35ffa9 |
usage: a window's whole follows the tokens pick's With cache (Anotiaww on X)
@Anotiaww asked (X 2121248031983194214) that the account cards' "Whole ≈ N tokens" on Usage → Overview follow the page's tokens pick. With cache, it now adds the window's routed cache read and written, scaled by the same share used as the input and output; the line reads "Whole ≈ N tokens with cache" and its tooltip says cache is included. Without cache nothing changes. Changing the pick redraws the cards. The tray panel shows no holds line, so it has nothing to follow. holdsLine and holdsUnknownLine move from app.js into the Usage plugin's page.js, beside usageWithCache, so the core script budget stays as it is (it had 14 bytes left). quotaWindows still calls them as globals. New words are said in zh, zh-TW, ja and de. Run (mica, both engines, every language): - quota-holds, i18n-keys, i18n-en-no-cjk: 16/16 ok. The new quota-holds test (pick With cache at 360 and 1000px, reload keeps it, pick back) went red in both engines with the cache left out and the old words, and again with no redraw on pick. - 185 GUI files that reach Usage or quotas, plus mobile-web, idle-ticks, old-webkit and every i18n file, concurrency 3. Reds: account-eye, account-mask, account-refresh-holds, claude-quota-onboarding, codex-auto-reset (de), key-balance-card (de), menu-scroll, mobile-web, old-webkit, quota-count-wrap. The same files are red at the base |
||
|
|
23457a51f3 |
gui: an image or video model's chip says what it makes from its right-click
iceloon on X: under a base-URL provider's Image models a video model sat with no way to move it. A chat model's chip already had Makes… (#1399); the Image models and Video models chips now have the same right-click (Copy model ID, Makes: …), on a provider whose models can be marked (marksKinds). The pick is staged as on a chat chip and sent with Save as modelPrefs' kind; the chip's tick is untouched. /api/providers carries mediaKinds, so a marked media chip shows its tag and its pick. A subscription's image models get no such menu. No new strings. The core script budget goes up 316: the chat chip's Makes… is now shared with the media chips (kindAct, kindTag), and the media chip's Copy model ID was left out to pack it; the provider's editor draws these chips, so there is no page to move them to. Run (at |
||
|
|
34916c9fde |
catalog: a model whose id names videos is no image model; xAI's own grok-imagine-video makes videos
iceloon on X: a Grok channel's fetched list put Grok Imagine Video and
Video 1.5 under Image models, where nothing could mark them Video.
"imagine" is in DrawsID's and ImagesAPI's words, so grok-imagine-video
was drawn as an image. Every provider had the same class: wanx2.1-t2v,
wan2.5-i2v, *-video ids.
- namesVideo: an id with the word video, t2v or i2v is no image model
(DrawsID, ImagesAPI). cogvideox stays as it was.
- #1399 holds: a relay's model is not a video model by its name. A
relay's grok-imagine-video now lands among its chat models, where
right-click Makes… -> Video model already marks it.
- xAI's own list (api.x.ai) is the one whose grok-imagine-video* is a
video model (xaiFilms), and the gateway makes it at xAI's API:
POST /v1/videos/generations, then GET /v1/videos/<request_id>, as a
Grok subscription's backend does. xAI has no OpenAI-shaped
POST /v1/videos, so filmsOpenAI leaves an xAI key out.
- A list saved before this is mended when read (mendKinds), so an old
grok-imagine-video saved as an image model moves without a fetch.
Run (mica, mica-run, at
|
||
|
|
077421733d |
gui: a plugin page's one-tone sidebar mark is drawn in the sidebar's ink (shannnnnks on X)
shannnnnks on X (Docker, v0.1.4059): Day card's sidebar icon was black on the dark sidebar. Its icon.svg strokes with currentColor, and pluginpages.js drew every plugin page's icon as an <img>, where currentColor is black whatever the theme, so any one-tone plugin mark (Day card, Agent office, Usage) went dark on dark. The tab now wraps the picture in <i class="nav-ic nav-pic"> and runs the same toneCheck the Plugins page's logos use: a mark in one near-black or near-white tone becomes a mask in the tab's own ink (var(--muted), the open page's --fg, More's list --fg-2), as the built-in pages' marks are; a coloured picture is drawn as it is. The wrapper is an <i>, not a <span>: load() retitles a tab through its first span. New internal/gui/tests/plugin-page-icon-tone.test.cjs (Day card's icon.svg as a fixture, a white mark, the coloured example icon): dark and light, window and web, all five languages, Chromium and WebKit; mask paint equals a built-in mark's ink, 16px, ink over 8% of the box on a screenshot, the open tab in the text colour, the mark kept and title intact after a second list read, and the phone's More list. plugin-page.test.cjs now finds the example icon under .nav-ic. Run on mote (mote-run): - plugin-page-icon-tone: 46/46 green; with origin/main's pluginpages.js put back by hand, 46/46 red (no mask). - go test -count=1 ./internal/gui: TestCoreScriptBudget was over by 87 bytes on the first cut; trimmed, ok. - node --test, both engines: plugin-page-icon-tone plugin-page plugin-page-arrange plugin-page-cookie-proxy plugin-page-csp-hash plugin-page-idle phone-tabs phone-web sidebar sidebar-glide sidebar-tab-top sidebar-settings-steady side-toggle side-width nav-pages-hidden nav-sub-icons nav-lamp last-page icon-one-tone i18n-keys: 320/320 ok at the pushed tree. - menu-scroll, phone-no-sideways, plugin-page-foreign-error are red the same at origin/main |
||
|
|
aff11e042d |
LESSONS: the core budget met by packing again, 3 bytes left (5211fd3ba)
|
||
|
|
a97c8191bc |
workbuddy: with the provider left out of the names, a model's id is its name (elis_pina on X)
WorkBuddy's model list read "GLM-5.3:workbuddy/glm-5.3" with Provider in
model names Off. WorkBuddy (5.5.6 renderer, getModelDisplayName) shows
every custom model as "name:id" unless the name is empty or equal to
the id, and magpie wrote the catalog id (provider/model) as the id. So
the provider came back after the colon whatever the names said.
- agent (buddyIDs): for WorkBuddy and WorkBuddy AI under Off or Own,
each magpie entry in models.json gets the name as its id too, so the
list shows "GLM-5.3" alone. The catalog id stays when two models
share a name, when the name is another model's id, when the entries
point at a magpie on another machine or in WSL, and in On mode.
A model turned off in WorkBuddy, its default effort and a reply limit
typed in carry across the change of id: an old id is mapped back
through every label form (Label, PlainName, the list's name).
- provider.AgentNamed: the catalog id of the one model an agent's list
names so.
- gateway (namedFor): a request with WorkBuddy's or WorkBuddy AI's key
for such a name goes to that model before any other resolution, so a
bare id that another provider serves first is not asked instead. The
reply keeps the name that was asked for. Other agents' keys are not
mapped.
Siblings: CodeBuddy Code shares the writer and keeps catalog ids. Its
settings.json names the model by the catalog id (codebuddy.go), and its
CLI picker shows the name alone (no name:id template in its bundle).
What users meet: a change of mode, or of a model's name, changes the
id. WorkBuddy then picks another model for a session that had the old
one, as it does for any model that leaves its list.
Run:
- Unit tests: TestWorkBuddyNamesAreIDsWithoutProvider covers Off, Own,
back to On, WorkBuddy AI and CodeBuddy. TestWorkBuddyAsksByName uses
the real handler: a name equal to a bare id that a provider listed
first serves (hidden from WorkBuddy) reaches the named model, and
OpenCode's key for the same name does not.
- Broken by hand (on mica), each red:
- buddyIDs always returning the catalog id: the test sees
id deepseek/pro under Off.
- namedFor's mapping skipped: the request went to provider "first".
- The old-id mapping skipped: Own lost disabled.
- Sandbox HOME, built binary:
- magpie provider add zai (fake upstream) and magpie workbuddy
provider magpie wrote "zai/glm-5.3 | GLM-5.3 · Z.ai".
- magpie model suffix workbuddy off rewrote the file to
"GLM-5.3 | GLM-5.3".
- magpie serve on a spare port, then a curl with magpie-workbuddy for
"GLM-5.2" reached upstream as glm-5.2 (reply model GLM-5.2).
- WorkBuddy 5.5.6's own CLI (app.asar.unpacked/cli/bin/codebuddy -p
--model GLM-5.3), with HOME set to the sandbox, answered "pong", and
upstream saw glm-5.3, streamed.
- Full suite on mote at this tree (go test -count=1 -timeout 45m ./...):
every package ok (agent 369s, gateway 1062s, provider 230s,
sessions 254s), log kept whole. The doc line in agent-wiring.md was
added after the run; no test reads that file. gofmt -l is empty,
and go vet ./... passes. On mica, GOOS=linux go vet -tags nogui
./..., GOOS=windows go vet ./..., and the linux nogui and windows
builds pass.
- That suite ran at base
|
||
|
|
5211fd3ba2 |
usage: a currency "By provider" shows each provider's costs in what it sells in
onkashiko on X: DeepSeek, Kimi (China), Zhipu and other domestic vendors
price in yuan, the rest in dollars, and one currency for every cost made
the Usage page read wrong for half of them.
Settings > Usage > Currency gains a third choice, By provider. With it,
a figure of one provider's calls (a model's, an account's, a key's row,
a request, a routing try, a quota card's whole) shows in the currency
that provider sells in, and every sum across providers (the total,
agents, sessions, charts, the tray, Bark's daily, the day page) in the
currency a "Totals in" row picks, a row shown only while By provider is
chosen. GUI, TUI and CLI agree. Costs stay stored in dollars; only the
display converts, at the live rate (internal/fx).
Which providers sell in yuan (provider.PricesInYuan): a .cn host; a
preset at its own site that is a yuan preset (deepseek, zhipu,
volcengine, tencent-cloud, bailian, siliconflow…), ends in -cn, or is in
its China region; a plugin id ending in -cn; a provider of one's own
with a yuan models.dev catalog served at that catalog's site. A relay
made from DeepSeek's preset, Z.ai, Kimi's and MiniMax's international
endpoints stay in dollars: they share a catalog with their Chinese
twins, so the catalog alone can't tell.
Known limit: models.dev has only dollar prices (converted from the
vendors' yuan at ~6.7-7.0), so a yuan figure is that dollar price at
today's rate and can differ a few percent from the vendor's own list.
A second ask from onkashiko: set the currency of the menu bar and of
the totals apart, sums converted by themselves.
So Settings > Usage also gains an Advanced fold (closed by default, open while
set) with one row, Menu bar currency: Same as totals (the default), $ or
¥ (settings.TrayCurrency, TrayCostIn). It sets the menu bar's totals
cards and the tray tooltip's cost; the Usage page, the panel, the TUI,
the CLI and Bark's daily message stay in the totals' currency
(totalsCurrency). Like the other menu bar settings it stays on this
computer (KeepOwn). Every sum is still made in dollars and converted
once, at the live rate, so a mixed-currency total is never added up
from yuan and dollars.
Settings' currency rows (Currency, Totals in, Menu bar currency and the
rate in the tooltip) moved out of app.js into currencyprefs.js, imported
when Settings draws its usage prefs, and costInYuan is packed: the core
is 3 bytes under coreScriptBudget, with no raise.
Run:
- go test -count=1 at this tree on mote: internal/settings,
settingsapi, tui, cli, catalog, provider, fx and gui all ok
(TestCoreScriptBudget included). The full go test ./... and the whole
GUI suite are queued behind other sessions' suites on suite.lock
(mote and mica, load 35 and 60) and had not started at push.
- GUI files at this tree (mica): currency-provider, currency, i18n-keys,
i18n-en-no-cjk, tray-cost, tray-totals, every settings-*, old-webkit:
362 pass, 28 red. Every red is red the same at origin/main
|
||
|
|
ac0b5c287f |
pii: a strict request goes once only what an earlier one sent unread is left (gaubeebangeel on X)
gaubeebangeel on X: with masking on, first tokens on a cloud server
came at 30-40s, 10-15s with it off.
Where the time goes, measured on a 60-turn Claude Code Messages body
(367-414 KB, a 4 KB tool result a turn; TestRealLatencyOfALongSession,
gated on GUARD_REAL_DIR, run in WSL on a Ryzen AI MAX+ 395):
- The rules are not it: 89ms for the body cold, 13ms warm (the rule
memo); 7-11ms on mote's M5 Pro (BenchmarkMaskLongSession,
BenchmarkScrubCodexTurn).
- AstrLink Guard on the CPU is: ~7 KB/s on its 4 cores (GOMAXPROCS=32),
~3 KB/s on one (GOMAXPROCS=2). A turn whose new text the model reads
waits for it: 16 KB of new tool output is 3.0-3.5s on 4 cores and
7.8-8.2s on one. That part is the model's reading and stays.
- With the model turned on (strict, 15s), a resumed or never-read
history was read on every request, until the 15s ran out, though the
vendor had that text already and it goes as it went on the same route
(redact's sentSpans): its finds only feed learnLate. 4 cores: 15.1,
15.0, 15.0, 7.8s, then 0.85s. 1 core: 15s on eight requests in a row,
then 7.9s, then 1.9s.
Now a request with a bound that waits for every text (masking's strict
wait) marks what it goes without, as a Bounded one does (backend.sent),
and once all that is left is what an earlier request sent unread, it is
answered with a *Partial (afterSent): what it adds was read, the rest
has the rules' masking, as on the same route it had. The model reads on
into the backlog after the request, to the request's own bound, and
keeps what it finds for the next one. While it waits, a strict request
counts only what it adds for the queue, so it goes before a backlog
read on by an earlier request. A strict request with no bound still
reads everything; Bounded (the default) is unchanged.
After, same body, same box: 4 cores 15.1s (the first request: all new
text), then 0.97, 1.3, 1.4, 2.3, 3.0, 3.1, 3.1, 3.1, 2.9s; 1 core 15.1s,
then 2.1, 4.6, 4.5, 4.8, 4.7, 4.6, 5.7, 4.5, 4.9s. Those later turns
come back to back, so each shares the CPU with the backlog read on
after the one before; with an agent's think time between them it is
read meanwhile.
What changes in what is masked: on the same route, nothing in what a
text goes as. A value the model would find late in a backlog text masks
new text from the request after the read, not from the one it went
with. On another route (the user picked another provider), a backlog
text has the model's finds of now, none until it is read, and goes with
the rules' masking alone; before, it was read for up to 15s, newest
first.
Run (WSL magpie-desktop, at this commit rebased on
|
||
|
|
533f351085 |
library: billion-context.json syncs, its settings change from its tab, running bilis reload
@Luxzinw on X asked for three things: sync billion-context's config, edit its settings in the Library's billion-context tab, and have running bili proxies reload after a change. Sync. billion-context.json goes in the library part (library.Bundle.Bili), by sync and backup file alike. magpie finds it the way bili's src/paths.ts does: BILI_CONFIG_FILE, else $XDG_CONFIG_HOME (or ~/.config, %USERPROFILE%\.config on Windows), then billion-context/billion-context.json. - The text is carried as written, comments kept. - magpie's summary recipe is carried at the canonical gateway address and localized to this computer's gateway when written, so two computers on different ports don't trade it back and forth. - A newer local file is never blindly overwritten. Before a carried file replaces a different one here, this computer's copy is kept with the backups. - An unreadable file, or one over 1 MiB, counts as unknown and is never carried as empty. A bundle without the file leaves this computer's alone. - A file naming a DSN is left out of keyless backups. - The credential store (<config>.summary-credentials.json) never travels. - A library with no such file hashes as before. - The new sync preview names the file when it would be added, changed or removed. Settings. GET/POST /api/library/bili/settings, and a Settings section under the agents in the tab: - In front: "Summarize with a fast model" (externalSummary), picked from the app's menu, never a <select>. It offers magpie's served models and the file's own recipes. "Fold only when nudged" (requireNudge) and "Nudge every N tokens" (nudgeGrowthTokens). - Under Advanced, collapsed: the compression philosophy (prompts.compressPhilosophy with acknowledgePromptsRisk, which bili needs before it reads a prompt override). Writes go through edit.PatchJSON and temp+rename, so unknown keys, comments and the BOM are kept. bili disables its whole compress section on one bad value, so magpie writes only values bili accepts. A magpie model becomes a providers.magpie recipe whose key is saved in bili's own credential store, the way bili writes it (0600, O_EXCL .lock, temp+rename). A user's own providers.magpie is never taken over. A file bili can't read is said so and left alone. Reload. After a change, and after sync writes the file, every running bili on loopback is sent POST /__bili/config/reload. bili reloads routes and compress there. The status line says whether it did, or that the agent needs a restart. Also: agentenv.Vars clears BILI_CONFIG_FILE in sandboxes, and the settings-parity list names the two routes for stage 3, as the other bili routes are. Run (mica, macOS): - At abcbc632e, this change on origin/main |
||
|
|
0051781044 |
claude-desktop: a new Claude Magpie leaves the original alone, its own Claude Code folder included (xMopf7RF on X)
xMopf7RF asked for Claude Magpie to be a full clone, like an Android app twin: making it from magpie must not wire their own Claude Desktop or touch its config. In a sandbox HOME on mote with the real Claude.app (`launcher add`, then `claude-desktop magpie`, as "Use Claude Magpie" does), origin/main |
||
|
|
7af7a3abad | LESSONS: a launch-agent fix that also mended installed ones (#2961) | ||
|
|
e8001f73a3 |
providers: a model named at an effort is priced as its model, for every provider (stockAAAAA on X)
Antigravity's gemini-4-argon-high, gemini-4-carbon-high and claude-opus-5-5-high showed "price unknown". pricedNamesTo, the list of ids ListPrice, MakerPrice and PricedName (Usage, the Requests ledger, Sessions) look a model up by, read an effort off an id only when it named grok- (#224): for any other id it returned before the effort pattern, so the base model (gemini-4-argon, $2/$10 on models.dev) was never tried. The reporter's claim is right. effortBase now reads the effort off any id, with no regexp (every model of every provider's list is priced on each Providers poll): -minimal, -low, -medium, -high, -xhigh, and Antigravity's -extra-high and -extra-low. The id's own name is still tried first, so a catalog id that names an effort keeps its own price (o3-mini-high, nano-gpt's gemini-3.1-pro-preview-high). Not read: -max and -none (gpt-5.1-codex-max, qwen3.8-max are models at prices of their own), a fast id (grok-4.7-low-fast), and a base with no digit in its last part (mistral-medium, vision-medium, claw-high), so a size word is not taken for an effort. Checked against every model id in the bundled models.dev catalog: the ids that end in an effort word with a digit in the base are the same model at an effort (o3-mini-high/low, gemini-3.1-pro-preview-high/low, gpt-5.3-codex-xhigh). The Grok window pattern still runs only on ids naming grok-. Tests: TestEffortIDPricedAsItsModel (new) prices the reporter's three ids, each other effort word, upper case and a google/ prefix through MakerPrice, an Antigravity ListPrice and another provider's ListPrice, keeps o3-mini-high's own price, and leaves gpt-5.1-codex-max, -none, vision-medium, mistral/vision-high, -high-fast and -ultra unpriced. TestGrokEffortListPrice: gpt-6-astra-high, unpriced before because only Grok's ids were read, is now priced as gpt-6-astra, and cursor-grok-4.7-high as grok-4.7 (the catalog already prices cursor-grok-4.7 as grok-4.7, renamed). Run (on mote, mote-run): - old models.go with the new tests: TestEffortIDPricedAsItsModel FAIL, e.g. MakerPrice("gemini-4-carbon-high") = {Input:0 ...}, false; want gemini-4-carbon's {Input:2 Output:10 CacheRead:0.1}; same for claude-opus-5-5-high and the Antigravity ListPrice. - new code: go test -tags nogui ./internal/provider/ ./internal/sessions/ ./internal/catalog/ ok. - with this Mac's real models.dev cache (~/.cache/magpie/models.json copied into a scratch test, not committed): Antigravity's ListPrice/EffectivePrice of gemini-4-argon-high and gemini-4-carbon-high $2/$10/$0.1, claude-opus-5-5-high $4/$20/$0.2/$5; gpt-5.1-codex-max and mistral-medium unpriced; PricedName(o3-mini-high) o3-mini. - gofmt -l: nothing. go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./..., go build, GOOS=linux go build -tags nogui, GOOS=windows go build: ok. - the full go test -tags nogui ./... was not run before this push (shipped at once); it is run on mote after it. Not tried: the reporter's own usage log, or the GUI's Usage page. |
||
|
|
9a82192375 |
agents: Pi's row picks the protocol magpie's models are asked on (xiaomanweiman on X)
magpie writes Pi's ~/.pi/agent/models.json with api "openai-completions". xiaomanweiman found that T3 Code's pi plugin then puts all 71 tools in the context, while on "openai-responses" only 3 core tools load and the rest come lazily. v0.1.4039 kept an api set by hand; this adds a choice so no one has to edit the file. Pi's opened row in Agents has a Protocol row, picked in the app's menu (no native select): Each model's own (today's default, unchanged), OpenAI Chat Completions, OpenAI Responses, Anthropic Messages. These are the KnownApi names in pi-ai 1.4.0 (/opt/homebrew/bin/pi) that magpie's gateway serves (dshAPIs). The choice is stashed as pi.protocol and written into the magpie provider block (piProviderOn/piModelOn). Anthropic Messages also gives each model the gateway root as its baseUrl, since Anthropic's SDK adds /v1 itself. Effort levels and prompt caching follow the api actually written. An api typed in models.json by hand still wins (piAPIsKept) and shows as the picked value. The CLI has `magpie pi protocol <api|default>`. It is Pi only: not its forks (OmO, Prime Agent, ...) or Aside. It is hidden while the pi-magpie extension serves the models, and it reads nothing at a stopped WSL distro (#3896). Tests: - internal/agent/pi_protocol_test.go: TestPiProtocolPicked. - internal/gui/tests/pi-protocol.test.cjs: Chromium and WebKit, en, zh, zh-TW, ja, de. It checks the row, the menu (4 items, no select, the current one ticked) and what /api/set gets. - Strings in i18n.js in every language. Broken by hand: with the protocol not written, TestPiProtocolPicked goes red. With the menu label left untranslated, pi-protocol.test.cjs goes 16 of 20 red. Real use: a nogui build ran in a sandbox HOME on 127.0.0.1:3562, against a fake OpenAI Chat upstream, with the real pi 1.4.0 `-p "say pong"` and a logging tap: - completions: POST /v1/chat/completions - responses: POST /v1/responses - anthropic-messages: POST /v1/messages?beta=true - default: /v1/chat/completions Each answered PONG-FROM-FAKE. An api typed by hand (openai-responses) survived `magpie sync`, and `magpie pi protocol` showed it. Run at this head (rebased on origin/main |
||
|
|
f798b4eb7a |
sessions: keeping a file's calls trims the revision windows only when it holds one
keepCalls and keepCallContinuation trimmed every kept window after each keep, under callsMu: a sort of the candidates and a map, twice a file. A request-index build reads ~11.5k session files through four workers, and the files it reads are disk shards that hold no window (weight 0), so each trim changed nothing while the workers queued on callsMu for it. A block and mutex profile of a real-account rebuild showed ~55k contentions on callsMu (about 5 a file), ~3.5 s of lock handoffs and ~4.3 s in pthread_cond_signal. Now keepCalls trims only after keeping a file with a window, and keepCallContinuation only after it adds an entry (its early returns add none). Every window added is still trimmed at once, so the budgets hold as before; a window aging out waits for the next keep that adds one. Run: go test ./internal/sessions ./internal/usage ./internal/gui (ok, on mica), go vet, GOOS=linux and GOOS=windows go vet ./internal/sessions, gofmt -l. Real account on mote (75G sandbox HOME, network blocked): a request-index rebuild forced by a new Anthropic price each run, CPU of the process 30 s after start, alternating: v0.1.4052 21.25 / 17.68 / 15.95 s, this change 14.81 / 14.14 / 13.43 s (mean 18.3 -> 14.1 s). Not tried: a test that counts trims; the change is a cost, and every kept window is still trimmed by the same code. |
||
|
|
58ea9cade8 |
daemon: a launch agent written as Background is mended to Standard (#2961)
The commit before writes ProcessType Standard for new installs. Every
agent already installed kept Background until the user ran `magpie
daemon install` again, which no one is told to do. Now `magpie serve`
rewrites that one line of the installed launch agent as it starts
(daemon.Mend), leaving the rest of the user's install as it is, and
says so in the log. launchd reads the file when it loads the agent, not on
a kickstart: so it is taken up at the next login, or at `magpie daemon
restart`, which now takes the agent out and loads it again instead of
`kickstart -k` (and `start` does the same when it mends the file).
This is the same class as #6261: the gateway's process held to
background priority by macOS while agents wait on it.
Run:
- TestLaunchdOldAgentMended: an installed agent rewritten to the old
Background line is mended byte for byte to what Install writes, 0600,
with no launchctl call from Mend; Restart boots it out before loading
it; on Linux nothing is touched. TestLaunchdInstall's restart now
expects bootout, then load. Broken by hand (mended never mends):
red at "Mend: the plist is" and "want a bootout first".
- TestLaunchdInstall (plutil -lint on darwin), the whole daemon package,
vet on darwin, linux, windows: ok; and the package run named in 6261's commit: all ok (gateway 908s, plugin 159s, cli 52s) at base 7eecbcc56; at the pushed head (rebased on
|
||
|
|
873a5caa2f |
daemon: the macOS gateway runs as Standard, not Background (#2961)
Generate ProcessType Standard for the gateway launch agent so launchd does not apply Background throttling on an interactive request path. KeepAlive, throttling interval, logs, environment, and lifecycle behavior are unchanged. Verified with gofmt, git diff --check, TestLaunchdPlistProcessType, and TestLaunchdInstall. Not tried: a real macOS launchd reload, plutil on macOS, and a current-main performance A/B. |
||
|
|
bda69db0ee |
awake: the gateway's process keeps macOS from App Napping it (#6261)
ChasLui (#6261, and on X): with the screen locked, every request after a
quiet while got the 30s pre-routing 504 from the menu-bar app (160 in one
night). The app serves the gateway in its own process, and a locked
screen leaves it a background app, which macOS App Naps: priority band 4,
timers throttled, so parsing the 6MB catalog took ~800ms instead of 50ms
and requests queued behind it past unroutedUnknown. Keep-awake
(caffeinate) holds sleep off, not App Nap.
ListenAndServe now holds an NSProcessInfo activity for as long as it
serves (awake.NoNap): NSActivityUserInitiatedAllowingIdleSystemSleep,
Apple's App Nap opt-out without the idle-sleep hold. Held for the whole
life of the gateway, not only while a request is in flight: the request
that suffered is the first one after an idle stretch, which arrives at
an already napped process. NSActivityLatencyCritical is left out: it is
timer precision for audio/video, at an energy cost, and App Nap's
throttling is what the reporter measured. Sleep is still Keep's alone,
only while the user turned keep-awake on.
The command-line magpie is built without cgo and runs from a terminal or
launchd, where App Nap doesn't reach it; there NoNap does nothing.
Run:
- Real App Nap on mote (macOS 27.2): two copies of a throwaway AppKit
.app (regular policy, launched hidden with open -j -g), one holding
NoNap. Without it: runningboardd "Set AppNap state: active:Y
priority:Y timer:Tier5" and ps pri=4 (42 of 42 samples once napped).
With it: "active:N socket:N priority:N timer:Tier0" and pri=20, never
4. pmset -g assertions listed nothing for either pid.
- TestNoNapLetsTheMacSleep (darwin+cgo): holds NoNap, reads pmset -g
assertions, fails on a Prevent* assertion of its own pid. Broken by
hand with NSActivityUserInitiated: red ("PreventUserIdleSystemSleep
named: magpie serves the gateway ..."); green with the shipped option.
- go vet (darwin), GOOS=linux and GOOS=windows go vet -tags nogui of
awake, daemon, cli, gateway; CGO_ENABLED=0 nogui build; gofmt -l.
- go test -count=1 -timeout 45m . ./internal/{awake,daemon,cli,gateway,
proc,update,masking,plugin} on mote: all ok (gateway 908s, plugin 159s, cli 52s) at base 7eecbcc56; at the pushed head (rebased on
|
||
|
|
459d668b35 |
sync: pick what syncs, preview a sync, undo the last one (#6428)
jinpwng (#6428, on X) syncs two computers and wants only Library and memory to go between them: each keeps its own providers, settings and models. They also want to see what a sync would change before it applies, and to roll the last one back. What syncs: providers, settings and profiles now have switches like agents' models, library and memory (Config.Providers/Settings/Profiles, *bool, nil = synced as before, so an existing setup syncs exactly what it did). The sync form shows Providers (and its API keys), Settings and Agents' models up front; Profiles, usage and sign-ins sit under Advanced, closed unless one is set away from its default. The form sends a part's choice only when it is or was off. A part left out stays as it is here and on the server; turning it back on joins it like a first sync (st.Off, rejoin). The sync's line says which parts each computer keeps ("Stays as it is on each computer: ..."). The setup text and the CLI carry it: magpie <webdav|s3|github> set providers=no settings=no profiles=no. Preview: davsync.Preview (plan.go) says, per part, what syncing now would bring in, send up, or leave; library items and memory files by name, sign-ins and plugins gone. Preview... in Settings > Sync shows it, and Sync now from there runs SyncPreviewed(token): if the server or this computer changed since, it says so and shows the new plan instead of syncing something else. CLI: magpie <kind> preview. Undo: a sync that brings parts in records them (st.Applied) and keeps a sealed copy of this computer first (keepSealed, as Restore does). Undo the last sync puts those parts back from that copy, on this computer only (st.Local, so the next sync sends it up rather than fetching the server's again). If one of them changed here since, it asks first (409 changed, Undo anyway). CLI: magpie <kind> undo-sync [anyway]. Restore's own Undo is unchanged. docs/subsystems/sync-backup.md and the site's sync docs (en, zh, ja) have a section on it. i18n: zh, zh-TW, ja, de. Run (worktree at base |
||
|
|
7eecbcc56b |
routing: a wider window never shows a request on more lines, nor cut off
normalcoder_ on X (v0.1.4053): on the Routing page a request still answering had its numbers (60 B, ≈ tokens, ago) drawn past the list's edge, cut off, and widening the window moved Accounts and keys beside the requests, where each request took two lines it had on one in a narrower window. - The hidden probes that size the list's columns now carry a request in flight's numbers, measured as "59 min ago" (the widest it says in the hour): measured without them, their column had no room; measured as "3 s ago", they wrapped once it said "13 s ago" and stayed two lines. - The accounts go beside only where the page is 1150px or wider and the requests, tried beside before the frame is drawn, still keep their numbers on one line (sideFit). By width alone, a page kept to 1200px left the requests ~850px. Metrics are never hidden by width: they wrap or go under the model, so the same ones show at every width; the Metrics menu still picks them. New routing-rows-widths.test.cjs: a request in flight alone, and with six finished, on the desktop and the browser page, by request and by session, from 2000px down to 520px and back: no cell past the list, the same metrics narrowed and widened, none gone and no row taller on a wider page. Chromium and WebKit, en and zh. Broken by hand: byWidth's min1150 put back, red at a page of 1096 -> 1156px (31 -> 50px); the probe's live numbers measured as they are, red at 768 -> 796px (31 -> 50px). On the original code the live row's numbers were past the list's edge. |