2ff85f8a2bc33f87aa1fdfefce580433afff76e3
2271
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2ff85f8a2b |
gui: a page's bar room comes out of its right padding, so both sides match
v0.1.1904 had every page keep its scrollbar's room, so nothing moves
when a page grows past the window. The owner asked whether the clear
bar now makes the sides uneven: it did, by the bar's width (8px on the
Mac, 10px on Windows and Linux), and the centred pages sat 4px to the
left.
layout.js measures the bar of a .view into --bar (again on resize, so
a text-size zoom is followed), and app.css takes it from each page's
right padding: the panel's 12px, the window's 16px, the centred pages'
max(16px, 50% - 600px) and the phone web's safe-area right. The heads
and strips that reach over the padding (Library's and Settings' sticky
heads, Providers' after-list fade, the masking record's bar) reach that
much less on the right, or they would run the page sideways. A plugin's
page, whose frame scrolls itself, shows a bar only when it needs one.
layout.js's measuring adds 254 bytes to the core's scripts; the budget is
raised by exactly that, with no room added.
page-width-steady.test.cjs now checks every page's left gap against its
right gap with the bar (chromium and webkit, the Mac's 8px bar and the
10px one, 1100 and 1600 wide) and that no page scrolls sideways; that
check found Providers' after-list fade running 4px past the page. With
v0.1.1904's CSS it is red ("agents: 16px on the left, 24px on the
right (bar 8px)", 26px with the 10px bar, 94/102 centred). page-width's
"centred" check compared paddings only, and now counts the bar too.
Run on mote at this head (f70cb6825's tree, on origin/main
|
||
|
|
e8e9245ecf |
agents: Install another agent says Plugins has more agents, and opens them
The owner, on the Agents page: 因为我们支持Agent插件了,这里是不是也应该 显示插件中有更多? Install another agent listed only the agents magpie has an install command for; the agents a plugin adds were nowhere on that page. - GET /api/plugins/agents names the suggested agent plugins (the market's kind "agent") not installed here. One installed but turned off, or pinned to a version, counts as installed: Plugins turns it on. - Install another agent counts them in its header and ends with one row, "More in Plugins" with their names, as the Providers add sheet does for subscriptions. The row opens Plugins › Discover scrolled to its Agents, only while the click is fresh (scrollOnPurpose), on the section drawn last, since npm's answers draw it again. - The list is fetched beside the install commands, not before them, so a slow market never holds the commands back. With no install command left, the section shows the plugins' row alone and no install note. - Budgets: app.js 1,311,681 and the core 1,530,449 (+1,430 / +2,408 over main), the Agents page and Plugins page are the core's own, no room added. Run at this tree, rebased on |
||
|
|
e2efbd3571 |
gui: a plugin page's host start reads its starter before it goes off on its own
pageHost starts the plugin host in a goroutine that can outlive the
page's wait, and that goroutine read the package's warmHost when it
ran. TestPluginPageStartsItsHost puts warmHost back in its cleanup,
so under -race the late read raced the write (seen in a whole race
run of internal/gui on mote). pageHost now reads it before the
goroutine starts.
Run on mote, at this tree (on origin/main
|
||
|
|
97b6a36c5b |
gui: the sidebar's gateway names the LAN address while it is shared
coeo91 on Discord: with "Share on local network" on, the sidebar's line still said "Gateway 127.0.0.1:3425". Shared, it now names where other machines reach it: MAGPIE_PUBLIC_URL if set, else the address picked in Settings (magpie.lanAddress), else the first LAN address. Its tooltip names that and this computer's url. Not shared, it is unchanged. - api.go: boot.js's sideGateway carries lan and lanURLs when shared, so the first paint is right. - plugins/gateway/settings.js: sideLAN() picks the address and redraws the boot line once loaded (it loads after app.js); turning sharing on/off re-reads /api/providers and redraws, and picking an address redraws. The choice lives in the plugin so app.js and the core script budget stay under their limits (TestCoreScriptBudget passes); no budget raised, no new strings. - app.js renderSideGw: uses self.sideLAN?.(g), tooltip adds " · " + url. Run at this commit's tree, rebased on |
||
|
|
581d64b7d0 |
gateway: sharing lists this network's addresses first, and names one on the internet
The user whose network card holds a static public address (203.236.50.70, |
||
|
|
a8c71f1987 |
library: an opaque logo has no white corners
The user's MCP servers page drew Linear's, Context7's and GitHub's logos (GitHub avatars, opaque) with a white fringe at each of the four corners. The tile (.mk-icon) had a white background under the picture, and its rounded clip's soft edge let that white through. The white now sits on a plate 1px inside the tile (::before, border-radius inherit), which the clip never reaches, so an opaque logo meets the row's own background at its corners. A logo with see-through parts (an .svg) still sits on white, an initial keeps its grey (no plate), and the skeleton looks as before. The same tile is the library rows' 26px/24px logo, the market cards' 36px and the market sheet's 44px. Tried first in a page of the three real avatars at 2x in WebKit and Chromium: background:none removed the fringe, clip-path inset(round) beside or instead of overflow:hidden did not. New: internal/gui/tests/market-icon-corners.test.cjs, dark theme, 2x, every language, both engines. It reads the tile's own pixels: no corner of an opaque black logo is brighter than the card plus 30, an svg tile is white along its edges, and an initial's tile is not white. Run (mote, at this commit's tree on origin/main |
||
|
|
ca499953e7 |
gui: a plugin page with a host part starts the host when it opens
guesssssssswhat on X: the Magiczerowxy/magpie-chat page ("对话") sits
on its loading text and never opens. The page says hello and then
navigates its frame to http://127.0.0.1:3477, a server the plugin's
index.mjs starts inside the Bun host. The host was started only by a
call: at launch while providers are first read, and after a Restart
(a plugin installed, updated or set, a Bun update) or a crash only once
something asked a plugin again. With the host down, WebKit (the macOS
window's WKWebView, WebKitGTK) leaves a frame whose navigation is
refused on its old document with no error, and the hello had already
cleared the 10s broken timer, so the page waits forever. Chromium shows
chrome-error instead.
Now serving the entry HTML of a page or panel whose plugin is not
page-only starts the host if none is up (plugin.Warm), waiting at most
7s, then serves the page. Page-only plugins, and the page's other files
and the bridge, don't touch the host.
Reproduced on mote (sandbox HOME, magpie web on a free port, plugin
0.1.16 from GitHub): with its 3477 listener killed, old main's page
stays on "正在连接到本地对话服务…" in Playwright WebKit (chrome-error
in Chromium); the fixed build restarts the host on open and the chat UI
loads in both engines. In the real macOS app (wails://) the frame
reaches 127.0.0.1 (seen by a logging server). TestPluginPageStartsItsHost
is red with the pageHost call removed by hand.
Run at this head (
|
||
|
|
b586fdf1eb |
gui: every page keeps its scrollbar's room, so nothing opening in it narrows the page
The owner, on Agents: opening an agent's details ran the page past the window, the scrollbar appeared, and the whole page went 8px narrower in one frame (and back when it closed). Every page had this; only Usage and Routing kept the bar's room ( |
||
|
|
012c584cc1 |
usage: clear a model's usage, or all of it, from the Usage page
CrazyMouse_TT on X asked for a way to clear usage, all of it or one model's, to measure a local model fresh after deploying it. The Usage page's Models list has a "…" on each row (and a right-click menu) with "Clear usage…", and "Clear all usage…" sits under the lists below the "Counted from…" note. Each asks first, in a confirmation that says what is deleted, that it can't be undone, and that key spending limits and allowances still count the calls. A clear is a mark in settings (usageCleared: provider, model, unix ms), read at read time; usage.jsonl is never rewritten. The Overview hides calls up to the mark in summarizeFrom; the Requests page, heatmap and ledger/CSV hide them in Filter.keepsRow, their one choke point, and the request index's meta carries the marks so its cache is dropped. Key budgets, window holds and Codex reads go through usage.Visit and the raw log, so a clear never resets a key's spending limit or a quota. A later clear of the same model or of everything takes the place of an earlier one. The marks ride the settings part of a sync (sync-backup.md) and a save of the Settings page keeps them (api.go's keep list; the guard test TestSettingsSaveKeepsWhatItDoesNotSend caught it missing). gateway-sessions.md and sync-backup.md say so. Run on mote (mote-run) at this tree, rebased on origin/main |
||
|
|
f835bd713d |
gui: the Gateway page is one compact card, shares on the network from itself, and a key's copy sits by the key
The owner on the Gateway page: "一点都不精致、优雅", the key row's copy button "很奇怪的位置,太突兀了", the gateway icon ugly, Connect should start folded, and "Share on local network" should be picked on this page with the LAN addresses shown. Agreed on a canvas first. - The status row has the sidebar's server glyph in a 28px tile with two lights (green running, amber not), the state beside it and the fix button at the right. The address pill left the row. - Under it, in the same card: Share on local network as This computer / Local network segments (settings/lan, as Settings does), and every address the gateway answers on, each with its own copy: this computer (or the public address on the web), then the LAN addresses, or a line saying there are none. Settings' container note comes from the same lanShown(). The "open LAN settings" button is gone. - A key's row: its copy right after the masked key; Rotate key and Remove moved into a "…" (Key actions) row menu at the end. - Connect starts folded; opening it is remembered (magpie.gwConnectFolded). - At narrow widths the status row wraps and the address list is a label/value grid, so no language overflows at 420px. Tests: new gateway-card (5 languages x 1100/420 x chromium/webkit): the lights, Connect folded, sharing from the card with every address and a copy of a LAN one, no scroll, the copy within 6px of the key, the … last with its menu, nothing overflowing, no left borders. Tests that used Connect open now open it; Rotate/Remove go through the menu (fixtures' keyAction). Run on mote, at the tree before the last rebase ( |
||
|
|
27bf14790f |
gui: the page's links for other computers are at the gateway's addresses
A user's computer has a static public address from its ISP on the network card itself (203.236.50.70) as well as a private one (10.77.70.2). Settings › Network & sharing listed 203.236.50.70 as the gateway's address but only 10.77.70.2 under "Open magpie in a browser", and they asked why the two differ. The gateway's list (gateway.LANURLs) took every IPv4 address on an interface that is up; the page's (gui.LANAddrs) took private ones only, through net.InterfaceAddrs, down interfaces included. The page server in LAN mode listens on 0.0.0.0, so the public address serves it too. Now one list makes both: gateway.LANHosts, every interface that is up, IPv4, not loopback or link-local, in the interfaces' order. gui.LANAddrs (and so NetworkLinks, the CLI's `magpie web` and daemon links) returns it, MAGPIE_PUBLIC_URL's host still first when set. The page's links now also show a CGNAT/Tailscale 100.64.x address, as the gateway's already did. Run, on mote: go vet ./internal/gateway ./internal/gui ./internal/cli; GOOS=windows go vet ./internal/gateway ./internal/gui; GOOS=linux go vet ./internal/gateway; go test -run "LAN|Lan|URL|TLS|Public|Network|Share|Allow|Container" ./internal/gateway ok; go test ./internal/gui ./internal/cli: cli ok, gui ok but for TestMainWindowCorners/macOS_26_SDK, #3949 (macOS 27, not about addresses). On xiaomi-gpu (Windows): the gateway's LANHosts, PublicURL and TLS address tests ok. New: TestLANHostsKeepAPublicAddress (a stubbed public, private, CGNAT, link-local, loopback and IPv6 address) and TestNetworkLinksAtTheGatewaysHosts. Broken by hand: LANHosts keeping private addresses only, as the page's list did, turns TestLANHostsKeepAPublicAddress red (got [10.77.70.2]). Not run: GOOS=linux vet of internal/gui (needs cgo; the WSL box lacks gtk4 and webkitgtk-6.0 headers); not tried on the reporter's machine. |
||
|
|
053d0d37f8 |
library: Install RTK uses brew only when Homebrew has rtk's bottle, and keeps why it failed on the card (Scott__D on X)
Scott__D on X: "Magpie 里的这个 RTK 安装一直都不成功". The RTK card sat on
"Installing RTK… this can take a minute." over `brew install rtk`.
Cause: Homebrew bottles rtk only for Apple silicon on the newest macOS
(arm64_sequoia, arm64_tahoe, arm64_golden_gate, and Linux). On an Intel Mac
or macOS 14 and older, `brew install rtk` builds rtk from source, and first
the 19 formulae it builds with, rust, llvm and python among them: hours.
InstallRTK gives the installer five minutes, so each try was ended, said so
in a status line gone after ten seconds, and the next try started over.
Reproduced on mote with a sandbox Homebrew (HOME and prefix of its own)
and HOMEBREW_FAKE_MACOS=14.7: brew info rtk says "stable 1.1.0, HEAD" with
no "(bottled)", brew install rtk lists 19 dependencies to build, and
magpie's InstallRTK spent 3m43s in it before failing.
Fix:
- rtkInstaller asks `brew info rtk` and uses brew only when it says
"(bottled)", brew's own word for pouring the bottle here. Otherwise, and
when brew fails or doesn't answer in 30s, it is rtk's own script
(install.sh from rtk-ai/rtk's README, which downloads rtk's release for
darwin x86_64/aarch64 and Linux). The answer is kept an hour per brew,
since ReadRTK asks on every read while rtk isn't installed.
- A failed brew says Homebrew's first Error: line and what it says to do,
not the support-tier notice its output ends with.
- The card keeps "The install failed: {why}" beside Get RTK until the
next try (as the upgrade's error already did), in every language.
- The five-minute bound on the installer was already there and stays.
Run on mote (macOS 27.2, arm64):
- real InstallRTK, sandbox HOME, sandbox Homebrew, HOMEBREW_FAKE_MACOS=14.7:
chose rtk's script, installed rtk 1.1.0 into the sandbox ~/.local/bin in
12.2s (`rtk --version`: rtk 1.1.0); the card then offers Put RTK on PATH.
- real InstallRTK, same sandbox, macOS 27 as it is: chose brew (bottled),
installed rtk 1.1.0 in 10.7s.
- go test ./internal/library (TestRTK*): ok. New tests:
TestRTKInstallsWithBrewOnlyFromItsBottle (brew info output read from the
real brew, bottled and not), TestRTKBrewInfoThatHangs,
TestRTKBrewInstallSaysBrewsError (brew's real output on mote).
- GUI: library-rtk-install.test.cjs, 5 languages x 1100/420, Chromium and
WebKit: 22/22. All library-*, gui-de/ja/zh-tw and i18n-keys files: 770 of
771; the one red is i18n-keys "a plugin's words are its own" on
plugins/routing "masking…", red on origin/main too (#4053).
- gofmt -l: nothing. go vet ./internal/library ./internal/gui;
GOOS=linux and GOOS=windows go vet ./internal/library: ok.
- Full suite on mote, go test -tags nogui -count=1 -timeout 45m ./...
at base
|
||
|
|
df9376592d |
routing: a group's member may offer several reasoning levels for the agent to pick among
Garydesu on X: "能不能让路由组里的模型设置多个可选推理强度,现在只能选一个或者整个 路由组的". A member was one fixed `:effort` or followed the group's levels. A member's suffix may now join several levels with "+", `provider/model:low+xhigh`, kept lowest first, each once. provider.MemberLevels splits it into Member.Levels and leaves Effort empty, so the member isn't fixed; one level is a fixed effort as before. The whole stays the member's id, so rules, fast, off, weights, share and the CLI key it as any member. The gateway fits the agent's ask to the member's own levels (groupLevels returns the candidate's levels first; ofMember, the quiet check and the trace see them), and the group lists them to agents (buildGroupEntries), intersected with the other members' as usual. In the Routing page's group editor the member's reasoning menu has "Several levels…", a menu that stays open with each level ticked or not; a fixed level picked from the first menu replaces the old one as before. i18n in zh, zh-TW, ja, de; CLI help and docs/subsystems/gateway-routing.md say it. Run on mote (mote-run). Rebased on |
||
|
|
e1721d6404 |
routing: a weighted group's editor sorts its members by weight once (Norcleeh)
Norcleeh (Discord #general) asked for a way to order a By weight group's members by weight. The order matters there: it is the fallback's when a model fails. Now the group editor has a "Sort by weight" text button beside Add another model. It shows while the group routes By weight and the order would change. A press puts the named members heaviest first (no weight counts as 1, equal weights keep their order, one switched off is sorted too; a pattern's members stay after them) and draw()s. The button then goes. It is a one-off reorder of the draft, saved with the group's Save; no mode is stored. Its title says the order is the fallback's. Strings in zh, zh-TW, ja and de. The routing plugin's client.js isn't a core script; no budget changed. Run (mote-run, at this head on |
||
|
|
76218200af |
gui: a demo's made-up account is never blurred by Hide accounts (data-no-pii)
outloudvi on Discord (#feedback, 1564923315095732276): with Hide accounts on, the masking demo's letter on Insights › Masking had its account (yetone@example.com) blurred and its password (hunter2-prod) not. The blur is hideAccounts, which masks every address in the window's body. It isn't the demo's own masking. The demo's values are made up, and showing them is the point of it. An element marked data-no-pii, and everything inside it, is now skipped by the text walker and the tooltip pass. The demo's section carries the marker. The class: any illustration with made-up accounts takes the same attribute. A search of the GUI assets found no other drawn one. The only other fake address is ops@company.com, in input placeholders, which the blur never touches. Text added later in a marked element stays unmasked too: the observer's mask(e) passes through the same checks. New test masking-demo-unblurred: Hide accounts on, an address elsewhere on the page still masked, the demo played (reduced motion on and off), its account and password slots both readable, and no .pii in #maskDemo. A generic [data-no-pii] element with a title and text changed after masking stays unmasked. It runs en and zh, in both engines. Run on mote: - masking-demo-unblurred and masking-demo at this tree: green. - go test -tags nogui -run Budget ./internal/gui: ok (no budget raised). - The 124-file GUI run in the commit before, at this tree: none of its reds in masking files (masking-records zh-TW was green when rerun). Broken by hand: - Marker removed from client.js: red, account slot "ilottn@aamital.cmd" in webkit (the reporter's blur). - Walker and title checks removed from app.js: red. Not tried: Linux and Windows. |
||
|
|
a6f6e86e80 |
gui: an account's eye shows that provider's account, and a Kiro account's eye works
outloudvi on Discord (#feedback, 1564924864052207627): on Usage's overview
with Hide accounts on, Kiro's eye did nothing, and one username on two
platforms was shown or hidden by either card's eye.
- Kiro: the plugin names an account "email (Google)" (nameOf in
packages/kiro). The finder tried the address pattern first, so only the
address was hidden. The eye kept the whole name, which never matched
what was hidden. A name with an address in it is now found whole,
before the address pattern.
- One name on two providers: shown was keyed by the account alone, and
kin() gathered names from every provider. Each entry is now keyed
"provider\naccount". eye(u, p) takes the provider id at every call: the
provider editor, the account button, the panel's quota card and Usage's
quotaWho. Text by an eye (its row, or its card one level down) follows
that eye's provider. Text that is near no eye, like a sentence elsewhere
in the window, shows when the account is shown under any provider, as
before.
New test account-eye-provider: Usage cards for Kiro (one email, Google
and GitHub), Codex and ZCode (the same address) are rendered with Hide
accounts on. It runs en and zh, at 900 and 360px, in both engines.
Run on mote:
- account-eye-provider at this tree: 4/4.
- go test -tags nogui -run Budget ./internal/gui: ok (no budget raised).
- 124 GUI files the masking, Usage, panel and storage code reaches, both
engines, run with the next commit on top: 1761/1792. All 7 red top-level
tests are in quota-count-wrap (#3404, #2228), usage-agents-hide (#3414,
#2276) and usage-ledger (#3104), plus one masking-records zh-TW and one
quota-refresh-order. Those five files were run again at origin/main
|
||
|
|
3ebdc5df9e |
gui: what a page keeps in localStorage as JSON is read and written by two helpers
kept(k, d) reads magpie.<k> as JSON and gives d when nothing is stored, when the value is a different kind from d, or when it can't be read. keep(k, v) writes it, and a write that fails holds only for this time. They replace eleven try/JSON.parse/getItem and setItem copies: the discovery ignore list, model favourites, Usage's folds (usageOpen, usageAccounts, usageAcctsOpened, usageKeysAll, usageAcctsAll) and the panel's folded options. The three Usage fold reads, which were written out twice, are now one usageFolds(). The star's write had no try at all. This is the room for the next two commits (outloudvi's two masking reports), so the app.js budget doesn't go up. app.js shrinks by 1,062 bytes, to 1,308,386 at |
||
|
|
33af28ed6b |
gui: the add sheet's Partners heading lights once an opening
The owner asked for an elegant light on the Partners heading each time Add provider takes the view to the sheet, and picked the traced outline of three drafts. A 1px hairline (a conic gradient on an animated @property angle, masked to the border) runs once round the heading's words over 1.8s and fades, over a faint wash of the accent; it follows --accent, so it reads in both themes, and keeps to the heading's own padding box, inside the sheet. It plays when the heading is fully in view (an IntersectionObserver on the providers view), once per opening of the sheet: a search or a reload drawing the sheet again doesn't play it, closing and opening it does (partnersShone, reset where partnersCounted is). With the system's reduced motion or Settings' Reduce motion (#3813, calm() and holdStill) it isn't drawn. The outline's elements are <i>, so the heading's hint stays its only span, which the add-sheet and partners tests read. The core's scripts are 1,528,076 bytes, their budget raised to it with no room added; app.js stays under its own. Run at this head, on mote: TestCoreScriptBudget ok; the 59 GUI files that open the add sheet (grep addProvider|#addSheet) and reduce-motion and settings-general, chromium and webkit: 826 of 826 ok (at --test-concurrency=2; at 4, on mote at load ~230 from other runs, 8 chromium sign-in cases timed out at 5s and passed 28 of 28 alone). add-partners-shine.test.cjs: en zh ja de at 900 and 440px, lit once on open, not again after a search, again after close and reopen, the outline round the words and inside the sheet, none under either reduced motion. Broken by hand: without the partnersShone check every redraw lights it again, and the test is red in all 8 language/width cases. Not run: the whole GUI suite (the change adds no API call and its classes are scoped to the add sheet's heading); not seen on Windows' WebView2 or WebKitGTK, where @property and mask-composite are supported but the motion wasn't watched. |
||
|
|
f561cc5d9b |
groups: a model unchecked in its provider's list is not a member to route to (#3911)
timonwong (#3911, also on Discord #feedback): with a group of a/x and
b/x, unchecking x in provider a's model list struck a/x on the Routing
page, but group/<id> still sent requests to a. membersOff resolved each
member through resolveIn, whose provider/model step takes any model of
a provider that is on, so that a request can name a model its list
lacks.
membersOff now skips a member whose provider has picks and whose served
models lack it (unpicked), as timonwong's fork did (38615ca9). A
provider with no picks still routes a model its list lacks (#2642), a
decision model (never in the catalog) is still a decision group's, and
a request naming a/x itself still reaches a. Every route mode goes
through membersOff (ordered, weighted, rotate, manual, nested groups,
found groups, count_tokens' group lookup), so all of them get it. The
entries map is built only when a member's provider has picks.
The Routing card's memberInfo (gui/groups.go) used Resolve too, so a
manual group's pick row showed an unchecked member as ready; it now
asks provider.ResolveRoute, the same check, and the group is not ready
when its picked member was unchecked.
Tests: group_model_pick_test.go (ordered, weight, rotate; nested; a/x
named directly still served; checked again comes back; a decision
group keeps a picked decider) and gui's
TestGroupMemberUncheckedInItsProvider.
Run (mote, at this tree plus the next commit):
- Red on
|
||
|
|
62ce73250f |
gui tests: old-webkit knows webfonts.js is imported, not a page script
|
||
|
|
be0fbfe08d |
gui: a menu with nothing to tick keeps no tick column in Safari 15.0 too (#4020)
v0.1.1855's old-webkit check failed on app.css's `.proto-menu:not(:has(.on, [role=menuitemcheckbox])) .pm-tick` rule: :has() is Safari 15.4+, so on macOS 12's Safari 15.0 the whole rule is dropped and every plain menu kept an empty tick column. openProtoMenu and the sessions combo's draw() now set .pm-bare on the box when no item is on or a checkbox, and the CSS hides .pm-tick under it. The three commits before this one dedupe app.js to make the room; the core script budget is not raised. Run at the pushed head (this commit + the old-webkit test fix after it, on |
||
|
|
6e0bd5447d |
gui: capHeldNote writes the window's reset time once
Its three notes each built the same " · resets …" text; it is one const now, which makes room under the core script budget for #4020 without raising it. |
||
|
|
436fd03124 |
gui: one blurOnEnter for the four fields that commit on Enter
Four fields set the same keydown handler (keys kept from the page, Enter blurs to commit). It is one helper now, which makes room under the core script budget for #4020 without raising it. |
||
|
|
02630a5a14 |
gui: one stopSignIn for the sign-in sheet's four cancels
The same 'tell the server the sign-in under way is given up' line stood in four places; it is one helper now, which makes room under the core script budget for #4020 without raising it. |
||
|
|
6e080ca044 |
gateway: every model in /v1/models says it takes tools, a routing group too
psikent on Discord: an SSH client judges what a model can do from its
list entry, and a routing group, whose id is the user's own name, said
nothing of tools, so the client handed it none. /v1/models and
/v1/models/{id} now give every chat row models.dev's tool_call: true
(beside the reasoning it already had) and OpenRouter's
supported_parameters (tools, tool_choice, and reasoning when it thinks),
which Kilo's and Cline's list readers use (kilo.go reads the same field).
magpie has no model that takes no tools (a call written as text is read
back as one), so a group's members all take them and the group says so.
No `capabilities` key: Cursor Private Inference reads it as an object,
Ollama and LM Studio as arrays of their own words; magpie's Ollama
/api/show already says "tools". Desktop's, Science's and the decision
models' lists are unchanged.
windy on Discord: a 1M DeepSeek group with a 128K Trae member. A group's
window and output stay its largest member's, images any member's, as
#712, #756 and ARNO's truncation report decided: the gateway sends a
longer conversation only to members with room (roomy, withRoom), and
Context: Smallest model's tells agents the smallest. The editor's Context
hint now names the member a longer conversation skips when the windows
differ ("…longer than 128,000 skips Trae CN · DeepSeek-V4.1-Flash…"), in en, zh, zh-TW, ja, de.
Compaction written to agent configs follows the same window (CompactFor,
CompactSet takes the smallest threshold the user set); unchanged.
Run (mote unreachable all session, so on the other test boxes):
- TestGroupListedTakesTools on Linux (wsl-run): green; red on the old
gateway.go (a/m, b/m, group/g and /v1/models/group/g: tool_call false,
supported_parameters []).
- group-context.test.cjs on the Windows box, Playwright 1.62.0,
Chromium + WebKit, en and zh: 4/4 green; 4/4 red with the old
routing assets (the hint named neither 128,000 nor the member).
- Every GUI file that opens the group editor (56) plus i18n-keys, both
engines, on Windows: 816 tests, 792 pass, 24 red (793/23 on the run
before the hint named a member's provider). The red files with the old
assets: the same tests red (25). They are #3402, #3412, #3789, #3096 and name-suffix-saved's
WebKit provider editor, not this change.
- Full Go suite, -tags nogui -timeout 45m, on Linux: all ok but
internal/agent (7 install-detection tests), internal/proc TestTreeRSS
and internal/gateway TestUploadStillUnderwayIsNotCutByHealthPing; each
red at origin/main
|
||
|
|
761e0e0105 |
gui: a Settings option pressed through two redraws clicks its newest self (#3922)
Browser access draws twice per renderSettings: once at once, and once more when its /api/web-page answer comes. When that answer landed between the release and the click segs' pointerup sets off, the option the release found was gone by the click and nothing was sent, which segs-press-redraw's sweep saw on Network's web-page list. The click now goes to the control's newest self (same segsWho, same option), found again whether or not a draw came since; dragged off or gone still picks nothing. From Coffemon's patch on #3922 (JoeyWu-tech, fix/3922-segs-newest, c1b5575af and e8c831736): the test's new redrawn-twice case, reveal() waiting for each wheel's scroll to land, and the README entry, taken as is. The app.js change is his, shorter: his kept b when still there and looked up the newest self otherwise (+298 bytes); the lookup finds b itself when b is still there, so it is used alone (+129 bytes). Main's core had 18 bytes of room left when this landed; TestCoreScriptBudget is green and no budget is raised. What was run (mote, Playwright 1.62.0, Chromium and WebKit, en, zh, ja, de, 900 and 440px): - The new test on main's app.js: 22 of 42 red, both engines. - With this change: 42 of 42. - Broken by hand (the newest self's option taken as [0], not p.i): Chromium 17 red. - go test -run TestCoreScriptBudget ./internal/gui: ok. Not tried: the real app's webview, or a loaded Mac. Co-authored-by: JoeyWu-tech <joey110551567@gmail.com> |
||
|
|
ae03279458 |
masking: the local model is on by default; the rules mask alone until it is downloaded
The owner's plan (10-28, after the xuanwo/_kaichen reports under the
masking demo): with AstrLink Guard picked, the Chinese-name heuristic
is off and only nicknames like 小王/老李 stay a rule; with Privacy Filter
it is as before; every format rule stays; the model is on by default,
masks with the rules alone until its download finishes, and no longer
answers 503 for it.
- masking.ModelWanted(st): on when the user turned it on, off when the
user turned it off (new RedactModelOff, set by SetRedactModel(false),
remove, and cancelling the default's own download), on when the
default's download finished (RedactModelAuto). A settings file from
before this, with a model name picked or files on disk and the model
off, reads as the user's off: magpie's default doesn't override it.
- Until the picked model is installed, requests are masked by the rules
alone and fetch starts its download (one try per model per hour,
never under testing.Testing(), nothing where the model can't run).
When it finishes, settings.UseDefaultRedactModel records the default
(it refuses when the user has set anything) and the model warms.
- model(..., strict): a model that fails holds requests back (503)
only when the user turned it on; under the default the rules mask
alone. The Privacy page says which ("…the rules mask requests alone"
in en, zh, zh-TW, ja, de; /api/privacy-model has `chosen`).
- redact.Options.NamesByModel (AstrLink Guard picked): zhNameSpans
keeps only zhNick candidates (小/老 + a surname).
- KeepOwn and POST /api/settings keep both new fields.
- Docs: gateway-routing.md, site masking docs (en, zh, ja).
Run (mote, Go 1.26.8):
- gofmt clean; go vet of masking, settings, redact, gui; GOOS=linux go
vet of masking, settings, redact; GOOS=windows go vet of the four.
(GOOS=linux vet of internal/gui needs cgo, as on main.)
- go test -count=1 -timeout 45m ./... at base
|
||
|
|
a1f06bd780 |
gui: a browser tab offers the fonts of the computer it runs on (Norcleeh)
Norcleeh (Discord #general): magpie in Docker, used through the web GUI,
Settings' font menu doesn't list the fonts he installed on his own
computer; the app does. Cause, confirmed in the code: a tab's list is
/api/fonts, the server's families (none in a nogui build such as Docker)
plus commonFamilies, filtered by what the browser draws. A family that
is only on the browser's computer was never offered, and a choice the
server doesn't list was dropped by desktopFonts.available.
Now (webfonts.js, which only a browser tab loads; the app's windows are
unchanged):
- Where the Local Font Access API is (Chromium on https or localhost),
the press that opens a family menu calls queryLocalFonts() once a
page, and at load when the local-fonts permission is already given.
The families join the list with their real styles ("SemiBold
Condensed Italic" -> weight 600, 75%, italic).
- Elsewhere (Safari, Firefox, a plain-http LAN address, a refused
permission) the menu's search says "Search or type a font name…" and
offers Use "name" for a family the list lacks, enabled when the canvas
probe says this browser draws it, greyed with "This browser can't find
this font" when not; Enter takes it.
- A chosen family the server doesn't list stays in the tab's list on
later loads while the browser draws it, so it keeps being applied.
- The app's menu (openProtoMenu), never a <select>. Strings in zh,
zh-TW, ja and de. docs/subsystems/gui-shell.md says so.
Budget: no raise. here() moved out of fonts.js into webfonts.js, which
isn't a core script: loadFonts import()s it in a tab only (the page has
no CSP). The core is 106 bytes smaller than origin/main's.
Run (mote-run). At this head on
|
||
|
|
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
|
||
|
|
ceaebd6b0b |
gui: Codex's descriptions, predictions and titles pickers are one function
renderCodexDescriptions, renderCodexPredictions and renderCodexTitles were the same 20 lines three times, differing only in the setting's key, the button's label, the Off note and the API path. They now call one codexSidePick(s, key, aria, none, path). Each picker builds the same button, options and request as before, in the same #<key>Pick slot. It takes about 1.5KB out of the core scripts, room that the next commit (#3813's Reduce motion) needs under TestCoreScriptBudget, which stays where it is. Run on mote at the tree of this and the next commit (before the rebase onto origin/main; rerun after it is in the next commit's body): codex-descriptions, codex-predictions and codex-titles in every engine and language they cover, with reduce-motion, settings-general, i18n-keys and routing-live-calm: 56 pass, 0 fail. go test -run "TestCoreScriptBudget|TestAppScriptBudget|TestSettings|TestBoot|TestI18n" ./internal/gui ./internal/settings: ok. An earlier run of the same files on a mote at load 30 to 56 timed the browsers out at 180s (webkit zh passed there in 128s); the rerun after mote restarted passed whole. |
||
|
|
e8c7dddcb4 |
notices: the release carries the third-party licence notices
The owner asked for the licence notices in the release package (moejs alpha.11 compiles Intl's data in, which carries its own notices). THIRD_PARTY_NOTICES is embedded in the binary (main.go, //go:embed) and handed to internal/notices; `magpie licenses` prints it, GET /api/notices serves it, and Settings › About has an Open-source licenses row that opens it in a dialog, in every language. `make app` copies the file into the .app's Resources too. The core's scripts are 1,527,245 bytes, their budget raised to it with no room added; app.js stays under its own. Run at this head (rebased on origin/main): - win-run (Windows 11): go vet -tags nogui . ./internal/notices ./internal/cli; go test TestNoticesFollowMoejs (.), ./internal/cli, TestCoreScriptBudget (./internal/gui): ok. - wsl-run (Ubuntu 24.04): go vet -tags nogui ./..., go build -tags nogui: ok. Run at the pre-rebase head 14e2d13fb, on mote (macOS): - gofmt; make app's copy byte-identical to the file; `magpie licenses` output equal to the file; GOOS=linux/windows vet and build; go test . ./internal/cli: ok. ./internal/gui: only TestMainWindowCorners red, the same on origin/main (#3949). - about-notices.test.cjs: chromium and webkit, en zh zh-TW ja de, 1100 and 420px: all ok. Broken by hand: TestNoticesFollowMoejs red with the embedded file cut. Not run: the GUI suite at this head. The rebase met main's cancelAsk helper where showNotices sat, and the dialog's Done now uses it (the same stopPropagation + closeConfirmAsk). The whole GUI suite at 14e2d13fb was cut off when mote went down at load ~50: the files it reached outside About had reds, most of them 180s browser-launch timeouts, the rest passing in other languages or the other engine; they are run again once mote is back, and any that stay red are filed. |
||
|
|
1d7ca4c6b7 |
gui: every scroller in every stylesheet is held to keep the wheel; Safari 15 too
碳碳双键 (ysm119, Discord): a list scrolled to its top or foot by the wheel went on to scroll the page, "in many places". |
||
|
|
6bec526f7a |
gui: a key's rename saves once on Enter and never on Escape (#3944)
A provider's key name was edited in an input whose Escape drew the
editor again and whose blur saved. Chromium blurs the input as that
redraw takes it out, so Escape after typing saved the typed name, and
Enter, or Enter twice before the save answered, sent keys/rename twice.
The account rename already guarded this with a once flag. Both now go
through one helper, renameIn: Enter saves a changed name, Escape keeps
it, and whichever comes first ends it, so the blur that follows does
nothing. Taking the two copies into one makes app.js 93 bytes smaller;
no budget is raised.
From Coffemon's patch on #3944 (JoeyWu-tech, joey/fix/3944): the test
key-rename-once.test.cjs and its README entry taken as is. The app.js
change differs: the patch copied the account rename's guard into the
key rename; this shares it instead, to keep core script inside its
budget.
What was run (mote, Playwright 1.62.0, Chromium and WebKit, en and zh):
- origin/main
|
||
|
|
8c983ee7b2 |
gui tests: four update-* files leave WebKit's ResizeObserver notice out of page errors (#3942)
update-download-percent, update-hide, update-notes-ask and update-wait
counted every page error, and WebKit's "ResizeObserver loop completed
with undelivered notifications" (a layout that outran its observers,
no fault of the page) turned them red under load. They now leave that
one notice out, with the same filter update-release-page and eleven
other files use; any other page error still fails them.
Patch from Coffemon (JoeyWu-tech) on #3942, c5033248, reviewed line by
line and taken as is. Test only.
What was run (mote, Playwright 1.62.0, WebKit, at origin/main
|
||
|
|
63aca1802e |
gui: PenguinHarness's logo is a tile, and the app's own icons are no logos (#3858)
icon-tile was red on main: PenguinHarness's logo ( |
||
|
|
84ada9dc80 |
gui tests: phone-web's tap scrolls by code once, as view-wheel-unheard does (#3876)
phone-web's "a tap's click is no flick" scrolled by code 40px a frame for five frames after the click. Since |
||
|
|
03a8d981ea |
gui tests: quota-refresh-order runs again, with seven more orders (#3679)
|
||
|
|
a8098a8862 |
gui tests: reach wheels the page over a point no inner box takes, and the routing editor is pressed once its motion has stopped (#3408, #3409)
Three Routing GUI files were red on main, bisected on mote from |
||
|
|
6af83172d3 |
gui: the masking demo shows no video where WebKitGTK can't play one (avk458 on X)
On Omarchy (Arch + Hyprland) without gst-plugins-good, opening Masking's
"How masking works" aborted WebKitWebProcess about 3s later: WebKitGTK
2.52.6 gives every <video>, muted ones too, an autoaudiosink, which lives
in libgstautodetect.so ("no such element factory autoaudiosink", then a
SIGABRT). The window was left frozen on its last frame ("一点就崩溃再点
magpie就卡死了").
Cause: b90e81da1's noVideo was only in GET /api/settings. The page's
state.settings comes from /api/state, which never carried it, so a demo
opened before Settings was visited set the webm src. The GUI fixture put
noVideo into /api/state's settings and hid it.
Now boot.js says noVideo (app only, not a browser tab) before the page
paints, and demo.js reads window.bootPrefs.noVideo; the poster shows
instead. Also, for BoyC338's memory question: folded, or with the page
left, the video lets go of its source (removeAttribute src + load), so
no decoder or buffer is held; opened again it goes on from where it was.
Run:
- mote: GUI masking-demo, masking-records, i18n-keys in Chromium and
WebKit: 116 pass, 0 fail.
- mote: go test -run 'TestBootSaysNoVideo|TestBoot|TestSettings|
TestFontSettingsAPIAndBoot|Budget' ./internal/gui ok; gofmt -l none;
vet for darwin, GOOS=windows, GOOS=linux -tags nogui ok.
- WSL magpie-desktop: go test -tags gtk3 -run 'TestBootSaysNoVideo|
TestGstAutodetect|TestWebkitDefaults|TestSettings' ./internal/gui ok.
- Real app on omarchy, v0.1.1840 release: Masking > demo row aborted
WebKitWebProcess (coredump 07:10:10 UTC), window frozen. Built this
tree with make release-linux in WSL and ran it there: demo opens with
the poster and animates, fold/reopen, Agents and back to Masking all
respond; no coredump, no autoaudiosink line, both web processes alive.
These ran at base ea53eb126; rebased onto
|
||
|
|
d74ef5e04c |
gui: an inner list wheeled to its end keeps the wheel; the page stays put
碳碳双键 (ysm119, Discord): wheeling the Usage page's request list to its top or bottom carried on into the whole page, and "this happens in many places". It is the class: every box that scrolls inside a scrolling page. app.js marks such a box `.holds` while it overflows vertically, on pointerover and on each wheel (the box under the pointer and its ancestors up to the .view), and app.css gives `:where(.holds)` overscroll-behavior-y: contain, which keeps the Mac's bounce on the box. Not one CSS rule for every overflow:auto box: in Chromium `contain` holds the wheel even in a box that doesn't overflow, or is overflow:hidden, or only scrolls sideways, so short lists and the heatmap's and ledger's sideways scrollers would have stopped the page. The .view itself is never marked. :where() weighs nothing, so .mchips in a short window (@media max-height 640px, #833) still passes the wheel on. The new test, inner-scroll-contain.test.cjs, wheels the Routing page's requests list past each end (en and zh, 900x560 and 1300x600, under "By session" / 未提供会话标识), and ten kinds of inner box, and asserts the page's scrollTop didn't move. A short list, heat-scroll, led-wrap and snip must still pass the wheel to the page. routing-scroll-end now wheels over the page's gutter: at its view centre the pointer sat on the requests' list, which now keeps the wheel at its end (600 of 1066). Run (mote, Playwright 1.62, Chromium and WebKit): - inner-scroll-contain 40/40. - 17 files: inner-scroll-contain, click-scroll, routing-scroll-end, routing-sessions, view-wheel-after-click/-after-redraw/-unheard, heatmap-scrollbar, ledger-hscroll, ledger-hscroll-foot, context-scroll-end, menu-scroll, provider-levels-scroll, panel-usage, panel-routing, qoder-cn-tile, agent-disconnect: 268/287. Reds were routing-scroll-end (this change, fixed above) and panel-usage webkit zh (#3311, commented). Rerun of routing-scroll-end, panel-usage and inner-scroll-contain: 66/66. - go test -tags nogui ./internal/gui ok (TestCoreScriptBudget passes at the rebased head: core under 1,526,556, app.js under 1,310,460; no budget raised). Broken by hand: the old app.js and app.css: the requests list and every held box red in both engines (mchips aside, it had contain already). Only the CSS rule removed: red, "the page didn't move" x8 plus each held box x2. Only the overflow check removed: a short rt-reqs red (Chromium), led-wrap and snip red in both engines. Not run: full GUI suite (mote was busy with another session's suite). Not tried: WebKitGTK on Linux, WebView2 on Windows, a real Mac's trackpad rubber band and momentum in the app, older macOS WKWebView, touch; zh-TW/ja/de (no strings changed). |
||
|
|
f0d42fbe32 |
gui: one cancelAsk for a confirmation's dismiss-only buttons, one Qoder risk note
Twelve buttons in app.js (eight Cancels, three OKs and a Later) each had
their own copy of `(e) => { e.stopPropagation(); closeConfirmAsk(); }`;
they now share cancelAsk. The Qoder and Qoder CN rows carried the same
risk note twice; it is QODER_RISK now. Behaviour is unchanged. This
makes room under TestCoreScriptBudget for the next commit, without
raising the budget (core 1,526,515 of 1,526,556 before).
Run (mote): go test -tags nogui -count=1 ./internal/gui ok (budget and
asset tests). The GUI suite ran on the next commit, which holds this one.
Not tried: nothing by hand beyond the suite; the buttons' code is the
same function moved.
|
||
|
|
a41d0d5098 |
redact: the demo's notebook has a square icon and its entries under the header
The owner's screenshot of the masking demo's "小鹊的小本本" box: the notebook icon was stretched tall, and the two entries overlapped the subtitle and each other. - The icon carried the class "acc", which app.css already styles as an accounts row (flex, min-height 38px, padding), so the 22px tile came out 38px tall. It is xq-acc now; none of the demo's other short class names (on, done, hot, ok, hl, far) has an app.css rule of its own. - The entries were placed at fixed tops (40 and 81) under a header that is ~41px tall in CJK fonts. They are a flowing list now, after the header: each entry is its placeholder pill over its value, 5px apart, and a highlighted entry gets a soft background instead of colliding. The flyers already land on the values' measured positions, so the animation follows. - German's title "Notizbuch der kleinen Elster" wrapped to two lines in the 220px box and pushed the last entry 14px out of it (the existing no-clip check caught it). It is "Notizbuch der Elster". Test: masking-demo's layout test checks every box icon is 22×22 and that each notebook entry starts at least 4px below what is above it. Run at this tree ( |
||
|
|
a3ee00c05c |
codex: its own GPT models stay in Codex's list when kept for routing groups
士奇 (Discord, 10-28): with a routing group on, the Agents page's Codex list lost its Codex provider section and models, the model dropdown still offered GPT, but the Codex app had none; with the group off they came back. Cause: the codex provider's "Only through routing groups" (Provider.Unlisted, 只通过路由分组使用), or a group that lists itself alone (Group.Unlists), took the ChatGPT account's own models out of Catalog(), so out of Codex's own list too. With no Codex section, the own options were not magpie's, so the own-models switch showed and the picker kept offering GPT; meanwhile #1602 ( |
||
|
|
7323255b4e |
gui: the Windows app's confirmation backdrop goes without blur too (#3980)
Henry-916's change (the commit before) took the blur off the provider editor's full-window backdrop in the Windows app, where WebView2 on an Intel UHD D3D11 GPU stalled under it. The Remove/Sign out confirmation (.action-confirm, a <dialog>) blurs the whole window behind it the same way through ::backdrop, so it is scoped out by the same win/web rule. modal-backdrop.test.cjs now shows that dialog and checks its ::backdrop. Not changed: .pop, the panel's open profile chips and Settings' sticky header blur too, but over a popover's or a header strip's area, not the window's; nothing measured them as slow. Run at this head (mote): - node --test modal-backdrop: 24 of 24 ok. Broken by hand (the ::backdrop selector dropped): both Win32 desktop cases fail "nor the confirmation's". - chromium: modal-backdrop, dialog-backdrop-drag, segment-press-dialog, gui-zh-tw, gui-ja, gui-de, i18n-keys, codex-signout, account-discovery: 93 ok, 0 fail. The same less modal-backdrop and i18n-keys with BROWSER=webkit: 37 ok, 0 fail. - go test ./internal/gui: one red, TestMainWindowCorners/macOS_26_SDK on macOS 27, filed as #3949; nothing in it reads CSS. Not tried: the real Windows app; the reporter measured the modal's blur there (67 → 165 rAF callbacks a second). |
||
|
|
824100f30f |
gui: keep Windows modal backdrops responsive without blur
Disable full-window modal backdrop filtering in Windows desktop windows and tray panels, retaining the dimming veil. Browser pages and other platforms keep their existing blur through the existing win/web markers. Document the platform behavior in the GUI shell reference. On an affected 0.1.1805 installation with WebView2 155.0.4283.62 and Intel UHD D3D11, disabling the filter made provider tests visibly responsive. The reporter confirmed the improvement. Scripted scrolling measured roughly 67 to 165 rAF callbacks/s, not presented FPS. Verification: modal-backdrop.test.cjs fails on the original CSS in both Windows desktop Chromium cases (blur instead of none), with the other 10 cases passing. After the fix, 45 targeted tests pass across Chromium and WebKit: modal-backdrop, dialog-backdrop-drag, segment-press-dialog, gui-zh-tw, gui-ja and gui-de. node --check and git diff --check pass. The full GUI suite, Go vet/build/test matrix and native macOS/Linux tests were not run. |
||
|
|
7b007e9866 |
gui tests: routing-pause and routing-rule-effort press once a group's editor has opened (#3410, #3411)
Both were red on main since |
||
|
|
f201183047 |
tune: the compact window is Long conversations, one value for both agents
7eleven (Discord #help): the Usage page's "Tuned for you" compaction
value and the agents' sheet "Long conversations" window were two values
that could disagree. Codex's tune wrote model_auto_compact_token_limit
into config.toml beside the catalog's context_window that Long
conversations writes; Claude's read its own env.
One source of truth: settings.CompactAt / FullContext. Tune's compact
row for Codex and Claude Code now has source "long": its Current is
settings.Compact(), Use calls provider.SetCompactAt (Sync writes Codex's
catalog and Claude's CLAUDE_CODE_AUTO_COMPACT_WINDOW as before), Undo
puts back the CompactAt/Full it stashed under tune.long.compact. So a
value set on either page shows on the other and writes the same config.
writeCompact marks claude.compact_long when the env value came from
settings, so Claude's row reads it as ours, not as the user's.
Migration (Codex Sync, local place): an old tune.codex.compact stash
whose limit is still the one tune wrote moves into Long conversations.
At default or Full it takes tune's value; with a value the user set it
takes tune's only when smaller. config.toml gets the user's earlier
limit back or loses the key; the stash is forgotten. A limit the user
changed after tune wrote it, or wrote themselves, stays and reads
Locked. A provider's Compact at or the user's own Claude env stays
Locked too.
Run (mote, at this tree):
- go vet on agent, provider, gui, tune; GOOS=linux go vet -tags nogui
./...; GOOS=windows go vet ./...; go build ./... and -tags nogui: ok
- go test -tags nogui ./internal/agent ./internal/provider
./internal/tune ./internal/gui: ok (TestCoreScriptBudget within the
budget, not raised; context.js is 33 bytes smaller)
- GUI: compact-one-value.test.cjs (new; Chromium and WebKit, en zh
zh-TW ja de) and context-tune: 104/104 at the rebased head
Broken by hand: the Codex long branch, the Claude long env check and
the Sync migration call each turned red TestClaudeCompactAt,
TestCodexHomeEnvTakesThePick, TestTuneCodexCompact,
TestTuneCodexOwnLimit, TestTuneCodexMigrate (4 subtests),
TestTuneClaudeLong and TestTuneCodexMigrateOnSync. Old context.js and
i18n.js turn compact-one-value red ("You set 272K").
Not run: full suite, Go or GUI (shipped at once per owner; the GUI suite
is still running on mote, reds get their own issues).
Not tried: a real Codex or Claude Code session reading the written
config; the migration on Windows/WSL places (it runs for the local
place only).
|
||
|
|
fcbbb8e479 |
gui: the start's warm-up and read-ahead look at each file once a second (#1665)
The warm-up after a start (sessions, usage, Codex effort) and the usage read-ahead asked for settings.json, logins.json and the rest for each session and row they read: a Windows sandbox's second start stat'ed settings.json 677 times in 25s, 286 of them settings.load and AccountDiscoveryOff under the warm-up. Both now hold what was read (filememo.Hold), as the GUI's requests and a catalog sync's round do. A write still reads the disk (edit.Read, settings' writes, logins.json under loginsMu), so nothing is written from a held read; a file another app changes is seen up to a second late while they run. Measured on xiaomi-gpu (Windows 11), an empty sandbox HOME, magpie web --gateway, second start, 27s, with a build counting each look at the disk (instrumentation not committed): before 1113 looks, settings.json 677 after 483 looks, settings.json 114 The catalog sync's round stays at ~100ms. Run: - TestWarmUpHoldsWhatItReads: red with the warm-up's Hold taken out by hand (the second read saw the other app's change), green with it. - mote: gofmt -l internal/gui clean; GOOS=windows and darwin go vet ./internal/gui and GOOS=linux go vet -tags nogui ./internal/gui clean; go test -count=1 ./internal/gui ./internal/usage: usage ok, gui red only on TestMainWindowCorners (#3949, mote's macOS 27, red on main before this). |
||
|
|
1a8048592e |
providers: a search for a model keeps the providers serving it and names the model under each (frankdeng, Neo)
frankdeng (Discord #general) wanted to type a model (opus 5.5) on the
Providers page and see who serves it; Neo had two providers serving
opus5.5 and couldn't tell which. The search already matched model ids,
but as one blob of the provider's text: "opus 5.5" kept a provider with
claude-opus-4-1 and gpt-5.5, and one with Opus 5.5 switched off, and no
row said which model matched.
Now the words a row doesn't say itself must all be one model's that is
on, separators aside ("opus 5.5", "opus5.5", "Opus-5.5" find
claude-opus-5-5 and opus-5.5), and the row gets a muted line "Serves
<ids>" (the existing .sub style, clipped with "…"). A search on the
provider's own name, host, account or key names no model. Changed: a
provider whose only match is a model it has switched off no longer shows.
"Serves {models}" is in zh, zh-TW, ja and de.
Size budgets not raised: renderProviders no longer sets the lists'
visibility and the fold's state, which findProviders (called at its end)
set again; findProviders' two branches for that are one. Core scripts
1,526,548 of 1,526,556; app.js 1,309,717 of its budget.
Run on mote, at this head (rebased on
|
||
|
|
8b95f7c3a9 |
usage: a subscription's windows are grids of their own, not a rows subgrid (#3955)
Each quota window was a subgrid of three rows of .quota-windows, so the
bars of two windows side by side lined up when one's name wrapped. That
is the layout that crashed Safari 16's WebKit sizing the Routing
requests (#3731). Now each window is a grid of its own. fitQuota, which
already runs a frame after the windows' ResizeObserver to stack the
counts, also gives each window's names the height of the tallest beside
them. The subgrid left 9px between a bar and its reset line, not the
4px the CSS declares, in both engines; kept, so the card looks as it
did.
quota-window-rows (new) checks that no rule of the windows says
subgrid, and at 1100, 700, 390 and 1100 again, in both engines and
every language, that the bars of each row start at one y with a long
name wrapped beside a short one, that the names sit above the bar, and
that a reset line starts 13px under its bar's top.
Run on mote at this head (on
|