ac4af582301a4e8a29245dbba767eba31334ddf9
213
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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
|
||
|
|
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. |
||
|
|
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
|
||
|
|
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 |
||
|
|
bceeabd93a |
gui: a subscription's warm-up, check-in and resets are in its provider's editor
The owner, 11-07: "这些配置难道不是应该在对应的Provider那个弹窗里面吗?为什么会散落在Settings里?"
Settings › Allowances no longer holds Codex's auto-use resets and how
early before one expires, Codex's and Claude's warm-ups, or the daily
check-in of WorkBuddy, Trae CN, MiniMax, Qoder and the plugins that check
in themselves. Each is in its own provider's editor (PROV_PREFS: the lists
move from a hidden holder into the editor's .prov-prefs box and back).
Settings' search still finds them, each a row whose Open goes to the
editor. Task-done alerts stay in Settings. "Codex: auto-use resets" and
"Codex: how early before one expires" lose their "Codex:" in the editor.
In the editor a press inside a part that redraws moved the page: the
modal hold moved the dialog, which can't move once it meets the window's
edge, and lost a pressed element a redraw replaced. The hold now scrolls
the editor's body by what is left, and finds the replacement by its path
or by tag, class and text under its id'd ancestor. In a browser the
editor's body keeps its bar's room, as the app's already did: WebKit kept
the grid's columns from before a bar that came with a grown field, and
the editor scrolled 10px sideways.
Budget: app.js grew with the editor's parts; paid for by comments cut
(curlOf, scrollCloses, unrollSheet, quotaRange, ledGroupSpeed, the
Settings tabs, the warm-up and fold notes), no raise.
Run at this head (704fd85f3 before this message, on origin/main):
- mote: go test -count=1 ./internal/gui/ ok (TestCoreScriptBudget
included); go vet ./..., GOOS=windows go vet ./... and GOOS=linux go vet
-tags nogui ./... clean.
- mote: settings-groups and i18n-keys GUI files. i18n-keys' "a plugin's
words are its own" fails the same on origin/main (#5332, #5327, #5482).
- WSL, both engines, the files this can reach, mine vs origin/main
|
||
|
|
80ae904c23 |
routing: routing groups get a page of their own, beside Routing
The owner asked for the groups to leave the Routing page (11-06): under the live stage and every request they were a long scroll down, and New group with them. The design was reviewed before this was built. - New page, Routing groups (#view-groups), drawn by the routing plugin's same script (routingPage), so the editor, its dirty/discard and every group action are unchanged. Toolbar: filter, "N groups · M on", Templates, Import, Select, and New group as the filled button. The list is right under it, and a Settings section under the list holds Found groups (with Exclude providers…) and Names in agents' lists. - No Export button: each group already has its own Copy to share. - Routing keeps the live stage and the requests. A request's group opens the groups page at its row. - The sidebar has a Routing groups tab right after Routing (from 1024 points). The header's row has no room for one: at 860px the extra tab pushed the logo out (brand.test). There the tab is hidden, Routing's tab is lit for both pages (markNav), and Routing's head has a "Routing groups ›" button, hidden beside the sidebar. - Every way in now goes to the groups page: the guide's Open routing groups, the panel's and the provider editor's Make a routing group (window/main?view=groups&newgroup=…). mainView still takes view=routing&newgroup from an older panel. - Words: "Routing groups", "Open routing groups", "Once saved, make a group of them in Routing groups.", and the editor's names note now says the setting is under the list, in zh, zh-TW, ja and de. "Open Routing" stays for the Agents page's button. - Docs: providers-accounts, gateway-routing, plugin-runtime, gui-shell and reference say "Routing groups page" where they mean the groups. - Core budget: the core's scripts are 1,533,774 of 1,533,802, paid for by three show()/setGatewayMode comments cut in app.js. No raise. Tests: routing-groups-page.test.cjs (new) covers the page in Chromium and WebKit, en/zh/zh-TW/ja/de, at 1280, 640 (window) and 420 (web): no groups on Routing, the tab or the head's button by width, the lit tab, toolbar order, New group primary and in sight, list then Settings, no sideways scroll, no native select, no left-border accent; a request's group to its row; quotas redrawn with an open editor left alone. The trace tests (routing-compact, -pause-folder, -rule-models, -folder) open Routing, then show the groups; routing-editor-foot and name-suffix-where-named scroll by wheel, as the scroll guard lets a reader; builtins expects the groups tab beside the sidebar only. Removed: routing-groups-jump (the head's "Routing groups ↓" that scrolled down to them, gone with them), routing-pointer-pin and routing-steady (the groups kept in place under requests streaming in above them: no request is above them now). Their guarantee that what redraws leaves an open editor and its typing alone is routing-groups-page's quotas case; Routing's own lists keep their keepInView. The groups page's jump: a request's group, or a pool's "Several keys" chip, opened the groups page and scrolled the row to the centre, and the next frame show()'s backAfterLoad put the page back where the reader last left it, then brought the focused segment in by "nearest": in WebKit the pool sat half under the window's foot (routing-mode-goes, 9 of its 10 WebKit cases). goRouting now jumps at once on a page it opens and marks it arrived(). The wheel in routing-many-keys turns over the keys: at the page's foot, now shorter, the mouse rested over the requests list (.rt-reqs, overscroll-behavior: contain), which took every wheel up, and the test stopped with 2 keys in sight. That is #4082's cause. routing-days-fit's fixture has 12 requests, a day that fills the window, since the day bar held needs room under it. Run on mote (macOS 27, load 25 to 65), Playwright 1.62.0: - Go: go vet, gofmt -l and go test ./... at the rebased head ( |
||
|
|
7033f50722 |
gui: the panel opens the main window from its edge nearest the tray
isaac_bai on Discord, after v0.1.2857 named the header's icon "Open the
main window": with Windows' taskbar at the bottom, the panel stands above
the tray and its header is the panel's whole height from the icon; the
button left of Quit was where his pointer already was. yogurt36 had asked
for one opener, not two, so the panel still has exactly one, now on the
edge nearest the tray:
- Hung below its icon (the Mac's menu bar, a taskbar or bar at the top)
it is the header's icon, as before.
- Standing above it (Windows' bottom taskbar, a bottom panel on Linux) it
is "Open the main window" left of Quit in the foot (#openMain), and the
header has no icon. The string is the one the icon's name already
uses, in all five languages.
Which side: once togglePanelNow has placed and shown the panel,
tellPanelSide reads the panel's bounds and its screen's and sends
magpiePanelOpenAt("foot") when the panel is nearer the screen's bottom,
"head" otherwise (panelOpenAt, panelside.go; the Mac is always "head").
Under Wayland a window can't read where the compositor put it, so there,
and until the app says, layout.js sets body[data-open-at] by the system:
"foot" on Windows, "head" elsewhere. CSS shows one of the two from it.
Tests:
- TestPanelOpensTheWindowFromTheEdgeNearestTheTray: Windows bottom/top
taskbar, a tall panel, a second screen above the first, Linux X11
bottom/top, Wayland, a screen not read, the Mac, unknown places; only
"head" or "foot" reach the page.
- TestPanelToldItsSideWhenShown: both show paths in togglePanelNow call
tellPanelSide after placing; app.js has magpiePanelOpenAt.
- panel-open-once.test.cjs, Chromium and WebKit x en/zh/zh-TW/ja/de:
on a Mac platform exactly one opener, the header's, named per
language, opening /api/window/main, foot ["profBtn","quit"]; told
"foot" it moves. On Win32 exactly one opener, the foot's, left of Quit
(["profBtn","openMain","quit"]), the foot's buttons fitting apart with
their words whole at 360px, opening /api/window/main; told "head" it
moves back; an unknown side changes nothing.
Run on mote via mote-run:
- At this head (rebased on
|
||
|
|
b088fd0f09 |
gui: the panel's header icon is named "Open the main window"; a double-click on the Windows tray icon opens it
isaac_bai on Discord missed the "Open magpie" button beside the quick panel's Quit, and was setting the tray click to open the main window just to get back to it; he asked for a double-click on the tray icon. History: the foot's button (#openMain) was taken out on purpose in |
||
|
|
84da86ebd5 |
gui: Hide accounts is one switch for every page, window and the panel (paultian)
paultian on Discord (#feedback): Routing, Usage and Providers each kept their own "Hide accounts" state, so turning it on in one page left the others showing emails. Now window.hideAccounts is one switch, one localStorage value (magpie.maskEmails), behind #rtMask, #usageMask and #pvMask alike. Flipping it in any page applies to every page at once, and a storage event carries it to other windows and the tray panel. The old magpie.maskProviders value is folded in on first load (hidden if either value was on) and then removed, so nobody who hid accounts on one page sees them shown after updating. The tooltip and the Settings line now say "on every page" instead of "on this page", in every language. Tests: provider-mask.test.cjs checks that one switch hides accounts on every page and in a second window, that the state survives a reload, and that an old maskProviders=1 comes through as hidden. account-mask's expected tooltip text is updated. Run on mote (GUI files at base 05aba5ca4; the Go asset/budget tests again at this head after rebasing on |
||
|
|
ed978e560f |
gui: the Quit question's Don't ask again, and Settings › General › Ask before quitting (zhujiu on Discord)
zhujiu (Discord #feedback) asked for a 不再提示 on the question a tray Quit asks while agents go through magpie ( |
||
|
|
da275848b6 |
tray: Windows shows a card's number in its icon (Benjaminliang_1 on X)
Windows' notification area shows no text beside an icon, so with a card in the tray the icon itself is now the first card's figure: the first row of the first card whose first row is a percentage, used or left as Allowance display has it, its digits alone (trayIconFigure). It is drawn in Segoe UI Semibold (Go's bold if the font can't be read) at SM_CXSMICON, white on a dark taskbar, near black on a light one, as tall as fits, centred by its ink, three digits narrowed into the square (trayNumberIcon). It is drawn again when the figure, the icon size or the taskbar theme changes (SystemThemeChanged wakes the loop); the tooltip still lists every card. A balance or magpie's totals are skipped; with no such card, or no cards at all, the icon is the bird as before. Settings > Usage > Tray icon number (settings.TrayNoNumber, Windows only, on by default, kept per computer) keeps the bird when off; Menu bar windows is now shown on Windows too, since it picks the row the number comes from. The number row sits after Menu bar cost, so the bird > pace > cost order the other tests pin holds. Linux and the Mac are unchanged. New words in zh, zh-TW, ja and de. app.js stays in the core budget with one comment shortened, no raise. Run at this commit on origin/main |
||
|
|
50d5fcaef5 |
gui: Long conversations says its scope — magpie's models only (#3440)
The line said Codex, Claude Code and Grok Build compact at 272K (or the size typed) with no word on which models: the threshold rides the model list magpie serves, so a subscription's own models (the ChatGPT or Claude account's own entries, #674) never see it — they keep their own window and the agent's own compaction. The reporter asked for exactly this in #3440: say the scope in the interface. The line and its four translations (zh, zh-TW, ja, de) now do. No behavior changes — the list magpie serves is what it was. What changed: the sub line of #fullContextRow (index.html) and the matching key and values in i18n.js, all four languages. The key is the English itself, so the key moves with the copy. Rebased onto main |
||
|
|
8d8df06399 |
plugin, gateway: a plugin reports its models' load, and busy models can go last (axelburks on Discord)
axelburks (Discord #feedback): an in-house vendor queues requests to
its busy models, and the plugin could only put the load in the model's
name, which changed only when magpie re-read the list.
- A provider plugin calls input.magpie.load(provider, {"<model id>":
0-100 | null}) whenever it likes, from its own timer. host.js
(reportLoad) clamps each number to 0-100, null clears a model, every
other value is dropped, at most 1000 a call, and it returns the count
taken. A provider that isn't a string or loads that isn't an object
throws a TypeError. It goes to Go as an unasked {event:"load"}.
- internal/plugin/load.go keeps each by provider and lowercased model
id. ModelLoad answers unknown once a load is older than LoadFresh
(5 minutes), never idle. model@size falls back to its model.
- The provider editor shows it by the model as a grey ctx badge
("87%", titled "87% busy now, as its plugin says").
- Settings > Network and sharing > Busy models last (settings.BusyLoad,
POST /api/settings/busy-load, Off by default, over 50/70/80/90% or
1-99 by hand): restLast puts a model reported over it behind the
ready candidates, ahead of the resting. The trace row has busy:<load>.
At a new turn affine moves a conversation off it (Why "busy",
busyBehind); within a turn it stays. after, readyForNew and leastHeld
skip it. Unknown load, a lone candidate, or all busy: nothing moves.
- Docs: site plugins page (en, zh, ja) "Model load" section and input
table; docs/subsystems provider-plugins.md and gateway-routing.md.
Run, all on mote via mote-run at a42736807's tree rebased on
origin/main
|
||
|
|
3f2faef620 |
gui: the Providers page has its own Hide accounts switch
Routing's Hide accounts (账号打码) also masked the Providers page, where nothing showed it was on or let you turn it off (Discord #feedback, 1566189346665799752). The Providers page now has its own switch beside its search box, placed and drawn like Routing's (.rt-mask moved from routing.css to app.css), and each page follows its own switch: Routing, Usage and the tray panel follow magpie.maskEmails, Providers follows magpie.maskProviders. The user's own choice is kept: when maskProviders was never stored, it is seeded from maskEmails and written at once, so someone who had masking on stays masked on both pages after the update, and someone who turned it off stays unmasked. A switch with a stored choice is not changed by Mask personal data's follow(); turning Mask personal data on still masks both (hideAccounts.set(true, true), in app.js and plugins/redact/page.js). show() asks hideAccounts.page() to re-mask when the page in sight follows the other switch. No new strings: the button reuses Routing's translated label and title. app.js 1,310,438, core under its budget, no raise. Run: - New internal/gui/tests/provider-mask.test.cjs, both engines, all 5 languages, at 1000 and 420 wide, plus the touched window-mask, account-eye, privacy-hides-accounts, mask-emails, plugin-name-unmasked, masking-demo-unblurred: 134/134 on mote. At the rebased head (origin/main |
||
|
|
63cb1af3cb |
library: the MCP router's mark is the bird with its tail routed out to three ends
The owner asked for a mark that says MCP routing and picked, from three
generated drafts, magpie's bird whose tail fans out into lines ending in
dots. It is drawn as SVG on the bird itself, not a picture, so it stays
sharp at 17px and takes the theme's colour: the bird clipped short of its
tail (#bird-notail, beside #bird-tail in index.html), three strokes from
where the tail was and a dot at each end. Every place hubMark draws (the
Library's MCP router row, the Connect an app sheet) gets it.
Run on mote (macOS 27): library-mcp-hub now checks the clip, the three
routes and their ends (red on the old mark). library-*, i18n-keys and
old-webkit, both engines: 895 pass, 5 fail. The reds are i18n-keys
"a plugin's words are its own" (#4524) and library-row-remove's 3
subtests (#4304); both red the same at origin/main
|
||
|
|
847f0c4703 |
gui: Masking alert lives on the Masking page
nb5p on Discord (#feedback): "这个脱敏提醒被放到额度设置里了,害得我找半天没找到". The Masking alert row sat in Settings › Usage. It now closes Insights › Masking, after the list of requests, in the page's own `.list.prefs` rows (same Off/On segs, same ids #maskAlertRow/#maskAlertSegs, same i18n keys and the same maskAlert setting). Nothing is left in Usage. The page draws it from page.js after loadSettings, hides it while one request is open, and gateway mode leaves it out as Settings did. Placed after the list so the requests still start in the first screen (masking-records at 640px) and the demo keeps its place between the card and the list. Run at base |
||
|
|
a45a0f1c5d |
signin: Settings can keep sign-in pages out of the default browser (max2020)
max2020 on Discord signs in from a separate, fingerprint browser so the vendor never sees their default one. Every waiting sign-in already shows its link with Copy link (since |
||
|
|
995f84a0f9 |
codex: how early an expiring reset is used is a setting
A Codex reset card that would run out unused was spent 30 minutes before it expired, a fixed resetExpiryLead. Now the lead is codexResetLead in settings.json (minutes, 15 to 1440). Unset, out of range or unreadable reads as 30m, never 0, and magpie never writes it unless the user does. - settings: CodexResetLead and Settings.ResetLead(); the menu's values are 15m, 30m (default), 1h, 2h, 3h, 6h, 12h, 24h. - provider: the spend (expiringResetSpent) and routing (Allowance.Restarts, through nextResetLook) read the same resetLead(), so they still agree (#717, #718). The "near" look cadence follows it: lead + 30m, at least 1h, so a look lands inside a long lead. - GUI: Settings > Usage, under the Codex auto-use rows, a row "Codex: how early before one expires" with an app menu (no <select>), and the sub text says spending earlier loses what the windows have left. The four "before it expires" strings say the chosen lead. POST /api/settings/codex-reset-lead; the general save keeps the field. en, zh, zh-TW, ja, de. - CLI: magpie quota auto-reset lead [30m|3h|<minutes>|default]. - app.js budget: the auto-use rows moved out to lazy autoresetown.js (painted in the same draw once loaded), so app.js and the core script stay under their budgets with no raise. The button sizes to its widest label (a grid of every label), so picking one never rewraps the row. Run (all on mote through mote-run): - go vet: darwin, GOOS=linux -tags nogui, GOOS=windows; nogui build. - go test -tags nogui -timeout 45m ./... at 3955adccf (this change before the paint and sizer fixes, which touch only GUI assets): 81 ok. go test ./internal/gui at this head: ok. - GUI, Chromium: codex-reset-lead, codex-auto-reset, codex-auto-reset-settings, segs-press-redraw, i18n-keys: 62/62. WebKit: every case of those files failed at browserType.launch (180s timeout) before a page loaded, both runs; mote's browser launches hang under #4125 (load ~26), so WebKit is not run. - Rebased onto |
||
|
|
7d4a631480 |
tray: pick which of a subscription's windows the menu bar shows (StrikingRaw on X)
Claude Pro's menu bar card drew its 5-hour and 7-day windows as two
small stacked numbers, and the user wanted one of them alone. Settings ›
Usage › Menu bar windows (under Allowances in the menu bar) lists a pill
per ticked subscription with two or more windows ("Claude Code · All
windows"), opening the app's menu: All windows, then each window. The
choice is settings.TrayWindows, by provider id (every account of it, the
in-use "|*" card too) and by window kind from the span ("5h", "1d", "7d",
"month", "15m", "name:<name>" when the span is unknown), so a vendor
reordering windows changes nothing. Unset shows every window as before;
a pick whose windows are all gone shows every window again, never an
empty card. Only the bar's rows and the Linux label are filtered; the
tooltip still says every window. One row draws at mpRowFont's 11pt
single-row size. Hidden on Windows (its tray shows no text). Per
computer through KeepOwn. The GUI learns kinds from trayKind on
/api/usage/quotas (withTrayKinds; model and aside windows get none). The
row's code is a lazily imported traywindows.js, so the core script
budget is not raised (app.js +4 lines for the call and the prefs keep).
Run:
- mote (macOS): go test -run 'TrayWindow|TrayUsage|WithTrayKinds|
CoreScriptBudget|AppScript|TrayImage' ./internal/gui/ ok;
./internal/settings/ ok; davsync TestSync ok. TestTrayImageOneWindow
draws through AppKit: Claude's card one line ("42%"), both windows two;
the PNGs were looked at.
- mote: gofmt -l empty; go vet ./..., GOOS=linux go vet -tags nogui
./..., GOOS=windows go vet ./... ok; go build, GOOS=linux go build
-tags nogui, GOOS=windows go build ok.
- magpie-desktop (Linux VM), --test-concurrency=1, BROWSER=chromium and
webkit: tray-windows (en, zh, zh-TW, ja, de; picking All; hidden on
Windows / single-window / no cards; 360px narrow), i18n-keys,
old-webkit, tray-usages, tray-logos, tray-cost, quota-pace: 43/43 each.
After rebasing on
|
||
|
|
e0ad48641e |
panel: the tray panel opens the window from its header icon only, no second "Open magpie" in its foot
yogurt36 on Discord: the menu bar panel had a button to open the window
at the top (the header's open-as-a-window icon, #open) and another at
the bottom (the foot's "Open magpie", #openMain). Both called
api("window/main"). The foot's button is gone; the foot keeps what is
its own: Profiles, the status line and Quit. The four "Open magpie"
strings it alone used are out of i18n.js (the tray menu's own
"Open magpie" lives in traymenu.go and is unchanged).
Test: internal/gui/tests/panel-open-once.test.cjs, both engines, all five
languages: the header's icon opens the window, the foot's buttons are
Profiles and Quit only, Quit worded in each language.
Run:
- panel-open-once, Chromium on mote: 5/5 ok; i18n-keys on mote: 4/4 ok.
- panel-open-once, WebKit on Linux (wsl-run, magpie-desktop): 5/5 ok.
WebKit does not launch on mote right now (several pw_run.sh from other
sessions hung for hours; a bare webkit.launch() times out at 80s).
- Broken by hand: the test against the old assets (origin/main
|
||
|
|
3bebc38393 |
gui: a key combination opens the quick panel from any app (ben hanks)
ben hanks on Discord asked for a global shortcut that opens the menu bar or tray panel. Settings › General has a new row, Quick panel shortcut, with none set by default. Clicking its field records the next combination: a letter, a digit, Space or F1–F20 with Ctrl, Alt/Option or Cmd/Win, or an F key on its own. Esc or a click elsewhere stops recording, and the cross clears the shortcut. It is shown the system's way (⇧⌘K on a Mac, Ctrl+Alt+K elsewhere). POST /api/settings/panel-shortcut checks the combination, has the running app bind it through Wails' GlobalShortcut (Carbon hot keys on the Mac, RegisterHotKey on Windows, XGrabKey on X11), and saves it only once it is bound. One the system refuses is not saved, the old one stays bound, and the status line says why. A pressed shortcut toggles the panel as a tray click does. The shortcut belongs to each computer (KeepOwn), the Settings page's own save leaves it alone, and the old Mac process lets go of it as it hands over. On Wayland no app may grab keys, so the field is turned off and the row names the command (`magpie panel`) to bind in the desktop's own keyboard settings. Every string is in en, zh, zh-TW, ja and de. No size budget was raised: app.js is 1,315,252 of its 1,315,316 after older comments were cut. Run at this head (rebased on origin/main |
||
|
|
4a4a90c237 |
gui: the sidebar's button stays in one place whether the sidebar shows or not (ztf4080 on X)
ztf4080: "左侧栏收起按钮在左上角,但是收起后展开按钮变了右下角". The button
to hide the sidebar sat in the page header to the right of the sidebar
(x=232 at 1280), and once hidden it was in the title bar after the magpie
(Mac x=175; Windows 14; Linux 93/14/40 as the brand folds). Each click
moved it.
Now #sideToggle is first in the title bar in both layouts, as Finder's,
Notes' and Mail's: layoutNav moves it with the brand, into .side-top when
the sidebar shows and to the front of .top when it doesn't. .side-top has
the header's height and left padding (Mac: after the traffic lights at
96px/zoom, as .top), so the button keeps its x, y and size. A sidebar too
narrow for the name keeps the bird (fitTop sets .side-top.tight). Windows'
10px .side-top is gone: the button needs that row there too. Nothing else
in the sidebar changed.
Run (on mote, through mote-run; NODE_PATH playwright 1.62.0, chromium and
webkit):
- Repro before the fix: a probe at 1280/900/640, en/zh/de, Mac/Windows/
Linux chrome, gave the positions above.
- side-toggle.test.cjs gains "<os>: the button stays where it was" for
Mac, Windows and Linux: every language (en, zh, zh-TW, ja, de) at 1280,
900, 640 and a 168px sidebar; hide then show, x/y/w/h within 0.5px, the
header fits, .side-top doesn't overflow.
- Broken by hand: the new test against origin/main's assets fails all 3
OS subtests in both engines (18 pass, 8 fail); reverting layoutNav's
append/prepend fails them too.
- side-toggle, side-width, header-centre: 49 pass, 1 fail (header-centre
webkit, the ResizeObserver page error, #3479; the same on the base).
- The 22 GUI files that touch the sidebar, brand or toggle
(--test-concurrency=2): 335 pass, 11 fail: header-centre webkit (#3479)
and mobile-web's desktop compare against HEAD~1, which moved on purpose.
- mobile-web.test.cjs: until BASE_REF has the move, its desktop compare
leaves the button, the magpie and the header out of both pictures, like
its other "until BASE_REF has it" cases. Run in a git checkout on mote
with BASE_REF=HEAD~1: 30 pass, 0 fail in chromium and webkit.
- At the head rebased on
|
||
|
|
9101bb8879 |
privacy: a request masking would change can go as written to a model you picked
jessyoungyu on X: when a masking rule hits, send the request to a self-hosted model instead, so a prompt like 「百度这家公司怎么样」 gets an answer about Baidu, not about a placeholder. Settings › Privacy › Instead of masking, send to (settings redactRouteTo). It is Off by default, and nothing changes for a user who leaves it Off. It is picked in the app menu, and only models whose every route is unmasked can be chosen: the provider is set to Send requests unmasked, it is on this computer or the network, it has no account, and any fallback or group member is unmasked too (gateway.MaskRoute, the same rule as provider.SkipsRedaction). The setting is saved on its own with POST /api/settings/redact-route, which checks it with MaskRoute. The general settings save keeps the value. Decisions: - When a value would actually be masked on an agent's turn (maskHits.n > 0), serve sends the request to the chosen model unmasked. Warn-only hits don't count, and Block still answers 400. - If that model fails, the request fails. It is never masked and re-sent to the model the agent asked for, and never goes to a cloud model with the unmasked text. Falling back to a masked cloud request would answer a different question in the background. The user picked this route because masking breaks the answer. - Streaming works the same as on any route. - The route is checked again on every request. A model that is gone or no longer unmasked, or that the caller's gateway key may not use, means the request is masked as before. - Covered: agents' Messages, Chat, Responses and Gemini turns (serve, marked by serveAgent), count_tokens, Codex magpie-model turns, and Codex own-sign-in /responses (codexMaskRoute). - Not covered: magpie's own asks (ownAsk clears the mark), embeddings, audio, images and video. These stay masked. GUI: redactRouteRow lives in plugins/redact/settings.js and wraps renderRedact, so app.js is byte-for-byte unchanged and the core budget is not raised. Strings are added in zh, zh-TW, ja and de. Docs: gateway-routing.md, gui-shell.md, and site/public/docs masking (en, zh, ja). Tests: internal/gateway/mask_route_test.go (TestMaskedRequestGoesToTheModelSet: unset, set, streamed, nothing to mask, local fails, falls back to a vendor, no longer unmasked, count_tokens; TestCodexSigninTurnGoesToTheModelSet; TestMaskRouteTakesOnlyUnmaskedRoutes; TestMaskRouteOnlyForTheAgentsTurn); internal/gui/redact_route_test.go; settings_keep_test.go; internal/gui/tests/redact-route.test.cjs (every language, chromium and webkit, 1100 and 640 wide). Broken by hand, each red: - serveAgent without the agent mark; - MaskRoute taking any route (TestMaskedRequestGoesToTheModelSet, TestMaskRouteTakesOnlyUnmaskedRoutes; at the pushed head); - the codex hook removed; - count_tokens without the mark; - ownAsk not clearing it; - no key check; - no reroute in serve; - the GUI: no keep in the general save, no MaskRoute check on save, and the picker listing every model; - the plugin script left out of index.html (redact-route.test.cjs 22 of 24 red; at the pushed head). Run on mote: - at 221ede767's tree, this change on |
||
|
|
ec789445db |
gui: Settings' session rows are the sessions plugin's settings.js; app.js back under its budget
|
||
|
|
af8f3a9399 |
sessions: a new install reads no agent's session history until the user allows it (RustCats on X)
RustCats on X: a fresh magpie showed every agent's session history on
the Sessions page before anyone agreed to it, and asked for a per-agent
choice instead.
- sessions.Reads(agent) (internal/sessions/access.go) is the one gate,
from settings.SessionReads {Asked, All, Agents}. Every lister asks it,
the aggregators (allFiles, callFilesWith, callSourcesWith,
traceLineFiles, wslFiles, DesktopDataDirs) filter by it again, and
readers of an already-listed session (TranscriptOf, ContentOf,
SearchSession, SubagentTranscript, CarryOver, ReadCallSource) return
ErrNotRead, so a cache from before a switch was turned off goes no
further. The Sessions list, stats, /api/sessions/overview, the call and
trace indexes, Usage's agent-file calls and the Codex/Pi title readers
all pass it.
- SettleReads decides once and saves: an install with sessions.json or
a calls-v* cache read sessions before and keeps all on; a fresh one
reads none, not asked. A saved value is never replaced; save, sync and
restore keep it (KeepOwn); only SetSessionReads writes it. An
unwritable settings.json reads nothing this run.
- GUI: GET/POST /api/sessions/reads. While not asked, the Sessions page
shows a consent card: each agent found (by a stat of its folder only)
with a switch, Allow selected and Allow all. Settings > Privacy >
Agents' session history has "Agents found later" and a row per agent.
Strings in en, zh, zh-TW, ja, de.
- CLI: magpie sessions read [on|off all|<agent>...]; magpie sessions
says on stderr when nothing is allowed yet; the TUI's empty Sessions
page says how.
Read either way, because none of it lists or shows a session: the
gateway's own usage ledger, its projections and the conversations it
recorded (magpie's own records, so usage and cost keep working); the
agents' config and sign-in files; Claude Code's and Codex's
history.jsonl last-used time and a session file's mtime for a quota's
first use; Codex's newest rollout's last line before magpie restarts
Codex (codexTurnOpen).
Tests: TestFreshInstallReadsNoAgentUntilAllowed,
TestSettleReadsKeepsWhatWasThere, TestSessionReadsRoutes,
TestSessionsRead, TestSessionsNotAskedSaysHow, sessions-reads.test.cjs
(26 cases: consent and Settings in 5 languages, Chromium and WebKit,
390 to 900 wide).
Run on mote:
- full Go suite (gofmt -l, go vet ./..., GOOS=linux go vet -tags nogui,
GOOS=windows go vet, go build, go test -timeout 45m ./...) at this
change on
|
||
|
|
1801c96bfb |
warm-up: Warm up now sends one account its warm-up at once (Codex and Claude)
A Windows user on Discord asked for a manual warm-up of a Codex account.
Settings > Warm-up and check-in now ends both the ChatGPT and the Claude
tab with a "Warm up now" row. Its text button sends the account's warm-up
right away. With one account it sends straight off. With several it opens
the app menu ("Warm up which account"), not a select. The row then says
"Warmed up {who} {when}", or "Couldn't warm up {who}: {why}" in red, and
the status line says the same.
What is sent: provider.WarmNow(agent, user) sends the scheduled warm-up's
own request to that one account and to no other. For Codex that is
warmCodexLogin; for Claude it is warmClaudeLogin over the gateway's
warmClaude (Claude Code's run in that account's config directory), set
through WarmClaudeVia. It works whether the warm-ups are on or off. An
account whose sign-in lapsed is refused with the reason. Afterwards the
allowance is read again (StaleAllowance / claudeWarmedNow), as after a
scheduled warm-up. The schedule's file is left to the schedule. The
Codex prompt, identity and base_instructions are unchanged: it is the
same body. The route is POST /api/warm-now, and /api/settings carries
claudeUsers beside codexUsers.
Claude gets the item too. It shares the warm-up engine and the same tab,
and the send is the same warmClaude the schedule uses.
No size budget was raised.
Run:
- WSL (wsl-run), Chromium and WebKit, with the GUI test
warm-now.test.cjs in en/zh/zh-TW/ja/de at 900px and 440px: 22/22.
The pressed button stays in place within 1px after two frames.
- WSL, the related files (warm-now, warm-at-own, warm-at-times,
warm-reset-asleep, settings-groups, settings-search, i18n-keys):
102/102.
- WSL, the other files that touch these lists (checkin-account,
checkin-reason, checkin-reason-once, plugin-checkin, segs-press-redraw,
settings-sections, usage-checkin): 169/170. The red is segs-press-redraw
"webkit ja 440px: every Settings option..." with "could not bring the
option into view" after 103s under load. It passed 3/3 alone and is
filed as #4189.
- mote (macOS) at the final tree: go vet for internal/gui, provider and
gateway; go test -run 'WarmNow|Budget|Warm' ./internal/gui
./internal/provider: ok. An earlier mote run, before the route move,
ran go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go
vet ./..., go build ./... and the budget tests: ok.
- Windows (win-run): go test -run 'TestWarmNow|TestCodexWarm|TestClaudeWarm'
./internal/provider/ ./internal/gui/: ok.
- WSL: go vet -tags nogui ./... is ok and gofmt -l is empty.
go test -tags nogui -timeout 45m ./...: 75 packages ok, including
internal/gui and internal/provider. internal/agent has 4 reds on the WSL
box (TestInstalledVersion, TestGrokInstalled,
TestCursorFolderFromTheEditorIsNotTheCLI, TestOmpDetectedWithPiDir). They
are already filed as #4033 and #3548 (fake binaries hit WSL interop).
internal/gateway has 1 red, TestUnroutedRequestShownThenAnswered: giveUp
answers the 504 before it marks the route done. That is not this change,
and it is filed as #4200.
At the head rebased on origin/main
|
||
|
|
f463a8aaf7 |
gui: Settings has Loading bird, which keeps magpie's bird off skeletons and stops looking for them
Yayoi_no_yume on X, agreed by GymlinZhu: they run magpie on a 1-core,
1GB server and asked for a way to turn the loading bird off. The owner
wanted the bird, so it stays on by default. Settings -> General now has
"Loading bird" (Off / On), below Reduce motion.
- settings.json keeps noBird (omitted when the bird is on), and boot.js
passes it. A POST that leaves it out keeps it, as with the other prefs.
theme.js sets data-bird="off" on <html> before the first paint, and
applyPrefs changes it.
- skelBird (app.js): with the bird off, nothing looks for skeletons at
all. No 250ms interval and no observer run. Turning it off mid-hop ends
the hops, and the bird flies off.
- With the bird on, the look is driven by events. Before, the 250ms
setInterval ran forever, scanning the DOM for .skeleton whether or not
one existed. Now a MutationObserver watches for an added node that is or
holds a skeleton, the 250ms look runs only while one is in the page,
and the look stops itself once none are left.
- The README's bird (plugins.js bounceLoader): with the bird off, the four
lines stand straight with no bird, and the box goes when the README
comes.
- Strings are in en, zh, zh-TW, ja and de. App.js is 1,294,016 bytes, under
its budget, which is not raised.
Tests:
- skeleton-bird.test.cjs adds three tests:
- with no skeleton left, the look stops, and a skeleton added later
starts it again;
- with the setting saved off, no bird, no dip and no look ever starts
(setInterval is wrapped to count the look);
- the Settings row shows On by default; Off posts noBird:true, stops a
running look, and a skeleton added after that starts none; On posts
false and the look starts again.
- plugin-readme-bird.test.cjs: with the setting off, the lines stay
straight, no .sk-bird is drawn, and the box goes at once.
- settings-general: #birdSegs is in the list of bare rows.
- TestSettingsNoBird: off by default, kept by a POST that leaves it out,
cleared by false, in settings.json and boot.js.
Run at this head (rebased on
|
||
|
|
3959192e94 |
gui: Settings' web search rows move out of app.js to plugins/search/settings.js (#4133)
TestCoreScriptBudget was red on main: the context map's tile wording ( |
||
|
|
5637cca141 |
settings: a notification when masking swaps a value for the first time (Must2333 on X)
Must2333 on X: "我还希望能即时的知道发生了替换,但不是通过随时监控网关的方式".
They want to know when magpie masks something without watching the
gateway or the 脱敏 page.
Settings › Usage has a new row, "Masking alert" (zh 脱敏提醒), after the
task done alert. Off/On, off by default. When on, a value masked for the
first time gives a system notification through the same notifier as the
other alerts. It says only how many new values, each kind and its count,
and the agents that sent them (two named, "+N" for more). It never says
the value, any piece of it, or the Head hint the 脱敏 page keeps. A click
opens the 脱敏 page on the latest record (clickView, "masking&key=<key>").
Why off by default: every other notification in this group is off until
turned on; turning one on asks macOS for notification permission; for
most users a notice each time masking works is noise, since masking's
expected behaviour is quiet protection. It is one row, in the group that
already holds the alerts, hidden while masking is switched off
(data-feature="redact") and in gateway mode.
Staying quiet:
- First time only: maskrec.Fresh says which values a record has that no
record before it had. A conversation sends its whole history each turn,
so a value is masked again every turn after its first. The index is by
placeholder (HMAC-stable across restarts), filled from memory and from
the days kept on disk, so a restart doesn't make a history new again.
The days are read off the lock, since Hold takes it on the request's
way. Values sent as written (Action "warn") are left out.
- A burst is one notification: records gather for 3s (maskGather).
- At most one every minute (maskGap); what comes in between is said
together after it. At most 5000 records wait.
- With the setting off, nothing is kept.
The gateway tells the app through gateway.OnMasked, after maskrec.Hold,
with Snips and Back taken out; nil under `magpie serve`.
Strings: en, zh, zh-TW, ja, de, in i18n.js (the row) and in
mask_alert.go (the notification's title and kind names, the 脱敏 page's
own words for the kinds). docs/subsystems/gateway-routing.md has the
bullet. The core script budget isn't raised: main's 10-29 budget leaves
room for the row's 287 bytes.
Tests, each broken by hand and seen red:
- TestMaskAlertFirstTimeOnly: masks through redact.Mask as the gateway
does; the history masked again says nothing, a new email in turn 4 is
said alone. Red when flush counts r.Values instead of the fresh ones.
- TestMaskAlertNeverSaysTheValue: no 4-character piece of the key, email
or phone, and no Head, in any of the 5 languages. Red with the Head
added to the kind's name.
- TestMaskAlertCoalesces: a burst of 5 from 3 agents is one wait of
maskGather and one notification ("+1"); two more 10s later wait
maskGap-10s and are said as one; off keeps nothing. Red without the
waiting check (5 waits) and without the maskGap wait ("waits 3s want
50s").
- TestFreshOnlyTheFirstTime, TestFreshHeldWhileReading (maskrec). Red
with loadFirst skipping the disk read (the history new after a
restart), and with the index broken (both).
- TestDismissedAlertOpensNothing covers the mask notice's click.
- mask-alert.test.cjs: every language at 900 and 380px, both engines:
the row after the task done alert, Off at first, On saves maskAlert,
another save keeps it, Off saves false, no click moves the page, no
left border, gone with masking switched off. Red with maskAlert taken
out of prefsKeep, and with data-feature taken off the row.
Run:
- This change on main
|
||
|
|
a0ba8e1f2e |
grok: each model's context_window follows Long conversations, and one set by hand stays through a sync (uk.jent)
uk.jent (Discord #feedback) reported that magpie writes every Grok Build model's context_window as the model's whole window. They wanted about 300K without editing dozens of models, and they lost hand edits on each sync, because SetTOMLTables replaces the [model."magpie/..."] tables whole. Grok Build now uses Long conversations, the mechanism Codex and Claude Code already use. grokWindow gives: - min(window, Compact) when the model or provider has its own threshold; - otherwise settings.Working(window): 272K by default on longer windows, the typed size, or the whole window with Full context. What magpie wrote is stashed under grok:<path>:windows, and grokOwnWindow uses it to tell a hand edit apart: - A value that differs from what magpie last wrote is the user's, and it stays. - In a config written before the record, a value other than the model's whole window is the user's. - Disconnect forgets the record. The agent sheet's Long conversations row now shows for Grok Build (AGENT_PREFS). Its texts, the provider editor's hint, the Context tab's note and `magpie model compact` now name Grok Build, in en/zh/zh-TW/ja/de. setCompact and setAsync now share prefWrite. That dedupe keeps app.js under its budget, which is not raised. Behaviour change: a Grok Build model whose window is over 272K now gets 272K by default, as Codex does, unless Full context is on. Run on mote, at this head (c893c2229, rebased on |
||
|
|
06950fbbbb |
gui: Codex's two subagent settings say which is the default and which holds every subagent
HoGee_xxl on X read Codex's "subagent model" as the default for a
subagent the lead names none for, and found every subagent held to it.
The two read alike ("subagents" / "subagent model"), so each now says
what it is, in en, zh, zh-TW, ja and de. Wording and notes only:
- subagent model, unset: the lead picks each subagent's model, one it
names none for runs on the lead's model, a resumed subagent stays on
the model it started on, and a pick here holds every subagent even
when the lead names another.
- subagent model, set: every subagent on it even when the lead names
another; Same as the lead gives the pick back.
- subagents (Codex's default_subagent_model): the model a subagent
starts on when the lead names none; the lead may still name another.
- Codex's settings row "Codex subagent model" shows that line as a .sub
note under its name, as the rows beside it do, not only on hover (the
empty note is in index.html).
app.js stays under its budget with no raise (1,311,673 of 1,311,681):
the comments beside these strings were condensed.
Run (mote-run, Chromium and WebKit, every language):
- node --test codex-subagent-model, codex-subagents-lead, i18n-keys,
codex-memories, codex-memories-settings, codex-start-model-field,
context-tune, gateway-mode, subagent-effort, agent-tweak-fold,
claude-auto-mode, claude-subagent-effort-row, claude-subagents-pick,
desktop-subagent-model: 227 of 248 ok on the first run; 20 reds were
"browserType.launch: Timeout 180000ms" with mote at load 71 and 43
Chrome processes from other runs, one a desktop-subagent-model zh
420px routing wait. The five files with reds, rerun one at a time:
76 of 76 ok.
- After the budget trim: codex-subagent-model + codex-subagents-lead
40 of 40 ok (concurrency 1; at concurrency 2 under load 52 the first
chromium en case of each was red, #2645's class), i18n-keys ok.
- go test ./internal/gui: TestCoreScriptBudget ok. AppKit window tests
killed at their deadlines at load 71-105 (#2645) pass rerun, except
TestMainWindowCorners/macOS_26_SDK, red the same way on origin/main
|
||
|
|
9e33962c05 |
gui: Settings has Reduce motion, stilling magpie as the system's does (#3813)
CupOfBread asked for a switch that turns magpie's motion off to save
resources on the desktop, and linull24 saw the Routing page keep a
phone's browser busy. magpie already stills its animations under the
system's Reduce Motion: 46 @media (prefers-reduced-motion: reduce)
rules across app.css and the plugins' styles, and calm() in the
scripts. Settings -> General now has "Reduce motion" (Off / On) that
does the same without the system setting.
- settings.json keeps reduceMotion; boot.js passes it; a POST that
leaves it out keeps it, as the other prefs.
- theme.js's holdStill(on) sets data-motion="reduce" on <html> and sets
the media of every stylesheet rule written for reduced motion to
"all" (and back when turned off), so the same rules apply and no CSS
is written twice. layout.js calls it before the first paint when the
saved setting is on; applyPrefs calls it on a change.
- calm() is true when data-motion is reduce too, so the scripts'
motion (Routing's stage, Library, Usage) holds still with it.
- routing.css: the reduced-motion rule for the live dot was
.rt-livedot, which lost to .rt-livedot.on's animation; it is now
.rt-livedot.on, so the dot stands still with either setting.
Measured on mote (Chromium 390x844, 4x CPU throttle, live Routing
traffic, CDP Performance over 10s, two runs each): main-thread task time
0.18 and 0.22 s/s with it off, 0.090 and 0.085 s/s on; style recalc
0.021/0.025 off, 0.008/0.011 on.
Tests: reduce-motion.test.cjs (new, both engines): saved on, the
reduced-motion rules apply from the start (a probe's live dot has no
animation, calm() is true); Off restores them and posts false; On again
posts true. TestSettingsReduceMotion: off by default, kept by a POST
that leaves it out, cleared by false, in settings.json and boot.js.
The Settings row is in settings-general's list of rows.
Run on mote at this head (rebased on
|
||
|
|
7b63feb908 |
gui: a browser tab's font rows show on a nogui magpie, and Text size no longer flashes
Norcleeh (Discord #general, after v0.1.1788): in magpie's web GUI the interface-font and code-font rows "flash once and disappear" on refresh. Cause, reproduced on a real nogui `magpie web` on mote in Chromium and WebKit, at 127.0.0.1, localhost and the LAN address: a nogui build (Docker, magpie-cli) has fonts.Available false, so boot.js carried no `fonts` flag and app.js never showed the font rows at all. What flashed was the Text size row: index.html shows it, and renderSettings hid it for a browser tab 40-120ms later (`#textSizeRow.hidden = web`). Fix: - A browser tab always gets the font rows. Its /api/fonts answers the server's families plus a common list (Arial, Menlo, Consolas, PingFang SC, Microsoft YaHei, Noto Sans CJK SC, JetBrains Mono, ...) and never errors for a tab; fonts.js keeps only what this browser can draw, and "System default" is always offered, so with nothing kept the rows still show with it. - The app-only rows (Text size, tray, login, tray usage) carry .app-only, which `body.web .app-only` hides before first paint, so none of them paints in a tab. - The boot `fonts` flag is gone. app.js and core both got smaller; no budget changed. - docs/subsystems/gui-shell.md "Desktop fonts" says so. Run (mote-run, at this head rebased on |
||
|
|
cad7bbbdb7 |
redact: Insights › Masking shows how masking works, with Little Magpie, folded until opened
A card under "What the vendor didn't see" and above the request list plays a 27s demo: Little Magpie takes one request (a GitHub sign-in with a password and an email), tears the real values out into her notebook, pastes placeholders in, sends it, and swaps them back on your computer when the tool call comes home. - Folded by default. The video (xq_light/xq_dark.webm, 1.7MB/1.5MB) and the stage are built only on the first open, so a folded card fetches nothing but its 0:27 thumbnail. - It plays only while open, on screen, in a visible window and not covered by a single record's sheet; it plays once and rests on the last step. Under reduced motion it shows the last step, still. - The stage (request, notebook, browser, provider) is drawn in the page and translated in every language (41 keys, zh, zh-TW, ja, de); only Little Magpie herself is video. Light and dark takes match the card's colour exactly, and the take follows the theme as it changes, still playing (a new source starts paused, so it is woken where T is). - The request and provider boxes keep room for taller fonts: WebKitGTK's Noto ran the provider's note 16px past its box. The stage is 1000x420. - T, the frame clock, is the authority; a video that drifts (a seek it couldn't make) is sent back to T, never the other way. Run at this head (origin/main |
||
|
|
f828e900a9 |
gui: the sidebar's edge is out of Tab's reach, so no ring shows when the window opens
ysm119 (Discord, screenshot): every time the window was opened from the menu bar, a blue bar ran down the sidebar's edge. It is the edge's focus ring (.side-edge:focus-visible): a Mac window made key has WebKit focus the first stop Tab reaches, and with tabindex 0 that was the edge, as WebKit on the Mac skips buttons and links by default. tabindex -1 keeps it out of the Tab order, as a Mac split view's divider is; a pointer drags it as before, and focused (VoiceOver, a click) the arrow keys still move it. Run: go test ./internal/gui ok; GUI readable-focus, side-toggle, side-width (focus + ArrowRight), sidebar, sidebar-tab-top in chromium and webkit: 90 pass, 0 fail. index.html only, no core script grows. Not tried: the real Mac app opened from the menu bar; the cause is read from the screenshot and WebKit's key-view focus, not reproduced. |
||
|
|
e056779a67 |
gui: the app serves its page to a browser, behind its key (Settings › Browser access)
jiakun_zhao on X ran `magpie web` in a terminal beside the desktop app, to manage it through a Cloudflare tunnel. Settings › Network and sharing › Browser access now has the app serve the same page itself: Off, This computer (127.0.0.1, for a tunnel or SSH forward) or Local network. Access is magpie web's, unchanged: the key in the link is traded for the cookie (webGuard), the allow list holds, and the gateway's client routes on the page's port need a gateway key (onePort). A rebound Host and Origin: null get no cookie. There is no way to serve it without the key. The key and choice live in web-page.json (0600) beside settings.json, so a sync never carries them. GET/POST /api/web-page are the app windows' alone: a browser on the page can't read the key or turn the page off. A busy port (magpie web, the magpie before an update) is tried every 4s; `magpie web` on the same port opens the app's link instead. Run at d43b7c40d (this change on |
||
|
|
ad3833512e |
gui: Settings' gateway rows move out of app.js to plugins/gateway/settings.js
Settings › Network and sharing's gateway rows (renderPort, renderBareIds, renderCORS, renderAllow, renderLAN and their drafts) move as they are, byte for byte, into plugins/gateway/settings.js, loaded after app.js beside plugins/otel/page.js, as Observability's moved on 10-26. app.js had 416 bytes left under its budget; the next change (the app serving its page to a browser) adds a section to that tab. Both budgets are lowered to what is left: app.js 1,310,129, the core 1,526,251. Run at this tree ( |
||
|
|
9022169f6a |
web: magpie web added to a phone's home screen opens as an app (ninja_s6114 on Discord)
ninja_s6114 runs magpie in Docker and put the web UI on an iPhone's home screen; it opened with Safari's address and bookmarks bars. Now it opens standalone, with no setup: - index.html links manifest.json (display standalone, name magpie, start_url and scope "./", 180 and 512 px icons) and an apple-touch-icon, and sets apple-mobile-web-app-capable, mobile-web-app-capable, the title and status bar style "default". theme-color is set only under (display-mode: standalone), light #f4f4f6 and dark #1a1a1e, so a browser tab and the Wails windows look as before. - webGuard serves exactly /manifest.json, /icons/apple-touch-icon.png and /icons/icon-512.png on GET/HEAD without the key, since a home screen may fetch them without the page's cookie. Everything else still needs it. - The header's safe-area padding already in app.css (body.web .top) keeps it out from under the status bar and notch; app.css is unchanged. Run, at this head (rebased on origin/main): - go test ./internal/gui: ok, except TestRestartHandsTheGatewayOver, the handover EOF under load (#3451); it and TestWebAppAddsToHomeScreen pass 3 of 3 alone. - gofmt -l clean; go vet ./... on darwin, GOOS=linux -tags nogui, and GOOS=windows: ok; go build ok. - GUI web-app-standalone + i18n-keys: chromium 8/8, webkit 6/6 (the standalone cases are Chromium only, as WebKit can't emulate display-mode standalone; they run under --app with iPhone 13 safe-area insets 47/34 and touch, portrait and landscape, light and dark). - Before the rebase, 34 GUI files picked for strict fixtures/assert.fail on unexpected requests, plus menu-scroll, phone-web, mobile-web, web-page, old-webkit, usage-ledger and i18n-keys, in both engines: 563 of 576 pass. The reds fail the same on an origin/main copy and are filed: old-webkit Safari 15 (#3403), phone-web flick under load (#3180), gateway-key-models webkit under load (#2648), usage-ledger return-to-live (#3104). provider-detect-draft timed out under load and passes 20/20 alone. Broken by hand: - the guard exemption removed: the Go test fails with 401 on the manifest and the icon; - the old index.html: the Go test fails on the missing tags, and the GUI test fails in WebKit too; - theme-color media without display-mode: the GUI test fails in both engines; - app.css's body.web .top safe-area padding removed: the standalone test fails, ".top .brand under the status bar: 8". Not tried: a real iPhone or Android device and a real install; the whole GUI suite (the machine is loaded and nearly out of disk; run afterwards). iOS keeps the display mode it saw when the icon was added, so a user removes the old icon and adds it again. A home-screen app on iOS may not share Safari's cookie, so it can ask for the key once; MAGPIE_WEB_KEY keeps the key the same across restarts. iOS 27's top blur over the header is #3515, not changed here. |
||
|
|
ef0a03e137 |
otel: Langfuse is set up from its host and the project's two keys
A user on X asked for Langfuse built in. magpie could already export to Langfuse over OTLP, but Settings › Observability had the user type the endpoint .../api/public/otel and a percent-encoded Authorization=Basic%20<base64(pk:sk)> header by hand. Settings › Observability now has a Collector row: OTLP or Langfuse. With Langfuse, the user picks the host (Cloud EU, Cloud US, or Self-hosted with an address, which also covers Langfuse's JP and HIPAA regions) and fills in the public and secret keys. Once both keys are there, magpie saves: - the endpoint <host>/api/public/otel; - Authorization: Basic base64(pk:sk), in otel.headers as before, so the secret is stored where it was and a backup without keys leaves it out; - on a first setup, also x-langfuse-ingestion-version: 4, metrics off and export on. langfuse.com/docs/opentelemetry/get-started (read 10-26) gives the same header for every region and for self-hosted, and says that without it OTLP data can arrive up to 10 minutes late. A Langfuse endpoint set up by hand opens in this view with its keys decoded into the fields. Opening it saves nothing. Changing a key or the host keeps the user's other headers, their metrics and export choices, and an ingestion header they set or left out. Switching from another collector leaves that collector's headers behind and does not send them to Langfuse. The Observability page moved from app.js into the otel plugin (assets/plugins/otel/page.js, with i18n.js for its words, in Client), because app.js had 13 bytes of budget left. The app.js and core budgets are lowered to what is left (1,321,319 and 1,537,645; app.js is 1,321,313 after rebasing on |
||
|
|
1cdc3a59fe |
gui: Codex has one subagent model, Same as the lead or one model for every subagent
The owner, looking at Codex's New sessions line: two squares, subagents
and subagent model, read alike and nobody could tell them apart ("这两个
用户压根分辨不出来区别"). One was Codex's own [agents]
default_subagent_model, a model a subagent starts on only when its lead
names none; the other magpie's, which puts every subagent on one model
whatever the lead asks for. They are one setting now:
- Codex's card shows the subagent model alone. Unset it says "Same as
the lead" (跟主代理一样): each subagent runs on the lead's model, or on
another the lead picks for it. A model picked: every subagent runs on
it, whatever the lead asks for. Its picker opens on Same as the lead,
the lead's model in the note. With no model of magpie's to pick there,
Codex's own square stays as it was.
- Codex's sheet has the same setting as a row with a name, Codex
subagent model, beside Codex subagents on any model, as the memories
model got one when its square wasn't found (Hu9956).
- A model Codex's config still has in [agents] default_subagent_model
is said on the square, which is lit: "Codex's config still starts
subagents on {model} when the lead names none; picking here replaces
it."
For users who set default_subagent_model themselves: a pick in the
subagent model, Same as the lead too, removes it from Codex's config
(and a subagent effort the subagents' model no longer has), so the one
setting shown is the one that holds. Until they pick, it stays and is
said on the square. The CLI and profiles keep the subagents field.
Claude Code's, omp's and Claude Desktop's subagent squares are unchanged.
Every new string has zh, zh-TW, ja and de. app.js grows 4,011 bytes,
the Agents page's, which the tray panel draws too: the core budget is
raised to it, with no room added, and says why.
|
||
|
|
e698a688fd |
gui: Insights › Masking shows each request as sent, what was masked and how
What masking did moves out of Settings › Privacy into a page of its own under Insights (plugins/redact: client.js, page.js, redact.css, i18n.js). Privacy keeps how it is found and what to mask, with a "What was masked" row that opens the page. - The top card is Privacy's card, made shorter: the flow animation (agents → this computer → providers) with magpie's bird on the centre line and "magpie masks it on this computer" under it, so a screenshot says who masked it; the count and a 7-day bar. Nothing the list repeats. - The list: one row per masked request, narrowed by kind, by who found it (rules or the local model), by agent or provider, or to held-back requests; or by value, each with how often it was put back. - A request: the message as it went to the vendor beside the original, each mask marked, unchanged parts folded; picking a value lights every place it was masked; a held-back request offers "Mask it instead". - Gateway's masked badge and ?view=masking&key=N (trace.go's mainView) open one request. - Classes are msk-: library.css owns mk- (a first cut stacked the flow). - Budgets lowered to the core's size after the move. - Not shown: rule names and the local model's confidence; the records don't keep them. Run on |
||
|
|
628e18987b |
gui: Settings › Privacy puts the local model first, marked New
The owner asked for "Find with a local model" to come earlier on Settings › Privacy, where people see it at once, with a light mark. "How it's found" (#findList) moves from below the try box to right under the masking card, before "What to mask", and its first row is the local model, then Rules. The model's name carries a small accent "New" badge (.badge.new: accent-soft background, accent text; en New, zh/zh-TW 新, ja 新着, de Neu). app.js stays inside its budget with no raise (1,343,322 of 1,343,324): comments were trimmed to fit. Tests: privacy-model checks the badge in every language, that the model's row is the page's first settings row, and that #findList comes before #redactList. redact-rule-row and redact-words-any-case wheel their row into view first (wheelTo, reach): with the section above them, at 640px their row sat under the bar along the page's foot, and the second control under the sticky tabs in WebKit. Run at 35c648593 (on |
||
|
|
9d6436311a |
gui: Warm up on reset says a window that resets during sleep starts on waking
LEO_CHEN_X on X (https://x.com/LEO_CHEN_X/status/2113864310367961569): on opening the lid, Codex's 5-hour window always shows 4h59m left, and they took it to mean the auto-start is broken. The code does what it should. keepWarm (internal/provider/codex_warmup.go) checks every minute on a Go timer. On macOS that timer runs on mach_absolute_time, which stops during sleep, so it fires within a minute of waking. The 5-minute look goes by the wall clock, so the look is due at once. warmNow then finds the window past its reset (asOf, even on a read cached before sleep) and idle, and sends the one request. A window still running at wake is not idle and gets nothing (checked in a scratch test: an account warmed at 20:00 and woken at 22:00 sent nothing, and one woken at 04:00 sent one). Nothing can send during sleep, and magpie doesn't schedule a wake. Starting at wake is the earliest start there is, no later than the user's own first request would make it. What was wrong is that the row never said so. Daily warm-up's title explains what a sleeping computer does with its time, and Warm up on reset said nothing. Codex's and Claude Code's Warm up on reset lines now carry a title (index.html data-tt, translated with the page) saying nothing is sent while the computer sleeps, and that a window which resets then starts on waking and counts from then. Translated into zh, zh-TW, ja and de. The title is static, so app.js doesn't change and TestCoreScriptBudget keeps its budget (an app.js version came in 754 bytes over). Run at this tree: - gofmt -l internal/: nothing. go vet, GOOS=linux go vet -tags nogui, GOOS=windows go vet on ./internal/gui ./internal/provider: ok. go build, GOOS=linux go build -tags nogui, GOOS=windows go build: ok. - go test -tags nogui -timeout 45m -count=1 ./internal/gui: ok (92s). - New internal/gui/tests/warm-reset-asleep.test.cjs: 10 of 10 in Chromium and WebKit, en zh zh-TW ja de. With the old index.html it fails 10 of 10. - Both engines, 13 files: gui-de, gui-ja, gui-zh-tw, header-relang, i18n-keys, settings-general, settings-groups, settings-search, settings-sections, settings-tabs-stick, warm-at-own, warm-at-times and warm-reset-asleep, 162 of 162 pass. Not run: the full GUI suite, since app.js is unchanged and no selector, API or layout changed. Also not run: go test ./... and a real sleep and wake of a Mac with a real account (the wake path was read in the code and checked with the scratch test above). |
||
|
|
b00c82acfa |
masking: each kind is masked, sent with a warning or held back; a Never mask list and Try it (#1977)
Settings › Privacy gets two sections under What to mask:
- When a value is found: Mask, Warn or Block per kind (redactActions;
a kind left out is masked). Warn sends the value as written and records
it with a placeholder nobody remembers, not counted as masked. Block
masks it as before and the gateway answers 400 naming the kind and the
value's hint, never the value, with nothing sent (maskBlocked); the
record is kept as Blocked. The secret kinds come first, the personal
ones behind Show all kinds. A Never mask list (redactAllow) lets a whole
value go as written in any case; a longer value it is part of is masked.
- Try it: POST /api/masking/preview masks a text as a request would
(redact.Preview) and remembers nothing: no placeholder stands for it
afterwards and its values aren't masked later as seen before. The page
shows the vendor's text, what was found and what would be done, and
keeps the text in no storage.
The masking card counts requests held back and values sent as written; a
call whose values only went as written gets an amber badge on Recent calls
and the Routing log. zh, zh-TW, ja and de throughout. Docs: gateway-routing
and gui-shell.
Broken by hand: the new GUI badge assertion fails on the old maskedBadge
(no .warn badge drawn); TestSettingsSaveKeepsWhatItDoesNotSend went red
until the two settings were in its fixture; "{n} held back" turned
i18n-keys red against the routing plugin's "{n} held" and was renamed.
Run at this tree (base origin/main
|
||
|
|
f21dd99f5a |
privacy: every masking is recorded, and Settings › Privacy shows it
What was masked is now kept, so the user can see it. Settings › Privacy opens on a summary card: how many values were kept from vendors over 1, 7 or 30 days, by kind, by finder (rules, your words, the local model, known values) and by where they went, with a day strip. The page is grouped into What to mask, How it's found (rules and the local model are layers, not a toggle: the model adds names and addresses rules can't see) and Sharing. A records view lists each masked request: its kinds, finders, placeholders and, while magpie runs, the line around each value. Gateway › Recent calls and the Routing log carry a masked-N badge that opens the record. Originals never go to disk. internal/maskrec writes day files under ~/.config/magpie/masking (0600, 30 days, 100MB at most) holding kinds, finders, placeholders, a first character or key prefix and a length. The lines around values are kept in memory for the last 400 records only, and /api/masking/value answers only while the masker remembers a placeholder. Nothing is written under MAGPIE_TEST_SANDBOX. A masker says what it masked through gwmw.Teller (JSONHits, TextHits, Value); a plugin masker that doesn't is counted only, so older redact plugins keep working. Every route that masks notes it: chat, Responses, Codex backend and search, embeddings, images, video, transcription, decide and the search MCP query. Masking still fails closed: a masker that panics on any path refuses the request (TestMaskingOnAndOff's fake now panics on JSONHits and TextHits too, since the gateway asks a Teller through those). app.js grows to 1,314,432 bytes, so its budget rises to 1,335,000 and the core's to 1,528,800 (+1.5%): Settings is the core's own page. Run at this head (rebased on origin/main |
||
|
|
f1e4516da2 |
gui: Codex's and Claude Code's own settings are in the agent's row on the Agents page, not in Settings
The owner, 10-20: Settings › General held Codex subagents, Long
conversations, Codex background compaction, thread titles, thread
descriptions, composer predictions, the auto-review model and the
memories model, apart from the agents they set; "很割裂、很分散,不直观".
They now sit with their agent (AGENT_PREFS): in its opened row on the
Agents page (a Settings list in connectPanel), in a sheet from the
tray panel's row ("Settings" line, openAgentPrefs) and from the agent's
menu ("{agent} settings"). Each row is the one element moved between
those places, so its handlers and state go with it. Settings' search
still finds them, with a row that opens the agent's sheet
(#agentPrefLinks). A gateway has no Agents page and none of them.
Strings for zh, zh-TW, ja and de; docs (reference, agent-wiring,
gui-shell) point at the new place. app.js 1,277,298 bytes and the core
scripts 1,469,058, so both budgets rise.
Run on 6416d639c (the dialog morph, on origin/main
|
||
|
|
b9f790d37b |
plugins: panels in magpie's pages, a page that replaces a built-in one, titles in the window's language, and a look that matches
P5 of the plugin runtime (docs/subsystems/plugin-runtime.md):
- Panels (magpie.panels): a plugin draws a frame into a slot of a
built-in page (a provider's editor, Settings, Usage); magpie.context
says where it is, and the frame is as tall as what it draws.
- A page can replace a built-in one (magpie.page.replaces); show() opens
it in that page's place, and the sidebar row goes to it.
- page.titles and a panel's titles name it in the window's language
({"zh": …}); a malformed map is dropped, the title kept
(TestWindowTitles).
- main's #2501 already names wails:// in the policy of a page in the
desktop window (through ownWindow), which is why the usage page drew as
bare HTML from v0.1.1259. TestPluginPageLoadsItsFilesInTheWindow loads
a page through ownWindow in a real WKWebView, which Playwright on http
can't; the subsystem page says how.
- The bridge adds magpie's look for what a page leaves unstyled, every
rule in :where() so any rule of the page's wins, and the theme's
colours as --magpie-* variables.
One commit: the panels, the replacing pages and the titles share hunks
in page.go, pluginpage.go, pluginpages.js and the docs, and couldn't be
split cleanly.
Run:
- Full: this series (P5, the Plugins dot, the probe test, P6, and a
built-ins-on commit since dropped for main's own
|
||
|
|
1978eabe58 |
agent: Codex's background compaction is turned on from Settings › Long conversations (#2490, #2493)
Codex 0.163 can compact a long conversation in the background while a
turn goes on ([features.async_compaction]). A new row under Long
conversations turns it on, with the share of the window it starts at
(empty: Codex's own 65%). magpie writes it into each Codex config it
routes (codex_async.go):
- [features.async_compaction] enabled = true and
model_async_compact_threshold_percent. Codex reads the threshold only
in that table; one at the top level is ignored (tried).
- capabilities = { remote_compaction = "v2" } on [model_providers.magpie].
Codex starts a background compaction only on a provider with v2, which
it gives OpenAI and Azure alone. Tried with Codex 0.163 against a
sandbox gateway and a fake upstream reporting 70% use: without the
capability, no compaction in a whole turn; with it, compaction_trigger
requests ran beside the turn's steps and the next step's input held
the summary. The capability is written for a feature the user turned
on by hand too (#2493 asked whether magpie supports it: it didn't).
putProvider carries the table's capabilities over when a model switch
writes it again.
- What magpie wrote is in the stash (codex.async). A value the user set,
or changed since, is never written over and stays when the switch is
turned off; a bare async_compaction = true, an inline or a dotted
table is the user's as written. A config that doesn't parse is not
written to.
Not tried: Codex signed in with ChatGPT (openai_base_url to magpie on
the built-in provider, v2 by default), only the custom provider path.
Tests: TestCodexAsyncCompactionWritten, ...KeepsTheUsers and
...KeepsUsersCapability (internal/agent), each red with the matching
part removed by hand (no writing; no capability carry-over; no
ownership check on enabled). codex-async-compact.test.cjs: Chromium and
WebKit, en/zh/zh-TW/ja/de, red with the 1-100 check removed;
compact-at, i18n-keys, settings-general, settings-search pass.
TestSettingsSaveKeepsWhatItDoesNotSend holds the two new fields.
gofmt clean; go vet -tags nogui on darwin, linux, windows.
Full suite: go test -tags nogui -timeout 45m ./... (pipefail, suite-lock) at the four #2494/#2504/#2505/#2490 commits on origin/main
|