d3fc6f2bfada18e6ae7887b79ed1e4c650ca37e1
2171
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7c1dc198d1 |
usage: a turn over the Responses WebSocket counts what the socket was sent, and says so
A Codex turn kept on a Responses WebSocket sends only the new items as a
delta, but the row's ↑ was the whole HTTP body magpie built before the
transport ran, so a long conversation read as ~13MB up per turn
(matrix0487 on Discord). overSocket now records what each socket write
carried (wroteSocket) and, when the turn went out on the socket alone,
replaces the HTTP figure with those bytes (sentOnSocket); a turn that fell
back to HTTP keeps the HTTP body and adds any socket write made before the
fallback. errCodexSocketAgain's retry on a new socket counts both writes.
The row remembers that it went over the socket: Record.Socket (json "ws"),
packed as Flags bit 16384 (rowSocket, added to TestRowFlagsApart). The
Requests table's protocol badge says "Responses · WS" and the details'
Protocol line "Responses · WebSocket".
Run on mote at this commit (rebased on origin/main
|
||
|
|
2c2bd15d71 |
memory: Tidy up every night, a switch in the Memory tab
The Memory tab gets a second row under Learn from conversations. It is
off by default. Switched on, the first tidy is due at the next 03:00.
Tidy now runs one at once, and Undo puts the last one back. While
distillation is off, the row has its own model picker; both rows share
one model.
Routes: POST /api/memory/dream {on}, /dream/run and /dream/undo.
GET /api/memory/distill carries "dreaming", so a tidy no longer shows
as conversations being read.
The prompt's stale rule is narrower. On the first real run it set aside
two decisions because "the work is done". Now only a note that later
notes contradict, one past its date, or one about a finished one-off
task is stale; a decision, direction or preference stays.
docs/subsystems/memory.md gets a Dreaming section.
Real run: a sandbox memory.json of 62 real distilled memories, 12 active
and one each user-written and pinned, with auto/claude-haiku-5-5 through
the live gateway.
- Before the prompt change: 12 changes in 48s, 10 merges and 2 set aside.
Both set-aside notes were decisions.
- After: 12 merges in 46s, none set aside. Each merge joins real
duplicates (three ~/.codex/sessions cleanup rules into one, the
TestFlight 1.66/1.68 pair). One went into the fixed memory, whose text
was kept word for word.
- Undo: 25 restored. memory.json's ids and statuses equal the backup
taken before the run, and every merged memory is gone.
Broken by hand, each red:
- Undo not reloading the list: library-memory 22 failed.
- Ignoring DreamSince: TestDreamsOnceANight.
- A plan applied after an error: TestDreamFailureChangesNothing.
- Tidy's fixed guard and Untidy's status check: their memory tests.
Run on mote at this tree:
- go test internal/memory, memdistill, library: ok.
- internal/gui -run 'Distill|Dream|I18n|Budget': ok.
- library-memory.test.cjs: 22/22 in both engines.
- i18n-keys and i18n-en-no-cjk: 4/4 each.
- go vet (darwin), GOOS=linux -tags nogui, GOOS=windows: ok.
Not run yet: the full suite at this head.
|
||
|
|
4d12d44163 |
memory: Learn from conversations, a switch in the Memory tab
The Memory tab gets a row that reads finished conversations into
candidate memories (To review). It is off until switched on; switched
on it reads at once, then hourly (5 minutes after start, then every
hour), through the gateway this process serves under the agent
"memory", with the automatic model unless one is picked through the
app's menu. Read now runs it again; a run that stopped says why.
- memdistill: Keep (the hourly loop) and Running.
- gui: /api/memory/distill (GET, POST {on, model}), /distill/run;
distillComplete posts /v1/messages to the served gateway's handler
with the memory agent's token.
- library client: the row, its poll while a run goes, and the
memories reloaded when it ends; strings in zh, zh-TW, ja, de.
- docs/subsystems/memory.md: a Distillation section.
Run (mote, at this tree):
- go vet ./internal/gui ./internal/memdistill ./internal/memory; GOOS=linux
-tags nogui and GOOS=windows vet of gui and memdistill: clean.
- go test ./internal/gui ./internal/memdistill ./internal/memory
./internal/library: ok.
- node --test internal/gui/tests/library-memory.test.cjs: 22/22, Chromium
and WebKit, 5 languages, 980 and 420.
Broken by hand:
- the memories not reloaded after a run: the GUI test is red waiting
for the proposed memory.
- the token not the memory agent's (earlier): TestDistillCompleteThroughGateway
red on the Trace's agent.
Not tried yet: a real model's run (next), the whole GUI suite (queued
behind the suite lock on mote), the full Go suite.
|
||
|
|
2b2ee49ded |
gui: the Library's Memory tab
A tab after Instructions lists what the agents remember, in use, to review (what an agent only guessed) and archived, pinned first then newest; searches it, narrows it by where it applies, and adds, edits, pins, keeps, archives and deletes memories (Delete asks with a second click). Kind and scope are picked from the app's menu, never a <select>. A card on top switches the digest in the ticked agents' instructions on or off and names those agents, and offers Magpie Memory while it isn't in the Library. /api/memory (GET; POST saves the user's own or edits by id), /api/memory/remove and /api/memory/digest; a change publishes the digest at once and its reply carries `problem` when that failed. Words other code also says (Archived, Pin, Keep, the kinds…) are in core i18n.js; the rest in the library plugin's, in zh, zh-TW, ja and de. docs/subsystems/memory.md describes the layer. Run (mote-run): - node --test internal/gui/tests/library-memory.test.cjs, Chromium and WebKit, 5 languages, 980 and 420 wide: ok - whole GUI suite: not run at this commit; it is queued on mote for the stack head (034f249af before the rebase) - go vet ./internal/gui, GOOS darwin, linux, windows: ok Broken by hand: the pinned sort read `b.pinned - a.pinned` (NaN for an unpinned one) and the test was red in every language until `!!`. Looked at: screenshots en light 980, zh dark 980, en 420. |
||
|
|
9d4c338a67 |
gui: magpie web on a phone no longer scrolls sideways or keeps a band at its foot (#4943)
precis1onz (iOS Safari, dark, English, Usage) saw the page move sideways
and a dark band stay at the screen's foot.
- Sideways: Usage → Requests' "Split by" row (label and five choices) is
one unwrapped span, 393 to 558px wide at 375 to 430px. It was the only
thing wider than a phone in any view or language. On the phone layout
it now wraps inside the screen (app.css, phone block only).
- The band: the Requests table's stand-in scrollbar (#799) is sticky at
the view's foot, and a touch screen draws no bar in it, so it stood
there as an empty 12px band. ledHScroll now leaves it hidden on
(hover: none) and (pointer: coarse); a finger moves the table itself.
A desktop keeps it as before.
New test, phone-no-sideways.test.cjs: every view (Agents, Sessions,
Providers, Routing, Groups, Gateway, Library, Plugins, Masking, each
Usage tab, Settings' tabs) on an iPhone at 375 in en, zh, zh-TW, ja, de
and at 390 and 430 in en, in Chromium and WebKit, with long ids, emails
and paths; nothing may be wider than the screen and no empty band may
stay sticky at a view's foot. ledger-swipe now expects no bar on a
phone, and that the swipe moves the table.
Run (mote, through mote-run):
- phone-no-sideways: red on the old assets (
|
||
|
|
198c16d0c4 |
gui: a window set aside, counted of a total, takes a new cap of its own
9won on Discord: WorkBuddy's Credits and Extra credits (and the intl build's) could not be given a cap. The plugin sets those two aside (the account stops at "Total credits"), and |
||
|
|
f2341e232a |
providers: the page says when subscription accounts are off, and leads to the switch
Subscription accounts (account discovery) are turned off in Settings ›
Privacy, and every subscription then stops working, but the Providers
page said nothing of it (the scattered settings audit after netube99 on
X). A line over the list, in the deprecation notices' quiet style, now
says they are off, with Settings › Privacy opening the switch, lit, and
Back to Providers. With MAGPIE_NO_ACCOUNTS set it says so instead. While
they are on there is no line. The core script budget is paid with three
comments cut, no raise.
Run on mote (macOS 27), Chromium and WebKit:
- new providers-discovery-off.test.cjs (every language, 1100 and 420
wide), account-discovery, i18n-keys, settings-back: 76/76.
- TestCoreScriptBudget and the app.js budget: ok.
- every file touching #movable (deprecated-subscriptions,
deprecation-notice, library-chip-fan, plugin-move, plugin-movable-review,
retired-move): green. plugin-move-unserved's "Try again takes the models
unticked" is red 4/4, the same 4 at a clean origin/main
|
||
|
|
0d99261dcc |
sessions: the page leads to Settings › Privacy's session history
Which agents' session history magpie reads is set in Settings › Privacy,
and the Sessions page it is about led there only through its first ask's
words (the scattered settings audit after netube99 on X). Its head now has
a Settings › that opens Privacy at those rows, lit, with Back to Sessions.
Gateway mode reads no agent's history and has no such rows, so no link.
Two things it found on the way:
- Privacy's session-history rows are drawn again when their read comes
back (loadSessionReads), which took the light off a row a link had just
lit; in Chromium it was gone before it showed. The redraw now keeps the
light on the row at the same place.
- The link takes ~70px of the head (en), and eight agents' tabs, which
fit a 1200px page (面条 on Discord), had 34px to spare. The search
now gives way to the tabs, down to its 110px least, before the agent
menu takes them; a narrow window's grid head is as before. The fit
watches the head, not the tabs' box the search's width changes, so no
ResizeObserver loop.
New test sessions-to-settings.test.cjs: the link's words, inside the head,
over nothing, the page fits; it lights Privacy's row; Back returns to
Sessions; none in gateway mode. Every language, Chromium and WebKit, at
1100 and 420 wide. sessions-toolbar now counts the link among the head's
controls that must fit.
Run on mote: every Sessions GUI file (13), gateway-conversations,
gateway-mode-sessions, i18n-keys and settings-back: 192 of 192.
Broken by hand: without the link, sessions-to-settings red; without the
redraw keeping the light, red in Chromium (timeout on the lit row);
without the search giving way, sessions-toolbar red ("a wide window keeps
the one-click agent tabs").
Not tried: the real app window.
|
||
|
|
a1f2c37ea8 |
gateway: a key's limit editor says Key limits is off and turns it on
A gateway key's limit is the Key limits built-in's (budget). With it
switched off, the editor under the key's row drew as usual, and Save was
refused with "turn the plugin on" without saying where (the scattered
settings audit after netube99 on X). The editor now has a line, shown
only while budget is off (data-feature-off), saying "Off in Plugins ›
Built-in" with a Turn on that switches it on in place; the line goes and
the editor stays open with its draft.
New test gateway-key-limit-off.test.cjs: off, the line shows inside the
editor with its words and the page fits; Turn on posts {id: budget, on:
true} once and hides it; on, it is hidden. Every language, Chromium and
WebKit, at 1000 and 420 wide.
Run on mote: gateway-key-limit-off 20 of 20; gateway-key-limit,
gateway-key-limits, gateway-key-cycle and i18n-keys 38 of 38.
Broken by hand: without data-feature-off the line shows when on, red;
without Turn on's call the line never goes, red (timeout).
Not tried: the real app window.
|
||
|
|
b72256b599 |
gui: a Back in the title bar after a link into a setting, and a lit row keeps its corners
The owner (11-10): "点击设置链接跳转到设置页面之后,最好有一个返回按钮来返回到上一页,
类似于浏览器的返回按钮。" A link into a setting (openSettingsAt: the Usage
page's and Routing's Settings ›, the Gateway page's, a provider's, Plugins ›
Built-in's) and Plugins › Built-in's link to a page now leave a chevron
Back in the title bar, before the crumb (beside the sidebar) or after the
brand (the header's tabs), named "Back to {page}". It goes to that page:
the provider that was open, or Settings' tab and search. One step, like
a browser's first; going to another page by hand drops it. fitTop counts
it as the header's lead, so the tabs keep clear of it.
And (the owner, 11-10): "绿色边框的四个圆角会被切掉,这个很丑的". A lit row's
inset ring was square inside the list's rounded clip, so the first and
last rows lost their ring's corners. A lit row is rounded as the list is
inside its border (11px; 10px in the panel, whose lists have no border).
New test settings-back.test.cjs: Usage's Settings › lights the row with
rounded corners, Back shows with its name, fits, overlaps nothing in the
title bar, and goes back; Routing's the same; a page picked by hand drops
Back. Every language, Chromium and WebKit, 1100 and 420 wide.
The core's script budget pays for Back with five long comments in app.js
cut to a line each (Back's own, Built-in's rows, the refresh, its spin's
stop, a growing part's hold), no raise; TestCoreScriptBudget ok on mote.
Run on mote: settings-back, i18n-keys, settings-places, title-bar-tools:
53 of 54; the red is title-bar-tools' known WebKit flake (#2740, #4716),
red 1 run in 3 alone, the same at the base.
Broken by hand: without renderBack in show, settings-back red; without the
11px radius, red with row 0 vs list 11.
Not tried: the real app window.
|
||
|
|
a8aeb2cad2 |
usage: picked days can start and end at a minute
blrbrzkj on Discord asked to see usage from one time to another, not only whole days. The range menu has a start and an end time under its month (empty is the whole day; 9:30, 0930 and 09:30 all read 09:30). Picked with the days, the period is "2026-10-01T09:30..2026-10-01T18:00"; Enter applies new times to the days already picked. A time that isn't one, or an end not after the start on one day, is marked and asks for nothing. The opt says "Oct 1 09:30 – 18:00". The backend reads either end as a date or a date with its minute (usage.RangeOf, bounds); an untimed end is its next midnight. A timed range of 48 hours or less is drawn by the hour from the first's hour. CSV names drop the colons. Run (mote): node --test usage-range-times (new, chromium + webkit, en + zh), usage-range, i18n-keys, credit-days: 26/26 ok. go test ./internal/usage ./internal/gui ok (TestCoreScriptBudget fits, the periodDays comment cut to pay for its regex); gofmt clean; go vet native, GOOS=windows (usage, gui), GOOS=linux (usage) ok. Broken by hand: a timed end read as its day's midnight turns TestPickedMinutesArePeriod red. The page's own typedTime first clashed with app.js's hhmm and stopped the Usage page mounting; the GUI run caught it. Not tried: the real app with a real ledger; ja/de/zh-TW screens. Reported-by: blrbrzkj (Discord) |
||
|
|
117f56c707 |
gui: a provider editor of many accounts opens without a layout an account (#5310)
With 600 accounts the Claude provider editor took 7.9s to open in WebKit (2.3s in Chromium). Each account's segmented control placed itself, and its thumb, in a microtask of its own: a read after the last control's write, so every control laid the editor out again. The thumb's place was read from offsetLeft/offsetTop, scrollLeft and getComputedStyle. In a long list WebKit answers those by walking every sibling before the element (~0.3ms each at 600 accounts), where getBoundingClientRect, offsetWidth and client/scroll sizes are cheap. - segs() queues its control. One microtask (segsFlush) places every control due and slides them all together, with each container's controls counted once (segsPlace takes a shared map). - slides() reads every thumb's target, then writes them all. thumbsPut puts them all with one reflow. - thumbTo measures with rects (unscaled by offsetWidth) and reads scrollLeft or scrollTop only when the strip overflows. - thumbNow trusts the place it last put (thumbPlaced) unless a glide is running, so it doesn't use computed style. Measured at 600 accounts (time to open the editor, probe on mote): | | WebKit | Chromium | | --- | --- | --- | | before | 7.9s | 2.3s | | after | 1.13s | 0.58s | What's left in WebKit is the editor's own two renders and openModal (~670ms), which this commit doesn't touch. The core scripts stay inside TestCoreScriptBudget: comments were cut to pay for the code, and the budget wasn't raised. New test: editor-thumbs-batched.test.cjs. It opens the editor with 40 and with 160 accounts, in both engines and in en/zh/zh-TW/ja/de. It counts forced layouts and the sibling-walking reads, holds 160 to 40's count +24, and checks every thumb lies under its option within 1px. Run at this head (rebased on |
||
|
|
769a625548 |
gateway: its own settings sit under a Settings head, apart from the calls
The owner (11-09): "这两个卡片为什么贴在一起?" The Recent calls list and the gateway's own settings card touched with no gap. The settings card now has a Settings row-head of its own above it (the page's 14px head margin), hidden with the card when the gateway built-in isn't found. Run on mote: gateway-own-settings.test.cjs and i18n-keys.test.cjs, Chromium and WebKit, every language, 1100 and 420 wide: 24 of 24. Broken by hand: with the head and its hide line taken out, 20 of 20 red (the head's text and the gap of at least 10px are checked). Not tried: the real app window; the full GUI suite runs with the next commit. |
||
|
|
3d49ac069e |
usage: a 24 hours period, and the period picked is kept
The Usage page's periods were Today, 7 days, 30 days and All. "Today" starts at midnight, so early in the day it shows almost nothing (mahiro233 on Discord). A "24 hours" period now sits after Today and asks the server for its rolling window, last:24h (#2075), with an hourly chart. Its empty state says "No calls in the last 24 hours." (en, zh, zh-TW, ja, de). The menu bar's credit days count it as 2. The period picked from the list is kept in localStorage and the page opens on it next time. Picked day ranges aren't kept (they go stale), and neither is a period the URL brings (?period=7d from the menu bar). Tests: usage-24h.test.cjs (new; Chromium and WebKit, en and zh, 900px): 24 hours sits after Today and asks for last:24h, its empty note, a reload opens on the kept pick, ?period=7d is not kept. Five usage tests counted the period list by index and were moved one along. Run on mote at |
||
|
|
be2d2db5c3 |
gui tests: gateway mode's hidden alerts are read through their Alerts list
|
||
|
|
e21b401402 |
gui tests: group-editor-fits waits for the fold's label column to settle
The advanced fold takes its label column from edAlign, a ResizeObserver
that sets --ed-lab a frame or two after the editor opens. The test
measured the frame before: "the pattern field spans the models' column"
was red 1 of 3 runs on origin/main
|
||
|
|
c6331b427c |
routing: a group bound to gateway keys is theirs alone (Xerxes754)
Xerxes754 on X asked to bind a routing group to one or two gateway
keys, so other keys neither see nor use it. Before this a key could only
be held to models from its own side (naming group/<id> in its Models);
a key with no limits reached every group, and nothing on a group could
keep it from one.
A group now has Keys (key ids). Set, only those keys, and keys issued
under one of them, may use it:
- groupBarred/groupGiven in key_models.go answer it for every route that
reaches a group: chat, responses, messages, count_tokens, embeddings,
images, video, the decider and the subagent and image MCP paths. Any
other key gets 403 "bound to other gateway keys", naming the group and
the Routing page, and nothing goes upstream.
- /v1/models and /v1/models/{id} leave it out for any other key, a key
held to models that names it included. provider.GroupsBound keeps an
unbound magpie's list as before.
- A keyless request from this computer uses it, as key limits never
hold one; callerGuard now names a loopback request's key when it
sends one, so a key used locally is held too.
- SaveGroup keeps the stored keys when a save doesn't name them (the
CLI, the TUI, the card toggles); an empty list clears them. Ids are
trimmed, deduped and capped. Sharing a group leaves its keys out;
importing over one keeps them.
- GUI: Routing, a group's Edit, row "Gateway keys" (网关密钥) with a
button "Any gateway key" (任意网关密钥) that opens the app menu of the
user's keys (multi-pick); a bound key since deleted shows "key
deleted" (密钥已删除). The row shows once there is a key to bind.
/api/groups lists gatewayKeys (no browser, read-only or issued keys).
zh, zh-TW, ja, de strings.
- Not covered: a bound group nested in another group is reached through
the outer one (documented in gateway-routing.md).
Run (mote unless said), at this head rebased on
|
||
|
|
ecc16fe979 |
usage: the quick panel and the Usage page word unpriced calls alike
The quick panel's Cost said "15 个没有价格" while the Usage page's
said "15 次调用没有已知价格,未计入". Both now say "{n} calls unpriced"
("15 次调用未计价"), as the page's other cost heads already did, with
the whole sentence on hover.
Reported-by: tenacious_eagle on Discord
The Usage page's plugin already had the two count keys; they live in the
core's i18n.js now that the quick panel says them too (i18n-keys: no key
twice, a plugin's words are its own). The Overview calls tile says the
same words, so usage-unpriced-sum's tile wording follows.
Run on mote at origin/main
|
||
|
|
3b550a99c7 |
providers: a sign-in kept to its link leads to the setting that kept it
With Settings › Privacy › Sign-in pages' "Open sign-in pages in the browser" off, adding an account says "magpie didn't open the sign-in page, as set in Settings" and gave no way to that setting (the scattered settings audit after netube99 on X). That line now ends in a Settings › link that opens Privacy and lights the row. The row stays in Privacy: it is there for max2020's reason, a vendor seeing which browser a user signs in from. app.js's core budget is met by one comment cut beside it, no raise (38 bytes over before the cut). Run (mote, through mote-run, Chromium and WebKit): signin-link-only (every language, both a link-only and an opened sign-in, which has no link), video-gen-pick and i18n-keys, 78 of 78; TestCoreScriptBudget ok after the cut. Broken by hand: no link, signin-link-only red in Chromium. Not tried: a real sign-in in the app; the whole GUI suite runs after the last of these changes. |
||
|
|
cedacf1aea |
settings: Video generation's how-to leads to the Providers page
With no model that makes videos, Settings › Models › Images' Video generation says to right-click a model in its provider's Model settings and mark it a video model, on another page, with no way there (the scattered settings audit after netube99 on X). The line now ends in a Providers › link that opens that page. It is drawn in videogen.js, so the core script doesn't grow. Run (mote, through mote-run, Chromium and WebKit): video-gen-pick (every language it covers, 1100 and 400), signin-link-only and i18n-keys, 78 of 78; TestCoreScriptBudget and the I18n Go tests. Broken by hand: no onclick, video-gen-pick red in Chromium. Not tried: the real app's window; the whole GUI suite runs after the last of these changes. |
||
|
|
8607a7a029 |
library: a skill GitHub's limit left unchecked leads to the token's row
A skill check that ran into GitHub's 60-an-hour limit says "Add a
GitHub token in Settings → Network and sharing", in a status line that
fades and a tag's tooltip, and nothing there went to Settings (the
scattered settings audit after netube99 on X). The Not checked tag is
now a link when the limit was the one without a token: it opens
Settings › Network and sharing and lights the GitHub token's row. A
token's own limit has nothing to add there, so its tag stays plain.
github-token.test.cjs swaps its route between rounds with
unrouteAll({ behavior: "ignoreErrors" }): the click leaves Settings'
lazy files being served, and the old unroute made the next round's
handler fulfil a route already handled.
Run (mote, through mote-run): github-token.test.cjs, Chromium and
WebKit, en and zh, 8 of 8; github-token plus every
library-*.test.cjs before the route fix: 1211 pass, the one red that
route race.
Broken by hand: the tag never a link, 4 of 8 red (each limited case).
Not tried: the real app's window; the whole GUI suite runs after the
last of these changes.
|
||
|
|
92be1d779b |
usage: the allowances' head opens Settings › Allowances
The Usage page draws the allowances, but how they are shown (used or
left, the menu bar's figures) and their alerts are set in Settings ›
Allowances, and nothing on the page said so (the scattered settings
audit after netube99 on X). The allowances' head now has a Settings ›
link, as the Routing page has, that opens that tab and lights the
Allowance display row (now #quotaLeftRow). Wired in the usage plugin,
so the core script doesn't grow.
Run (mote, through mote-run, Chromium and WebKit, every language, 1100
and 420): settings-places, mobile-web (with an origin/main baseline;
the button is taken out until the baseline has it, as rtToSet is),
account-mask, quota-curve, i18n-keys: 89 of 89, twice. A first run had
one red whose name a tail cut off; the next two runs of the same files
were 89 of 89, so it is unnamed and not seen again.
Broken by hand: no onclick, settings-places 2 of 2 red (no row lit);
no #quotaLeftRow, 1 of 1 red.
At the pushed head (rebased on
|
||
|
|
623e797fde |
plugin pages: read a day's usage and share a picture they drew
A plugin's page can now read one day's usage and share an image it
drew. This is for the day card (JungleyYeh on X asked for a "daily AI
statement"); the card itself is an optional community plugin,
@magpie-community/page-day-card.
- A page that asks for the "usage:day" read gets that day as
magpie.read("usage:day", {date, tz}): totals, each agent and its
models, the streak and the average active day (usageapi/day.go,
gui/pageday.go). The Plugins page names the read before it is granted.
- magpie.image.copy(png) and magpie.image.save(png, name) share a PNG
of at most 16 MB. In the window they go through
POST /api/plugin-pages/image (pageimage.go): copy puts the picture on
the clipboard (clipimage.go: osascript PNGf on macOS, PowerShell
PNG + Bitmap on Windows, wl-copy or xclip on Linux), and save writes
it to Downloads under a name made safe. In magpie web, the browser
saves or copies the picture itself.
- The window's side, pageshare.js, is imported the first time a page
shares a picture. The core grows by its one call only, paid for by
comments cut, so the budget is not raised.
Tests:
- New: TestDayOf, TestPluginPageReadsADay, TestPluginPageSharesAPicture,
TestPageImageName and TestClipImageCommand. plugin-page.test.cjs
covers the bridge, both engines and a refused SVG.
What was run (mote):
- gofmt, plus go vet on darwin, linux and windows: clean.
- Full go test ./... at the pre-rebase base: 369 packages ok, 3 FAILs.
- TestEveryRouteHasACommandOrIsNamed and TestCoreScriptBudget were
this change's own reds. The new route now has a parity entry, and
the share code moved into lazy pageshare.js with no raise.
- TestGatewayModeStatsNameTheGatewaySessions is #5690, the red in the
first hour of the day (it ran at 00:32).
- GUI suite (affected and plugin files, both engines): 1160 of 1179
passed. Every red is filed and none touches this change:
- i18n-keys "a plugin's words are its own": #5332, #5426, #5482.
- page-width-steady: #5013.
- plugin-card-update in WebKit: #3079.
- plugin-move-unserved "Try again": #4410.
- At this head, after the rebase on
|
||
|
|
bc8b01d603 |
claude: the short system prompt is set in the Claude Code editor, not Settings › Replies
The scattered settings audit after netube99 on X. Short Claude system
prompt and Claude Code's interactive mode changed only Claude
subscription runs, yet sat in Settings › Models › Replies, while the
Claude Code editor already had its own "Claude Code runs as" switch for
the second, whose card said "Switched here or in Settings › Models ›
Replies".
Both rows now go in a claudeRunList in the Claude editor (PROV_PREFS), so
Settings' search still finds them and Open goes to the editor. In the app
the editor's own "runs as" switch is the one shown, and the duplicate
interactive mode row is hidden by CSS; in magpie web as a gateway, where
that switch is disabled, the row shows (the list gets a gw class from
renderReplies: body.gateway-mode is set only on a change, not at boot).
provPrefsField lets Claude's run list through in gateway mode, without
the warm-ups, which are this computer's. The card and the "off" reason
no longer name Settings (zh, zh-TW, ja, de written with them), and the
bridge's subsystem page names the editor.
Run (mote, mote-run, origin/main
|
||
|
|
a6e4cf7635 |
settings: what routing does sits under Models › Routing, and the Routing page opens it
The scattered settings audit after netube99 on X. Ask again after a
refusal, the Retry-After cap and the intent classifier's timeout were
under Models › Replies beside rows about a reply's content, and Busy
models last sat in Network and sharing, far from the routing it changes.
The four are now one Routing section under Models, after Replies, and the
Routing page's header has a Settings › button that opens Settings at that
section with its first row lit. The docs (reference.md, the site's
plugins page in en, zh and ja) name the new place.
Run (mote, mote-run):
- settings-places, retry-after-cap-setting, refusal-retries-setting,
classify-timeout-setting, model-load, i18n-keys and bare-ids, both
engines: all pass.
- mobile-web against origin/main
|
||
|
|
7d177985f6 |
settings › allowances: the alerts under an Alerts heading, and no empty Menu bar cost row in magpie web
The scattered settings audit after netube99 on X found Task done alert filed among the allowances' display rows, with nothing saying why, and magpie web drawing Menu bar cost as a row with no control (it has no menu bar, and renderTrayUsage returns before filling it there). - Allowance alert, Low balance alert, Reset reminder and Task done alert are now a list of their own under an "Alerts" heading (#alertHead, #alertList), after the display rows. Gateway mode hides the heading and the list, as it hid the four rows. - #trayCostRow is app-only, as #trayUsageRow is. - "Alerts" in zh, zh-TW, ja, de. Run (mote, at this tree): - settings-places (new), bare-ids, turn-done, usage-alert, reset-reminder, mask-alert, settings-search, i18n-keys: 122 pass, 0 fail, both engines. - go test -run "Budget|I18n" ./internal/gui: ok. Broken by hand: without app-only, settings-places is red 10 of 10 on "no Menu bar cost row in magpie web"; with the heading renamed, red 10 of 10. Not tried: the real app; the row moves are markup only. |
||
|
|
92e8edd7fc |
windows: magpie is listed in Installed apps, and its Uninstall puts every agent back
Jevik_AI on X uninstalled magpie and rebooted, and Codex's config.toml still had openai_base_url = "http://127.0.0.1:3425/backend-api/codex"; Rk1ngggg asked whether an update cleans it. magpie's own uninstall (Settings › About › Uninstall magpie, `magpie uninstall`) already disconnects every agent and takes Codex's leftovers (#3866), but on Windows magpie wasn't in Settings › Apps › Installed apps, so it was removed the way Windows offers for a program it doesn't list: by deleting the exe and folders, which runs no code. shortcut.Ensure now writes HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\magpie (DisplayName, DisplayIcon, Publisher, InstallLocation, UninstallString, URLInfoAbout, NoModify, NoRepair) at every installed start, beside App Paths, and Remove (uninstall's System step) takes it out the same way: only while it names this exe, or an exe that is gone. Its Uninstall runs `magpie.exe uninstall --window` (shortcut.UninstallArgs). magpie.exe has no console, where the terminal's `magpie uninstall` would refuse for want of one to ask on, so those exact args open the app's window (or forward to the running app, OnSecondInstanceLaunch) on Settings › About with Uninstall magpie's question asked (uninstallView, ?uninstall=1). It asks once: a redraw of Settings doesn't ask again, and Cancel removes nothing. magpie web opened at that link asks nothing. Deleting the app by hand still runs no code (macOS drag-to-Trash included); agent-wiring.md says so. Run on mote at the pushed head (rebased onto |
||
|
|
39569d5604 |
claude desktop: an optional Claude Magpie app beside your own Claude (#5671)
baranwang on X asked to keep Claude Desktop's own (1P, Anthropic) sign-in while using magpie. Turning on "Separate app" in Claude Desktop's row on the Agents page (or `magpie claude-desktop launcher add`) moves magpie's 3P wiring into ~/Library/Application Support/Claude-Magpie-3p and adds ~/Applications/Claude Magpie.app. That launcher opens Claude.app with --user-data-dir on that folder, so it runs side by side with the user's own Claude.app. Its icon is Claude's icon with a magpie badge. Off is the default, and turning it off (`launcher remove`) moves the wiring back and removes the app. It is macOS only: Desktop's packaged app strips CLAUDE_USER_DATA_DIR, and on Windows it hardcodes LOCALAPPDATA\Claude-3p. The folder ends in -3p because Desktop adds -3p to any other name. Restarting the isolated app ends only its own process (pkill on its --user-data-dir) and opens the launcher again. Run at 1b25cda26 (this change on origin/main |
||
|
|
be9dbce02c |
settings search: built-ins are found too, off or on, and Open goes to their row
A built-in's switch and the settings it keeps in Plugins › Built-in or on its own page (Gateway's Recent calls at a time) were found by nothing in Settings' search, and one switched off took its Settings tab and rows with it, so searching "Observability" with it off said no setting matched (the scattered settings audit after netube99 on X). The search now lists, after Settings' own rows and under "Plugins › Built-in", each built-in whose name, line or schema setting has the words, in the language shown or English, one off saying Off. Open goes to Plugins › Built-in and lights that row, again when the list is drawn a second time as the plugins are read. The list is drawn by a lazy setfeats.js the first time a search runs, and only when what it finds changes, as Settings' observer runs the search again on each change under the view. Run (mote, at f98e954ce's tree plus this): settings-search, old-webkit, builtin-places, provider-prefs, i18n-keys: 170 pass, 0 fail, Chromium and WebKit, every language; TestCoreScriptBudget ok. Broken by hand: without the row's light, and with the match always false, the new case went red in Chromium (7 pass, 2 fail each). |
||
|
|
07a06617e1 |
quota: an early reset starts the Cycle chart though the card's reset has milliseconds
steven_4422 (Discord #feedback, 11-09): a weekly window refilled early at Nov 9 02:00 kept its deadline, yet the Cycle trend began at Nov 4 10:40, the vendor's own start. quotaCycle took the recorded early reset only when the card's resetsAt equalled the last reading's exactly. History keeps whole seconds and a vendor's deadline can drift a little between reads, so the two rarely matched. Now a reset minutes apart counts as the same one. Run (mote): new quotaCycle test red on the old code (actual 2026-11-04T10:40:00.437Z, the reporter's start), green after; quota-curve.test.cjs 31/31; go test -run Budget ./internal/gui ok. Not tried: the reporter's own account; the full GUI suite (mote's suite lock queue is hours long). Reported-by: steven_4422 (Discord #feedback) |
||
|
|
89d8b4d5f9 |
settings search: a provider's settings are found only while that provider is added
Settings' search lists each provider's own settings (warm-ups, check-ins
and the like) as rows that open the provider's editor. It listed them
for every provider magpie knows, so a search for "warm up on reset"
offered ChatGPT and Claude to a user with neither, and Open did nothing
(the scattered settings audit after netube99 on X). A row now remembers
its providers and is left out while none is added, and a row whose
built-in plugin is off is left out as the others are.
Those rows are drawn by a lazy provlinks.js the first time a search
wants them, not on each Settings draw: app.js was 399 bytes over
TestCoreScriptBudget with the change, and is now 956 under its size at
the base, with the budget unchanged.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
4064c10362 |
routing groups: on while Routing is off, their Built-in row says their page went with it
Routing groups have no page of their own: theirs is on Routing. With
Routing off and Routing groups on, Plugins › Built-in showed the groups
switch on and nothing anywhere to set them, and the quick start's
routing step still counted groups alone (netube99 on X, and the
scattered settings audit after it). The groups row now says "Their page
is on Routing, which is off" with Turn on Routing, which flips Routing's
own switch on the same list, and the quick start's step leaves with
either one off.
The hook lives in a new plugins/routing/settings.js, loaded after app.js,
whose featWho it extends (plugin client files load before app.js; the
first try in client.js threw "featWho is not defined" in every test).
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
7cb437ee16 |
masking: its alert sits with its other settings, and its Built-in row says when nothing is masked
The Masking alert was the one masking setting on the Masking page, under
the request list, away from every other one in Settings › Privacy (and
in Settings › Usage before that, where nb5p looked for it). It is now
the first row of Privacy's "when a value is found" list, out in gateway
mode as before. The Masking page is the list of masked requests alone.
Masking turned on with no kind, no personal data and no word of the
user's masks nothing, and its Plugins › Built-in row said only where
its settings are. It now says "Nothing is masked yet" before the link
(the scattered settings audit after netube99 on X).
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
17a94a1b00 |
gateway: its keys show for a web page listed in Settings, and Settings links to them
A web page listed under Settings › Network and sharing › Web pages that
may call magpie is refused without a gateway key, shared or not, and the
row says to use "a gateway key from Gateway". But the Gateway page drew
its keys only while Share on local network was on, so that user found a
line saying keys come with sharing and no way to make one (the scattered
settings audit after netube99 on X). The keys now show while sharing is
on or a web page is listed, the off line names web pages too, and the
Web pages row links to Gateway's keys once it has a page.
The guard in renderGatewayOwn's settings callback also redraws the whole
view only while its box is still in the page, as 5efe0e195 does for the
first draw.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
88b541a25c |
images: every pointer names Settings › Models › Images, where the page is
The image models moved under Settings › Models, but the Library's Magpie
Image sheet, the MCP server's instructions to agents, the gateway's
"no image model" errors, the video tool's text and the docs still sent
users to "Settings › Images", a tab that no longer exists (the scattered
settings audit after netube99 on X). Every user-facing string now names
Settings › Models › Images in en, zh, zh-TW, ja and de, as do the site's
Qwen docs (en, zh, ja), llms-full.txt, the subsystem pages and comments.
Run in the tree with this change and the rest of the audit's fixes
(mote, base
|
||
|
|
ffbc45eac5 |
usage: a breakdown row's second line wraps at every width, not cut at 180px
In a wide window a Usage breakdown row's name column is a fixed 180px
and the line under the name (the sign-in, calls, credits, failures,
TTFT, speed) was one line cut with an ellipsis there, so everything after
the provider was hidden. Only the narrow web layout let it wrap. It now
wraps at every width; the narrow rule that did the same is gone.
Reported-by: shusoyo (Discord #general, 11-09)
Run (mote): usage-stat-sub-wrap.test.cjs 8/8 (chromium, webkit; en, zh;
1440 and 1000px). Broken by hand: with the old app.css it is 0/8 ("the
line wraps, not cut").
|
||
|
|
331f4a1393 |
gui tests: a comment line doesn't say a plugin's words (#5332, #5327, #5426, #5482)
i18n-keys' "a plugin's words are its own" has been red on main since |
||
|
|
c9a1c557d0 |
plugins: every built-in's row leads to where it is used, and the Gateway page holds its own setting
netube99 on X: one feature's settings are spread over pages that don't
say where the rest are. Plugins › Built-in had six rows (Key limits,
Groups, Rotation, Warm-ups, Middleware, Tools) with no page and no link,
so a user who turned one on was left to find where it shows. And the
Gateway page's one setting, Recent calls at a time, was a form under its
row in Plugins › Built-in, two pages from the calls it is about.
- pluginrt.Manifest gets Opens: the window page a built-in without a page
of its own is used on. budget → gateway (keys' limits), groups →
groups, rotation and warmups → providers (a provider's editor),
middleware and tools → plugins. builtinJSON sends it; featGo links to
that page by its sidebar name, as for a page plugin.
- A plugin with a page draws its settings there, not under its row
(renderBuiltins). The Gateway page draws its schema under Recent calls
(renderGatewayOwn), saves through /api/plugins/builtin as before, and
ends with a row "Port, allowed addresses and model ids" that opens
Settings › Network and sharing at the gateway's rows (4 languages).
Tests:
- TestBuiltinSaysWhereItsSettingsAre holds SetAt, Page and Opens per
built-in.
- builtins.test.cjs: no form in Built-in, and each Opens row's link says
its page's sidebar name. Its row reached by the wheel now counts the
window's bottom too, and frees a switch under the view's floating To
the bottom button by wheeling toward the window's middle: the rows grew
with their links, and WebKit de 420 left Usage's switch under it.
- gateway-own-settings.test.cjs (new): the setting under the calls,
translated, 20, picking 50 posts {id: gateway, config: {callsPage: 50}},
the row opens Settings › Network at #portList flashed; every language,
Chromium and WebKit, 1100 and 420, nothing past the window.
- builtin-places.test.cjs: Library's row now leads to Library.
Run at this tree (on origin/main
|
||
|
|
7000b23b88 |
gui: a reset's time is said by a formatter kept per language, not made each call (#5310)
resetClock and resetText called toLocaleTimeString/toLocaleDateString/ toLocaleString, which build a new Intl formatter on every call. The Usage page says every account window's reset on each render, so 600 accounts made thousands of formatters per render. dateFmt(opts) in i18n.js keeps one Intl.DateTimeFormat per intlLang() and options. resetText's past time gives toLocaleString's default fields (year/month/day/hour/minute/second numeric) by name, which is what toLocaleString uses when given no options. Probe (mote, 600 accounts open, W=520, names wrapping, 8 renders, median sync ms, before → after): WebKit ~431 → ~377 Chromium ~327 → ~279 Test: reset-clock-formats.test.cjs compares resetClock and resetText with what the old toLocale*String code said word for word. It covers a time every 5h from a week back to eight days ahead, in en, zh, zh-TW, ja, de and then system (a language switch after the cache is warm), Chromium and WebKit, in a Tokyo time zone with an en-GB system. 2/2 green. Broken by hand: a cache key without the language is red in Chromium (zh said "02/11/2026, 20:29:01" for "2026/11/2 20:29:01"). Run at this change on |
||
|
|
7a2a05c7a3 |
routing: Accounts and keys keeps each provider's heading while it says the same
freefcw on X (11-09, v0.1.3373 and v0.1.3375): magpie at 32% CPU with 2,250 idle wakeups and its webviews at 80 to 223MB; lemonkillergame and laincatx say the same of CPU and memory. The Routing page draws Accounts and keys again each second while it is in sight (countdown: its rests and resets count down). Each drawing made every provider's heading anew, icon <img> included, and patch then kept the old heading in the page. But an <img> asks for its picture as soon as its src is set, in the page or not, and the app's icons go out no-cache (revalidated), so every provider's icon was asked for again each second: through the Wails asset server in the app (a read and a sha256 of the file each time), and each a new SVG document in the webview (~0.6MB, #909). Over `magpie web` on mote, a seeded HOME with five providers on Routing: 322 requests a minute, 155 of them icons every 30s; every other page asks for 4 to 13 in 45s. A heading is now kept per provider while its icon, name and routing mode are the same, and a heading with its first row are a list of nodes, no longer a box they were moved into: the move took a kept heading or keys row out of the page each second, so patch never found it in place. Measured on mote (M5 Pro, load 50 to 90 from other sessions), the 0.1.3377 build vs this one, `magpie web` in Playwright WebKit on ?view=routing, 60s, twice each: - requests: 322 and 325 a minute -> 7 and 7 (icons: 31 each per 30s -> 0) - magpie's CPU: 0.78% and 0.73% -> 0.32% and 0.32% - magpie's RSS: 225-227MB both Test: routing-acts-idle.test.cjs, in Chromium and WebKit, en, zh, zh-TW, ja, de at 1100px and en at 420px: a resting key's countdown redraws the list, and over 3.5s no icon is asked for again and each heading is the node drawn before. 14/14 pass; with client.js before this change 0/14 (each heading is a new node). Its icon count alone passes on the old code there, since page.route's replies are kept in the browser's memory cache; the real server's requests are the numbers above. Run on mote: - every GUI file that opens Routing (181 files, both engines, at origin/main |
||
|
|
74017e0b87 |
gui: a card of many accounts is laid out once a render, not once an account (#5310)
fitQuota stacks each window's counts and gives side-by-side names one height. It ran group by group: clear the names' min-height, then read their offsetTop. Every read after a write lays the card out again, so one Usage render with N accounts in full laid the card out N times, O(N²). With 600 accounts at 520px wide and the names wrapping (a long window name), one render held WebKit's WebContent at 100% CPU: 1.7-2.3s of script and 10-13s to the second frame after it. Chromium took 1.2-1.4s. fitQuota now takes every group. It reads all the sizes first, then writes the classes and clears the heights. It reads each name's row and height in one pass, then sets the heights. packUsage's heights() passes the card's groups in one call; the ResizeObserver path already passed a set. Probe (600 accounts, all open, W=520, wrapped names), on mote: WebKit: 0.5s sync, 0.7s to two frames (was 1.7-2.3s, 10-13s) Chromium: 0.45s (was 1.2-1.4s) Wide layout, both engines: 0.3-0.4s before and after. Scrolling 600 accounts was smooth before and after (2 frames ~30ms). Test: quota-fit-batched.test.cjs counts the layouts forced in one render: a read of a layout getter while MutationObserver records are pending. The count must be the same at 160 accounts as at 40 (+4 room for a frame's observer). It also checks that every group was drawn, the names' heights were written, and each group was evened. Chromium and WebKit, en/zh/zh-TW/ja/de, 10/10 green. Broken by hand: the test pointed at HEAD's app.js (MAGPIE_FIT_ASSETS) is red 10/10: 243 forced layouts at 40 accounts, 963 at 160, both engines. Run (mote, load ~30; first at base |
||
|
|
c056b7c8c3 |
provider: a Responses provider's turns may go over the Responses WebSocket (#5781)
A provider the user added with an http(s) Responses address can now send its Responses turns over the Responses WebSocket that magpie already speaks to chatgpt.com (codexSocket), with `socket=auto|on|off`: - off, or absent: today's behaviour exactly. Provider.Via hides any socket value an outer context carried, so such a provider never dials. - auto: tries the socket, falls back to HTTP when the handshake is refused or the socket ends before the reply, and speaks HTTP to a host for 10 minutes once it refused the handshake (codexShun). - on: the same fallback, but never shuns; the socket is tried each turn. Provider.Via puts the provider's Responses host and path in the request's context (withSocket); codexSocket's gate is provider.SocketTurn, which takes a ChatGPT turn as before, or a POST to that host at <Responses>/responses. The rest is the ChatGPT leg's: the kept socket and its delta (codexKeepKey now also hashes the scheme, X-Api-Key and Api-Key), the error frames, 1009 handling. A provider's reply with no Content-Type is marked text/event-stream, since it is read as one. Routing, keys, limits, usage and masking are unchanged: only the transport under the request differs. Set with `magpie provider set <id> socket=auto|on|off` (refused on a provider with an account, no http(s) Responses address, or Vertex, TakesSocket), saved in providers.json as "socket", shown by `provider show`, and in the editor's Advanced as a WebSocket tick beside HTTP version (ticked saves auto, keeps a CLI's on, unticked saves off; shown only while the Responses address is http(s) and there is no account). docs/subsystems/providers-accounts.md describes it. app.js pays for its rows by three long comments cut to one line (renderMove, the vendors' status pages, header rows): the core's scripts are 478 bytes smaller than on |
||
|
|
7cabf0da98 |
sessions: one place says which ids a ZCode request names, and drafts are one group (#5754)
On top of Flandern1211's cherry-picked fix (the commit before this one).
GatewayKeys gave the bare id of a ZCode session (sess_<id> in ZCode's
database, <id> in the gateway's record), but NativeIDs kept its own copy
of the keys: the management page still counted every ZCode session sent
through the gateway as a gateway-only session, its delete listed them,
and its search read them a second time. requestIDs is now the one place
that says which ids a request names a session by; GatewayKeys (Sessions
list, its spend, the stats' native set, viaOf, the manage search) and
NativeIDs (the manage page's count and delete) both read it.
ZCode runs a session started without a project in a folder it makes for
that session alone: <workspaceDirectory>/draft-<id> or <ms>-<uuid>, with
workspaceDirectory = ~/.zcode/workspace (read from ZCode 3.17.2's
out/host/index.js, downloaded from cdn-zcode.z.ai; never the live
~/.zcode). The reporter's group is renamed from "Scratch sessions" to
"Draft sessions" (草稿会话 / 草稿會話 / 下書きセッション /
Entwurfssitzungen), after ZCode's own word for them, with a GUI test of
its own. Comments no longer quote "Seen through the gateway", which
i18n-keys' plugin-words guard read as the core saying the word.
Run (mote, at this tree, rebased on
|
||
|
|
2b8ad61468 |
routing: a group's header counts its members on, not who one request was held to
adorable_piglet on Discord: the group magpie found for GPT-6 Astra, In order, three of its five members on (two on providers switched off), read "GPT-6 Astra · routing group · 1 on" over a Codex request answered by one member. The header counted the request's order, who that one request was weighed among. A conversation held to one member (native compaction, Strict, a sealed task, a key's models) has an order of one, so the group read as having one on. It now counts the route's group.members (GroupRef: the group's ready members as the request came); why the request went to one alone stays the first line's to say. Routing itself was not at fault: a gateway repro with five members, two providers off, routed In order over all three on. Run on origin/main |
||
|
|
b62117287b |
gui: a moved plugin's first question offers its other ways, the API key among them
mahiro233 on Discord (v0.1.3372, Kiro plugin 0.1.34): Kiro's account sheet asked "Choose a sign-in method" with three choices and Cancel, and offered no API key. The plugin has one (its third way, "Kiro API key (ksk_…)"), but a moved subscription opens its plugin's first way at once (#777), and when that way asks a question first, as Kiro's does since plugin 0.1.21, the question had no way to the others: "Other ways to sign in…" and "Use an API key instead" are on the waiting box only, which the question comes before. Kiro CLI's or IDE's sign-in was out of reach too. The first question of a moved subscription's way, when the plugin has other ways, now has "Other ways to sign in…" (already in every language), which shows the way picker, as the waiting box's does. A later question (Kiro's Start URL) doesn't: the user chose that way already. Test: plugin-ask-ways.test.cjs, en and zh, Chromium and WebKit: the question's choices and hint, the link, the picker with the key way, the key field titled by its label, nothing signed in before a key, no link on the Start URL question, and the plugin's words in Chinese where it gives them. Run on mote at the pushed head, Chromium and WebKit: plugin-ask-ways, plugin-other-ways, -moved-signin, -key-hint, -password-prompt, -signin, -keyless-signin, signin-paste-plugin, deprecated-subscriptions, i18n-keys and i18n-en-no-cjk, 49 of 50 each; the one red is i18n-keys' "a plugin's words are its own", the same 3 words on origin/main |
||
|
|
40cbdaa7e8 |
provider: an account's window can be capped at a fixed amount of its unit
A window magpie reads with a total and a unit (a day's 1000 credits, a
plan's requests) can now be capped at an amount of that unit, not only
a share: 9won_25273 asked to stop an account at 300 of its day's credits.
- AccountWindowAmounts keeps it per account and window (capId). An
amount and a window's own share replace each other.
- WindowCaps.limitShare turns it into a share of the total for the mark
and NearCap. CapHeld and capReached hold the account once the window's
count reaches the amount (past), and rest it as the percentage cap
does: the next account takes the request. cappedError and the trace
say "has used 300 credits ... past its cap of 300".
- A reading with no total ignores the amount; the account's share
applies.
- GUI: the window meter's menu has one more item, Amount..., typed in
place (provider/windowcap with amount). It shows only on a window
with a unit and total. Strings in zh, zh-TW, ja, de.
- CLI: magpie provider account-cap <id> <account> --window <name>
--amount <n|off>.
Usage outside magpie counts: every cap reads the vendor's own count, so
what the account spent in the vendor's app or on another machine counts
from the next reading on. magpie can only hold back its own requests.
Run, at this head on Linux (wsl-run, magpie-desktop):
- gofmt -l: clean; go vet ./... for linux (-tags nogui) and windows: ok (darwin
vet needs cgo, so it runs with the full suite on mote afterwards)
- go test -run 'Lang|ToolLoop|LoopGuard|Cap|Amount' ./internal/gateway
./internal/provider ./internal/cli: ok (TestWindowAmountCapHeld,
TestSetWindowAmount, TestWindowAmountHoldsTheAccount, the CLI cases)
- GUI window-cap, window-cap-pool, account-cap in chromium and webkit,
420 and 1100 wide, en zh zh-TW ja de: 78 of 78 in each engine. An
earlier webkit run lost the amount test's page once ("Target page,
context or browser has been closed"); it passed in 2 more full-file
runs and 60 of 60 alone
- i18n-keys: only "a plugin's words are its own" red, words that aren't
this change's (#5332, #5426, #5482)
Broken by hand: limitShare ignoring amounts (of < 0): TestWindowAmountCapHeld
and TestWindowAmountHoldsTheAccount go red.
Not tried: the full go test ./... at this head (queued on mote, runs
after); a real account at an amount cap.
iFlytek: 9won's 讯飞 overshoot isn't covered. Loomy's daily window sends
used as a count and amount as what is left (plugins#889); AStudio's
wallets tell a balance only, which no cap can hold (#5770).
Reported-by: 9won_25273 (Discord)
|
||
|
|
f5f68b4335 |
routing: with routing groups switched off, their sidebar tab goes
yyddbds (Discord) turned Routing groups off in Plugins > Built-in and the sidebar still showed its tab. The tab was tagged with the routing plugin only (data-feature="routing"), so only switching Routing off hid it. It is now tagged "routing groups", like Routing's own "Routing groups >" button and the two "Make a routing group" buttons. The page also holds each provider's accounts and keys (pools), which stay editable with groups off. So with groups off: - ?view=groups, or a page open when groups are switched off, opens Routing (offView in app.js), not Agents; - the groups' section moves under Routing's requests, with the "turn on routing groups" note and the pools; turning them on opens the groups page again and moves the section back. Every other sidebar tab (sessions, library, routing, gateway, usage, masking) was already tagged with its own plugin; only groups was wrong. Run, on mote (macOS 27): - routing-groups-off.test.cjs (rewritten: 1200, 900 and 420px, both engines, every language): 12 of 18 red on the old code, 18 of 18 green on this one. - routing-groups-off, builtins, sidebar at the rebased head 3930a3917: green in Chromium and WebKit. - Whole GUI suite at the old base |
||
|
|
ff7d84b9b2 |
gui: a built-in's switch, settings and page lead to each other (netube99 on X)
netube99 (X, 2119721422918742222): masking is switched on in Plugins ›
Built-in, set in Settings › Privacy and seen in Insights › Masking, and
none of the three leads to the others. Web search had the same split.
One pattern for every built-in whose switch, settings and page are apart:
- pluginrt.Manifest.SetAt ("privacy #redactList") says where Settings has
its settings: redact, search, gateway and otel set one. builtins.go
sends setAt and page (its nav.page Part).
- Its Built-in row (featGo): "Settings › <tab>" and, while on, its page
("Masking"). No settings link while off when those settings hide with
the plugin (Observability).
- Its settings, while off (featOff): a first row "Off in Plugins ›
Built-in", what being off means, and Turn on. Privacy and Web search
use it; search's own off row went.
- Insights › Masking's head: "Settings › Privacy", unless Turn off
already goes there. At 600px and under its buttons wrap below the title.
- docs/subsystems/plugin-runtime.md documents SetAt.
Proposal for the owner, not built: give each feature one home with its
switch, settings and page together. This commit only links the three.
Core budget: no raise. +~1.9KB of code is paid for by shortening six
app.js comments (logo mask shelf, copy, sidebar, account models,
fitSend, the hold room).
Run on mote at fe672ce69's tree (origin/main
|
||
|
|
9dd7aabca8 |
gui: an account's refresh stays where it was pressed, and a sheet held low rises as it scrolls
墨雨藏锋 on Discord (#feedback, 11-09): pressing an account's quota refresh in a plugin provider's sheet (MonkeyCode) moved the view down, and the accounts showed only a few rows while the window had room. The jump: every account's refresh shares the aria-label "Refresh this card". openModal gave a redraw's focus back to the first element with that label, which is the first account's, and the focusin listener then marked the hold on that button. WebKit's fallback focus did the same. So the row pressed was let go, and it moved with the rows above it as they grew (186px in the test). And since quotaRefresh keeps the same button across redraws, holdModal never took it as a copy, and cap() never scrolled the list back to it. Now openModal finds the focused element by its place among elements with that label. A redraw giving focus back does not mark a new hold (modalRefocus). The held element (or its redrawn copy) is handed to holdModal (modalHold.copy), so it stands in and the list is scrolled to hold it. The short list: there is no fixed cap. A sheet pressed while short and centred keeps its top (calc(100% - off)) when its content then grows to the window's foot, so its one scroll box shows a few rows. Now scrolling that box first lifts the sheet into the room above, its foot staying, until it has what it needs (modalClimb); then the box scrolls. Nothing moves on a click, and no CSS or layout changed. Core budget: app.js 1,310,953, core 1,533,711 (budget 1,533,802), paid for by comments cut in startImport, openProtoMenu, hold(), the click handler and navMorph; no raise. Run on |
||
|
|
136178803b |
gui: Escape closes a plugin's details dialog on Discover (#3779)
On Plugins › Discover, Escape left a plugin's details dialog open and only showed Install's focus ring. detail() opened #modal without setting confirmAsk, unlike every other dialog that borrows #modal outside Providers, so Escape reached only the Providers page's handler, which closes nothing there. detail() now sets confirmAsk and its Close goes through closeConfirmAsk. show() clears confirmAsk when leaving a page closes the modal: the dialog's Sign in goes to Providers through show(), and a leftover confirmAsk would take the next Escape there. This is sevtdy's patch from the issue. Side effect: cfgblocked.js steps back to the dialog under a Repair only when confirmAsk is unset, so a Repair opened over the plugin details no longer goes back to them, the same as over the other confirmAsk dialogs. New test: plugin-detail-escape.test.cjs (en, zh): Escape closes the details twice, Close still closes them, and after Install, then Sign in, then Providers, Escape closes the add sheet. Run (mote, via suite.lock): - plugin-detail-escape.test.cjs: chromium 3/3, webkit 3/3 Broken by hand: - plugins.js and app.js at the base: red in both engines (the first Escape leaves the dialog open) - only show()'s clear taken out: red in both engines (after Sign in, Escape on Providers leaves the add sheet open) Wider GUI run (every plugin*, modal-*, i18n-keys, update-wait and the files testing Escape on #modal: 114 files, both engines): running at push time; any red gets its own issue. Not tried: the real app (Wails webview) by hand. Reported-by: sevtdy <16433683+sevtdy@users.noreply.github.com> Co-authored-by: sevtdy <16433683+sevtdy@users.noreply.github.com> |