Commit Graph
2409 Commits
Author SHA1 Message Date
yetone 54b6d4d397 gui tests: editor-thumbs-batched checks the thumbs shown, then Advanced opened (#5886)
editor-thumbs-batched went red on main from b03a37476 on (found by
bisecting 117f56c70..2abfe2b64 with the chromium half of the test):
three controls, off|on and off|week|all, with a thumb of width 0 two
pixels left of the option. b03a37476 moved Claude's warm-up and lean
lists into the provider editor's Advanced, which is closed when the
editor opens. Chromium answers offsetWidth inside a closed <details>
(its content is content-visibility: hidden and the read lays it out),
so the test's `on.offsetWidth` took those controls for shown ones,
while their ResizeObserver, rightly, had nothing to report yet.

Nothing is wrong in the page: the thumbs are put when Advanced opens.
The test now checks the thumbs whose option checkVisibility() says is
shown, then opens every closed <details> in the editor, waits two
frames, and checks every thumb again. That second check is what a user
opening Advanced sees.

WebKit's slow-read count was red too, on main as well (origin/main
70f4593e6: 208 at 40 accounts, 244 at 160; this branch 188/213). The
reads that differ were all holdModal's few a frame and the frames' own:
the open at 40 sometimes ends ~5 frames sooner. That is frame jitter,
not a read an account (+120 here), so the room for slow reads is 60,
not 24; the forced-layout room stays 24.

Run (mote, at the pushed base): editor-thumbs-batched, Chromium and
WebKit, en/zh/zh-TW/ja/de, 10/10 green three times in a row.

Broken by hand: thumbFit's callback made a no-op (the thumbs put only
when drawn) is red 5/5 in Chromium, on "opened off|on: option
655.8+38.0, thumb 653.8+0.0" and "opened off|week|all", the controls
in Advanced; the "shown" check stays green there, as it should.

Broken by hand: an offsetTop read for every account a frame after the
list is drawn is red in WebKit en and zh (278 at 40, 538 at 160).

Not tried: the WebKit half of the broken-by-hand run.
2026-11-13 12:20:29 +08:00
yetone 6bba0572d6 gui: an open editor's readings redraw its accounts list, not the page (#5310)
When a provider editor opens, its accounts' readings load after it
(loginUsageOf), and their arrival called renderProviders(true): every
Providers row and the whole editor drawn again. With 600 accounts that
was a second full draw of the editor. redrawAccounts now draws only the
editor's accounts list again and puts it where the old one was. A full
draw is kept for the cases it was there for: another provider being
edited, a rename or a focused field (left alone, as before), and an
arrangement in progress or no open list (drawn in full).

What a full draw did, the in-place redraw does too:
- the list's inputs are named and described as field() names them;
  that part of field() is now fieldInputs(label, control), shared;
- the focus goes back to the same control of the same account, matched
  by tag and first class (a pressed refresh is "busy", so the whole
  className is not the same after), not its index in the list, which
  the readings' new controls move;
- that focus is given back, not pressed (modalRefocus), so the dialog
  keeps holding the pressed element where it was;
- the body's scroll is put back after the swap: the focused element
  taken out moved it by scroll anchoring (120 to 124 in
  editor-quota-quiet).

The full draw also hid a gap it no longer covers: the provider editor's
folds learn the labels' column from their own size (edAlign's
ResizeObserver), and the prefs fields (Resets, Warm up, Check in,
Claude Code) shown after the prefs load widen that column without
changing a fold's size. The readings' full draw made new folds that
measured it again. mountProvPrefs now aligns the editor's folds after
showing its fields (edAlignAt, the observer's body made a function).

Measured before (mote, 600 Claude accounts): the in-place redraw saves
~45ms in WebKit and ~30ms in Chromium of the editor's open. The rest
of the ~1s is the first layout of 600 rows.

Tests:
- editor-readings-in-place (new): 12 accounts, readings held until the
  editor is open and the 3rd account's first button focused. After
  they arrive the Providers row and the editor's head are the nodes
  drawn before, the focus is that same button, and the list's labels
  match a full renderProviders(true). Chromium and WebKit,
  en/zh/zh-TW/ja/de: 10/10 green.
- editor-quota-quiet's "redrawn" watch also counts the accounts list
  replaced alone; before, it waited for a new .ebody and failed
  "never came, so this tested nothing".

Broken by hand:
- the readings back to renderProviders(true): editor-readings-in-place
  10/10 red on "the provider's row is the one drawn before".
- the focus matched by the whole className: account-refresh-holds
  red in Chromium, "the focus stays on the pressed refresh" (null).
- the refocus without modalRefocus: account-refresh-holds red, "the
  pressed refresh moved 186.875px".
- without the scroll put back: editor-quota-quiet red 8/8, "the body
  keeps its scroll" (124, 120).
- without mountProvPrefs' edAlignAt: editor-advanced-align red in
  Chromium, "en 1000: Advanced starts at 284.765625, its fields at
  349.265625".

Run (mote, load 25-45, other sessions' runs beside):
- account-refresh-holds, claude-quota-onboarding, editor-advanced-align,
  editor-hints, editor-quota-quiet, editor-thumbs-batched, one at a
  time, on this change and on origin/main 2abfe2b64: the same reds on
  both but those this commit fixes, and editor-thumbs-batched (red on
  main, #5886, the next commit). The shared reds are filed:
  account-refresh-holds' rising sheet (#5814), account-arrange (#6010),
  claude-quota-onboarding (#6179), editor-hints in WebKit (#6156).
- the 149 GUI files this reaches, on mote: 2601 pass, 124 fail of 2725.
  Every red is in 16 files, and the same 16 run alone at origin/main
  2abfe2b64 on mote fail the same tests (126 there, the two more being
  signin-proxy at 380px, #5866). Filed: provider-many-keys and
  provider-max-output #6209, key-switch #5835, plugin-signin-no-url #5938,
  plugin-signed-out-account #5998, reset-providers #6196, old-webkit
  #6030/#5919, mobile-web #3952, plugin-move-unserved #4392, key-import
  #6416, account-refresh-holds #5814, account-arrange #6010,
  claude-quota-onboarding #6179, editor-hints #6156. restart-app's
  chromium 420 zh was 1px off once in the full run and green alone on
  both trees (#6417).
- go test ./internal/gui -run 'Budget|I18n|Keys|Words' on mica: ok
  (TestCoreScriptBudget with the previous commit: -89 code bytes over
  both).

At origin/main 70f4593e6 (rebased over 27 commits,
several in app.js): go test ./internal/gui -run
'Budget|I18n|Keys|Words' ok on mote; editor-readings-in-place,
editor-quota-quiet, editor-thumbs-batched, editor-advanced-align,
account-refresh-holds, claude-quota-onboarding, i18n-keys,
signin-proxy, reset-providers and key-import: every red one that is
red on origin/main too, but editor-thumbs-batched's WebKit read
count, which the next commit gives room (red on main as well).
editor-advanced-align was red once in both engines in that set at
--test-concurrency=2 under load, then green alone on this head and on
main, and 58/58 green in the same set again (#6421).

Not tried: the real app with 600 real accounts; Linux WebKitGTK.
2026-11-13 12:20:29 +08:00
yetone c2fd48782b Put back what 1f05c311d took out of main by mistake
1f05c311d was committed with its worktree's older tree on top of a
fresh origin/main (git reset --soft), so beside the memory fix it
undid every file 610ae1f54..c1312ac15 changed (45 files: key balance,
import links, project subagents, uninstall, site, LESSONS.md and
more). This commit restores each of them to c1312ac15 byte for byte;
the tree is now c1312ac15 plus the memory fix alone
(git diff --stat c1312ac15 HEAD: the 4 files of the fix).
2026-11-13 12:18:23 +08:00
yetone 1f05c311d9 library: an open memory holds still while the Memory tab polls (Nietzsche_Li on X)
"资源库-记忆中,被展开的记忆的表单会定时抖动". While search by meaning
still has memories to read (read < of, which can last up to a minute
between memembed.Keep's reads) or a learn-from-conversations run goes,
the Memory tab reads its row again every 2s, and each read drew the
whole page anew. The open editor was a new .lib-detail each time and
played its content-in entrance (opacity .5, 2px slide) every 2s.

- semWatch/distWatch draw nothing when the read changed nothing, and
  redraw only their own row (redrawRow) when it did; the whole tab only
  when the memories changed.
- render() marks a .lib-detail open before it (same data-detail) as kept,
  so it doesn't replay its entrance. This covers every render of an
  open editor in the Library: memories, instruction sets and agents'
  files (the siblings; no other Library tab polls into render()).
- A new memory's text no longer takes the focus back on every render.

Run (mote): library-memory-steady.test.cjs, all 5 languages, 980/420,
chromium + webkit: green 4 of 4 whole-file runs after the last change
(webkit alone 2 of 2 before it). Broken by hand: the same test against
origin/main's client.js and library.css: 22 of 22 red ("the editor
played its entrance again"). One webkit de 420 red was the test's own
first row click intercepted by the header at 420px while the page
settled; the test now opens rows with a DOM click.
Also run, both engines, every language, 980/420: library-memory, library-memory-select, library-memory-suggest, memory-icon, library-instr-busy, library-instr-sets, library-linked-set, library-follow-server: all green. No Go code changed, so no go test or vet.
Not tried: the real app on a real memory store mid-read.
2026-11-13 12:17:43 +08:00
yetone 70f4593e62 provider: a key's typed balance can refill each day (Kelen_Yc on X)
A key's balance typed by hand refilled each month or each week. A relay
key with a daily allowance had no way to say so. Now it can refill each
day, at local midnight, like the others:

- provider: Refill{Every: "day", Day: 0} (RefillDay). Last is today's
  midnight in now's location, Next tomorrow's. check takes it with day 0
  only; ParseRefill reads daily/day/d (daily:1 refused); String is
  "daily". A magpie before this drops such a refill on read, as one
  written by hand that isn't one, and counts from when it was typed.
- CLI: `magpie provider key-balance <id> <key> --refill daily`; usage
  lines updated.
- GUI: the pill's menu has "Refills each day" after "Refills each
  week…", posting {every: day, day: 0} at once (no day to pick, so no
  ellipsis), with its toast; en, zh, zh-TW, ja, de.
- docs/subsystems/providers-accounts.md names it.

Tests: TestRefillDays gains daily rows (midday, exactly midnight, a
month's and a year's end, Asia/Shanghai). New
TestTypedBalanceRefillsDaily holds the clock in Pacific/Kiritimati
(UTC+14), Pacific/Pago_Pago (UTC-11) and UTC: a minute before local
midnight the spend counts from when it was typed, a minute after it
counts from local midnight and the next refill is the following one.
TestOwnBalanceParsedInYuanAndRefill and TestTypedBalanceRefills cover
parsing, the bad {day, 1}, and read-back; TestKeyBalanceCmd sets
--refill daily. key-own-balance.test.cjs picks Refills each day in
every language, both engines, 900 and 400px, checks the post and that
the menu then shows it picked.

Run on mica at 889758605 + this: go test -count=1
./internal/provider ./internal/cli ./internal/gui ok; go vet darwin,
GOOS=linux -tags nogui, GOOS=windows ok; gofmt clean; GUI
key-own-balance, i18n-keys, i18n-en-no-cjk, key-balance-expiring in
chromium and webkit ok (48/48). Rebased on c5adcbaab (library, site;
nothing of this change's files), then at the pushed head: go test
./internal/gui, ./internal/provider -run Refill|TypedBalance|OwnBalance|
KeyOwnBalance|Budget ok, i18n-keys and i18n-en-no-cjk ok. key-balance-card is red in de at 560px
(view-usage 635>560) in both engines on the clean base 889758605 too:
#6414.

Broken by hand: daily Last taken from UTC's midnight instead of local:
TestRefillDays and TestTypedBalanceRefillsDaily (Kiritimati) red.

Not tried: the real app with a real relay key; the full suite (started
after the tag).
2026-11-13 11:59:54 +08:00
yetone 4431e31f7c library: a project gets subagents of its own, per agent (jinpwng on X)
The Subagents tab now lists the projects as Skills and MCP do. Opening
a project shows each library subagent with chips for the agents that
read a project's own subagent folder: Claude Code (.claude/agents),
Codex (.codex/agents, TOML), OpenCode, Gemini CLI, Qwen Code, Droid
(.factory/droids), Cursor and Copilot (.github/agents/*.agent.md). A
tick writes the subagent into that project only, in the agent's own
format; the agent's global folder and other projects are untouched.

Each file is recorded by its hash and rewritten or removed only while
it is exactly as magpie wrote it, so a same-name file of the user's is
left alone. A rename in the library follows into each project. The
files are kept out of git by the project's info/exclude block, and
follow the repository's other worktrees (syncTrees now copies
Subagents, and clears it for a worktree let go).

POST /api/library/projects/subagents {dir, name|names, agents}. No CLI
yet, like project servers. Hooks, instructions and Claude plugins have
no project scope yet (filed separately).

Run (mica / mote via mica-run, mote-run):
- go test -count=1 ./internal/library ./internal/gui: ok
- node --test, chromium + webkit: project-subagents, project-scope,
  project-servers, project-skills-pick, project-skills-groups,
  project-remove-keep, library-subagents, library-all, library-items,
  i18n-keys, i18n-en-no-cjk, claude-subagents-pick,
  codex-subagents-lead, subagent-effort: 150/150 pass
- gofmt -l clean; go vet darwin, linux -tags nogui, windows on
  internal/library and internal/gui: ok

Broken by hand: dropping Subagents from syncTrees' copy made
TestProjectSubagentsFollowWorktrees red ("the worktree hasn't the
project's subagent"); the earlier session broke the fix by hand and
saw the new library tests go red.

Not tried: a real Claude Code/Codex session picking up the project
subagent; the full go suite (started after the tag); Windows/Linux
runs of the GUI.
2026-11-13 11:51:50 +08:00
yetone 48afb27b0f library: Claude plugin rows show counts, the dialog keeps its width and folds the parts (jinpwng on X, #6309)
The plugin dialog's description, part lists and source line sat in the
editor grid's 132px label column, so even Plannotator (3 hooks) read as a
narrow column: the Hooks heading landed in the right column, the names
under it on the left and the GitHub line in the middle. Description, parts
and hints now span the grid. The list row showed every skill name (PStack
lists a hundred); it shows "Skills 12 · Hooks 3", and the dialog lists each
part's names in a fold, closed by default.

Run at this head (rebased on 610ae1f54), on mica, Chromium and WebKit, en,
zh, zh-TW, ja, de, 420 and 1100: library-plugins, library-subagents,
library-all, library-row-open-scroll, library-open-again, i18n-keys,
i18n-en-no-cjk: 82 of 82 pass. gui-zh-tw passes; gui-de and gui-ja's
"has every zh string" are red on main already ({agent} placeholder, #6234).

Broken by hand: with the span rule cut back to the <p> only, the test fails
with "a part or the source is squeezed" (parts 116/433 of 600px, source
116px), the reporter's alternating layout. With the old CSS it fails "the
description is squeezed: {p:132,d:600}".

No Go files changed, so no gofmt/vet. Not tried: the real app with a real
PStack or Plannotator.
2026-11-13 11:43:59 +08:00
yetone 610ae1f541 library: handing skills over turns off the all-in-~/.agents/skills setting and takes magpie's links out (ConatusMoon2222 on X)
Put skills in "~/.agents/skills" (SharedSkills) gives every agent that reads
that folder every skill, so it cannot go with choosing agents per skill,
which is what "Manage in magpie" (HandOverSkills) is for. With the setting
on, a handed-over skill's entry was taken away and the next sync linked it
back there, so the link stayed (reproduced in a sandbox HOME). Handing over
now turns the setting off in the same write; the sync then removes magpie's
own links there (sweepShared: only ours, never the user's entries). The
confirm sheet says so, only while the setting is on. The Put skills in note
says the skill router lists nothing while every skill is in
~/.agents/skills (the "none" the reporter met), only when both are on.
Strings in zh, zh-TW, ja, de.

Run (on mote, at this tree):
- TestHandOverWithSharedSetting: red with the l.SharedSkills = false line
  commented out ("a link is left in ~/.agents/skills"), green with it.
- go test ./internal/library ok; go vet darwin, GOOS=windows, linux nogui
  on internal/library ok; gofmt -l clean.
- GUI: skill-handover, shared-skills, i18n-keys, i18n-en-no-cjk in chromium
  and webkit, 23/23 each.
Not run: the full GUI suite and go test ./... before the tag; a real
account's Library; WebKitGTK.
2026-11-13 11:28:51 +08:00
yetone 4b34020354 gui: shorter Japanese cap toggle label, so it stays on its line at 420px (Wing8Aqua on X) 2026-11-13 11:02:15 +08:00
yetone 2f34649a6e gui: Claude and Codex accounts get "Sign in on another computer…", the link alone (Wing8Aqua on X)
Adding an account opened the local browser, the only way not to being a
Privacy setting nobody finds. The ideal sign-in is often another machine
(another region). Under Claude's and Codex's accounts a row starts the
sign-in kept to its link: /api/signin takes linkOnly, opens nothing here
and the window shows the link with Copy and Open in browser (f4f104d1c)
and the paste-back field for the address the other browser ends on. The
setting and the default are unchanged; other subscriptions are not given
the row (plugin sign-ins are not touched).

Run: see push notes.
2026-11-13 11:02:15 +08:00
yetone 0ae77bad59 gui: the cap toggle says what it does: off, fallbacks take over at the cap (Wing8Aqua on X)
"Stop when every account is at its cap" read as if off meant not stopping
at all. Off, requests go on to the provider's fallbacks; on, they get 429.
Renamed "Don't go to fallbacks when every account is at its cap", with a
tooltip naming both states, in en, zh, zh-TW, ja and de. The field
(capStop) and its behaviour are unchanged.

Run: pool-ends GUI test updated to the new labels (see push notes).
2026-11-13 11:02:15 +08:00
yetone cba704d5f0 library: with the skill router on, the page says when no skill is listed for an agent and when its own skills stay in its prompt (ConatusMoon2222 on X)
ConatusMoon2222 turned the Skill router on and reported it "does not take
effect". Reproduced in a sandbox HOME: the router lists only the library's
skills ticked for an agent. An agent with nothing ticked, or each skill kept
direct, got no magpie-skills, yet its row said "on"; and skills in an
agent's own folder that the library lacks stay in its prompt with no word
on the page.

AgentView.SkillRouter is now "none" for an agent whose folder takes the
router but has nothing listed (Applied.Router false), and the Skills tab
names those agents, and the agents that have skills of their own the
library lacks, under the switch (.lib-hub-why data-why none / found). Four
languages (zh, zh-TW, ja, de). docs/subsystems/skill-router.md updated.

Run on mote: go test -tags nogui ./internal/library (ok, 260s);
skill-router.test.cjs in chromium and webkit, all four languages, narrow
and wide (22 pass, with the new found line asserted); go test ./internal/gui
Asset/Budget/Script ok; gofmt clean; go vet nogui darwin/linux/windows clean.
Broken by hand: sync.go back to the parent, TestSkillRouterLastSkillUnticked
goes red ("nothing listed, the view says on").
GUI i18n-*, library-*, skill-* files: all green except skill-fold-all and
skill-manual, red on origin/main from the window's /api/update/using POST
(#5982, not this change).
Not tried: a real agent on Windows; the reporter gave no agent, OS or
version, so the cause for their machine is inferred, not confirmed.
2026-11-13 10:53:40 +08:00
yetone 5a0e0378c0 plugins: Discover draws only the cards near the view in a long list
The owner, 11-13: "这个页面有点卡,记得做列表虚拟化" (Plugins › Discover with
Subscriptions picked, 369 cards). Every redraw of Discover's body (npm's
numbers coming in, a count changing) made all of them again.

A grid of 48 cards or more (a kind picked, a search that matches hundreds,
npm's hits) now draws only its rows near the view, 700px past each edge,
and keeps the whole list's height in its padding above and below. The rows
follow the scroll and the width (a ResizeObserver on the page): columns are
read from the grid's own computed columns, so narrow widths and every
language lay out as before. Row heights are measured as they are drawn. A
card with focus stays in the page, held where it would be, so keys go on
from it. Cards are made once per list and kept, so a click lands on the
same node. A list shorter than 48 is drawn whole, as before.

The code is in plugingrid.js, imported when Plugins first draws, so the
core doesn't grow: TestCoreScriptBudget was 3,299 bytes over with it in
plugins.js. Until the import lands, a long list is drawn whole, and the
body is drawn again once it has.

Measured with plugin-discover-virtual.test.cjs's PERF=1 on mote (load
~25 to 55, so the times are high). The time is from the Subscriptions
click to the cards drawn, with a market of 503 plugins (370 subscriptions).
- Before (origin/main): chromium 69.0ms at 1180px and 56.5ms at 420px,
  webkit 77ms and 74ms. 370 cards and 9,312 nodes in #view-plugins.
- After: chromium 6.2 to 9.7ms, webkit 10 to 13ms. 30 cards and 810 nodes
  at 1180px, 10 cards and 312 nodes at 420px (de: 9 and 285).

Guard: plugin-discover-virtual.test.cjs (new), in chromium and webkit, in
en, zh, zh-TW, ja and de, at 1180px and 420px. It checks:
- at most 72 cards are drawn, and the list keeps its whole height;
- wheeling to the middle never shows an empty stretch, and the focused
  card is kept;
- at the bottom pv-369 is in view and its Install posts its spec;
- "pv-12" lists all 11 matches, and "pv" draws at most 72;
- nothing scrolls sideways, and there are no page errors.

Broken by hand: VMIN at 1e9 (every list drawn whole) turned it 22 of 22 red.

Run on mote at this tree, before the rebase (mote-run):
- go test ./internal/gui: ok (the budget too). gofmt -l: nothing.
- plugin-discover-virtual: 22 of 22.
- Every GUI file that draws plugin cards or Plugins (the 54 that grep finds
  pm-card, view=plugins or pluginAgentsTo), with i18n-keys and
  i18n-en-no-cjk: all pass, except the reds below.
Reds, the same at origin/main be8e352a2:
- settings-lines-wrap: chromium de 440px (#6353).
- old-webkit: headerpresets.js isn't in the list (#6030), and app.css
  uses :has() (#5919). Its plugingrid.js entry is added here.
- title-bar-tools: webkit ja went red once in the first run, then passed
  10 of 10 when run again (#2740, #4716).

Run again at this commit, rebased on origin/main 7583ed65c (mote-run).
plugin-discover-virtual 22 of 22. plugin-market, plugin-kinds-discover,
plugins-more-discover, plugin-progressive, i18n-keys and i18n-en-no-cjk
all pass. TestCoreScriptBudget passes. Reds, the same at 7583ed65c run
alone:
- TestProviderInfoReadsTheListOnce: a row is ~10 lists against a bound of
  5 (#6375, filed now).
- plugin-card-update: webkit red 1 of 2 on both trees (#3079).
- old-webkit: as above (#6030, #5919).

Not tried: the real app on Linux WebKitGTK, and the real market from
usemagpie.ai.
2026-11-13 06:08:46 +08:00
yetone 66f98d9d65 gui: the add sheet's tools show in the title bar once scrolled out of sight
The owner, 11-12, on the Providers page's Add sheet: 向上滑动,然后这些区域
不在可视区域的时候,这些区域应该自动浮现在Header处. Beside the sidebar
(side-nav, a window 1024px wide or more), the sheet's search, Custom
provider and Import… now show in the title bar's empty right, left of its
buttons, once the sheet's head row has scrolled out of sight. They are put
there the way Library's, Plugins' and Settings' tools are: position: fixed
inside --tools-l/--tools-r/--top-h, which app.js tools() keeps out of the
crumb's way (its head query now includes #addSheet .add-tools.afloat).
Scrolled back up, they are in their row again. Close stays in the sheet;
the screenshot's box didn't cover it.

The group is pinned, never copied, so there is one search: the words typed
and the focus stay with it both ways. Each change is a 180ms fade in going
into the bar and 140ms coming back, cubic-bezier(.23, 1, .32, 1), opacity
only, so reduced motion keeps it. Nothing moves in the sheet: the head row
keeps its height while its tools are up.

Narrow (no sidebar, which covers 420px and the panel): the bar has no free
room, so the sheet's whole head (label, tools, Close) is held at the top of
the page while the sheet is under it, the way Settings' head is in a narrow
window. It has the same blur strip and a hairline once stuck. At 760px and
under, the tools take a line of their own under the label.

The code is in a new addfloat.js, which renderAdd imports the first time the
sheet opens. In app.js it took TestCoreScriptBudget 487 bytes over
(1266031 > 1265544); with the move the budget passes and isn't raised.
old-webkit's list of scripts loaded on demand names it.

Run at 39ac4fafe (on origin/main 2d2333cfa), then again after rebasing on be8e352a2:
- New add-sheet-float.test.cjs: 22/22 (chromium and webkit; en, zh, zh-TW,
  ja, de; 1100px and 420px). It scrolls with the real wheel. In the bar,
  it checks the search is in the title bar left of its buttons and right
  of the crumb, with Custom provider and Import… there too; narrow, that
  the head is held at the top. Then: the search is clear to press, a click
  scrolls nothing and takes the focus, typing "Relay 2" filters the tiles
  with one search kept, and scrolling back puts it in its row with the
  words and focus.
- Red on the old code (git archive of the base's internal/gui): 0/22, on
  "in the bar once out of sight" (wide) and "the head held at the page's
  top" (narrow).
- go test ./internal/gui -run Budget: ok (mica).
- Related GUI files on mote, both engines, 380 tests, 376 pass: add-sheet,
  add-sheet-custom, add-button, add-partners-shine, add-sponsor-me, the six
  providers-*, i18n-keys, provider-detect-draft, provider-env-paste,
  provider-add-gemini, provider-retrieval-only, provider-url-each-api,
  modal-title-drag, model-id-space, builtins, old-webkit. The four reds are
  filed and come from other changes:
  - add-sheet "quiet rows" chromium en: tlscerts.js reads a null draft's
    serverPin (#6216). It was red in en, and in zh after the rebase, both times
    beside other files. Alone, chromium, 2/2 green on origin/main and 2/2 here;
  - old-webkit: headerpresets.js isn't in its list (#6030);
  - old-webkit: .side-foot:has() in app.css (#5919).
- After rebasing on be8e352a2: Budget ok; add-sheet-float, add-sheet,
  old-webkit and i18n-keys 34/38, the same three filed reds.
- i18n-keys first ran out of memory under mote-run -C internal/gui: it
  walks ../../.., which there is all of ~/runs. Run from the tree's root:
  4/4.

Not tried: the real app (Wails on macOS, WebKitGTK on Linux, WebView2 on
Windows). Only Playwright's engines were run, so the title bar's dragging
around the pinned tools (--wails-draggable) wasn't checked in a real
window.
2026-11-13 05:08:10 +08:00
yetone 046a131304 gui: an agent's Long conversations is one row, and its context window is picked
The owner (11-12): an agent's sheet showed Long conversations twice, every
agent's row above the agent's own, which read as the same setting twice.
Now the sheet shows one row, the agent's own (.own-compact hides
#fullContextRow there). It shows the agent's own value, else every agent's,
and a change posts settings/agent-compact {agent, own: true, full, at}, so
it is that agent's alone. Settings keeps every agent's row for when no agent
holds one. The Context card's note says "Long conversations in {agent}" when
the agent holds its own value (context.js), in en/zh/zh-TW/ja/de.

The agent's context window (agentwindow.js) is picked, never typed as a
syntax: one size for all its models from the app's menu (Each model's own,
128K to 1M, Other size… typed as 300k), and "Set a model apart" adds a
model from the agent's model picker with its own size, a line each, with a
remove button.

Tests rewritten to the one row, keeping what each guarded:
- compact-one-value: Tuned for you and Long conversations are one window,
  now through the agent's own value and its post.
- codex-compact-held: Codex's held values are under the agent's row.
- agent-prefs: what an agent's opened row and its panel sheet show
  (#fullContextRow hidden, .row.agent-compact visible).
- compact-at: a typed size posts settings/agent-compact for Claude Code,
  and never settings/full-context.
- codex-memories-settings "no Codex, no memories row": waits on the
  merged row, lists the visible rows in its message.
- agent-compact, agent-window: the new row and the picker.

Run on mote (macOS, Playwright 1.62.0, chromium + webkit, every language
each file covers, narrow and wide), at f9bc297a5 + this change; origin/main
then rebased (main has since changed app.css and app.js; see below):
- go test -run 'TestCoreScriptBudget|TestAssetBudget' ./internal/gui: ok
- agent-window 20/20, agent-compact 8/8, compact-one-value 12/12,
  codex-compact-held 20/20, agent-prefs 56/56, claude-cache 8/8,
  context-tune 284/284, compact-at 8/8, settings-general 20/20,
  i18n-keys 4/4, i18n-en-no-cjk 4/4
- codex-memories-settings 8 pass / 10 fail; after the no-Codex fix that
  subtest passes 2/2. The other 8 (chromium "picking a model scrolled the
  page 944 !== 1056") fail the same on origin/main dbaf9d68c: #6372.
- agent-details-ready 4 pass / 32 fail, the same on origin/main dbaf9d68c
  ("Details must end without a height jump: 772.98 -> 852.92"): #6373
  (#6369 is the late-settings subtest).

Again at this commit on be8e352a2: the budgets ok, agent-window 20/20,
agent-compact 8/8, compact-one-value 12/12, codex-compact-held 20/20,
agent-prefs 56/56, compact-at 8/8, i18n-keys 4/4.

Broken by hand, each red, then put back:
- .own-compact > #fullContextRow removed and the card note back to the
  shared words: compact-one-value 12/12 red, agent-prefs red (en/zh, 1100
  and 440, panel). codex-compact-held stayed green; it checks the held
  values sit in the agent's row, which still holds them.
- own: true dropped from the agent-compact post: compact-at 4/8 red,
  agent-compact red, compact-one-value red.
- "Set a model apart" not drawn: agent-window red.

Not tried: the real app, and a real Codex or Claude Code session reading
the agent's own compaction size.
2026-11-13 05:07:32 +08:00
yetone be8e352a20 editor: Proxy takes no room unless Custom is picked
The owner (11-12, "这些空白看起来好难受"): the Custom address and its login
were visibility:hidden while not picked, so each account kept an empty
strip (43px) between its proxy segs and the next account's name. They are
display:none now, so the gaps are even. proxy-gaps measures the segs'
bottom to the next element's top at 900 and 420 in every language;
account-proxy's no-move check now covers the lines above the pick.

Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
  26/26; routing-advanced, proxy-gaps, login-export, routing-save,
  key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
  routing, export): 698/730. The same reds on origin/main 2d2333cfa:
  checkin-now-account (#6029), editor-advanced-align (#4615),
  settings-lines-wrap chromium de 440 (#6353), account-arrange (#6010).
  Flakes under the concurrent run: ResizeObserver page errors in
  checkin-account and codex-auto-reset-settings (commented on #6108),
  provider-advanced-fold webkit zh growth (#2552, #5417),
  proxy-login-fields chromium zh click (#6374, 5/5 alone here and on
  main). Two passes over those five files again: only proxy-login-fields
  chromium zh, once.
- i18n-keys green (no strings added).

Broken by hand, each red:
- dialog: without `.row.pref { position: relative }` account-weight
  goes red in both engines ("the dialog scrolls beside the editor
  (945,810)").
- Routing back on the editor (ed.append): routing-advanced 10/10 red.
- Export with the plus again: login-export red ("Export has the plus").
- Proxy's .off back to visibility:hidden: proxy-gaps 20/20 red ("43px
  under the provider's options").

Not tried: the whole GUI suite (another session's full suite was on
mica, mote over load), the real Linux WebKitGTK app, Windows. No Go
changed.
2026-11-13 04:51:59 +08:00
yetone c21683cbf2 editor: Export accounts is the last account row, with an export glyph
The owner (11-12): Export accounts to a file goes last of the four account
rows, after Add an account by setup-token, and has an arrow out of a tray
instead of the plus: it adds nothing. login-export checks both.

Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
  26/26; routing-advanced, proxy-gaps, login-export, routing-save,
  key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
  routing, export): 698/730. The same reds on origin/main 2d2333cfa:
  checkin-now-account (#6029), editor-advanced-align (#4615),
  settings-lines-wrap chromium de 440 (#6353), account-arrange (#6010).
  Flakes under the concurrent run: ResizeObserver page errors in
  checkin-account and codex-auto-reset-settings (commented on #6108),
  provider-advanced-fold webkit zh growth (#2552, #5417),
  proxy-login-fields chromium zh click (#6374, 5/5 alone here and on
  main). Two passes over those five files again: only proxy-login-fields
  chromium zh, once.
- i18n-keys green (no strings added).

Broken by hand, each red:
- dialog: without `.row.pref { position: relative }` account-weight
  goes red in both engines ("the dialog scrolls beside the editor
  (945,810)").
- Routing back on the editor (ed.append): routing-advanced 10/10 red.
- Export with the plus again: login-export red ("Export has the plus").
- Proxy's .off back to visibility:hidden: proxy-gaps 20/20 red ("43px
  under the provider's options").

Not tried: the whole GUI suite (another session's full suite was on
mica, mote over load), the real Linux WebKitGTK app, Windows. No Go
changed.
2026-11-13 04:51:59 +08:00
yetone 8f7ddb9e06 editor: Routing, Rate limited and Stays fold under Advanced
The owner (11-12): these are changed by few, so they sit at the top of the
editor's Advanced fold, collapsed by default. The fold opens on its own
when one isn't its default (routing, affinity or sink set), unless the
user already opened or closed it for this provider. Tests that pick a
routing seg open Advanced first; routing-advanced checks where the three
sit and when the fold opens, for a subscription and a relay.

Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
  26/26; routing-advanced, proxy-gaps, login-export, routing-save,
  key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
  routing, export): 698/730. The same reds on origin/main 2d2333cfa:
  checkin-now-account (#6029), editor-advanced-align (#4615),
  settings-lines-wrap chromium de 440 (#6353), account-arrange (#6010).
  Flakes under the concurrent run: ResizeObserver page errors in
  checkin-account and codex-auto-reset-settings (commented on #6108),
  provider-advanced-fold webkit zh growth (#2552, #5417),
  proxy-login-fields chromium zh click (#6374, 5/5 alone here and on
  main). Two passes over those five files again: only proxy-login-fields
  chromium zh, once.
- i18n-keys green (no strings added).

Broken by hand, each red:
- dialog: without `.row.pref { position: relative }` account-weight
  goes red in both engines ("the dialog scrolls beside the editor
  (945,810)").
- Routing back on the editor (ed.append): routing-advanced 10/10 red.
- Export with the plus again: login-export red ("Export has the plus").
- Proxy's .off back to visibility:hidden: proxy-gaps 20/20 red ("43px
  under the provider's options").

Not tried: the whole GUI suite (another session's full suite was on
mica, mote over load), the real Linux WebKitGTK app, Windows. No Go
changed.
2026-11-13 04:51:59 +08:00
yetone 62044305e3 editor: a check-in or warm-up row holds its hidden line, so the dialog grows no second scrollbar
A provider's check-in and warm-up rows keep a .sub line out of sight,
position:absolute under hover. Their .who is display:contents and has no
box, so the line was held against the .dialog: with Advanced open the
dialog grew a scroll of its own (e.g. 1117 over 810) beside the editor's,
and in WebKit every row was 8px narrower (de 560 "Gewicht 3 · 75%" ran
2px past its row). Happens on main whenever Advanced is opened. The row
is now the line's containing block. account-weight opens Advanced and
checks the dialog doesn't scroll.

Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes
languages; mote was over 18 load every check):
- The four changes together: account-weight, account-proxy, routing-js
  26/26; routing-advanced, proxy-gaps, login-export, routing-save,
  key-weight green; account-arrange red as on main (#6010).
- About 40 files around the editor (prefs, check-in, warm-up, proxy,
  routing, export): 698/730. The same reds on origin/main 2d2333cfa:
  checkin-now-account (#6029), editor-advanced-align (#4615),
  settings-lines-wrap chromium de 440 (#6353), account-arrange (#6010).
  Flakes under the concurrent run: ResizeObserver page errors in
  checkin-account and codex-auto-reset-settings (commented on #6108),
  provider-advanced-fold webkit zh growth (#2552, #5417),
  proxy-login-fields chromium zh click (#6374, 5/5 alone here and on
  main). Two passes over those five files again: only proxy-login-fields
  chromium zh, once.
- i18n-keys green (no strings added).

Broken by hand, each red:
- dialog: without `.row.pref { position: relative }` account-weight
  goes red in both engines ("the dialog scrolls beside the editor
  (945,810)").
- Routing back on the editor (ed.append): routing-advanced 10/10 red.
- Export with the plus again: login-export red ("Export has the plus").
- Proxy's .off back to visibility:hidden: proxy-gaps 20/20 red ("43px
  under the provider's options").

Not tried: the whole GUI suite (another session's full suite was on
mica, mote over load), the real Linux WebKitGTK app, Windows. No Go
changed.
2026-11-13 04:51:59 +08:00
yetone 3d4c8edcea gui: Open the Codex app is in Codex's row menu, not a button on its row
ee1553913 (Yink88564391 on X) put an Open button on Codex's Agents row,
between its Details and its model picker, so that row's Details sat
further left than every other row's (the owner, 11-13: "导致整个页面在
视觉上不是对齐的"). The button is gone. Codex's row menu, beside Open in
terminal, has "Open the Codex app" where the desktop app is installed
and Open Codex with doesn't say Terminal (openApp); it posts agents/open
with the id alone as the button did. With no app, Open in terminal is
the menu's only way, as before the button. The tray panel and the web
build have neither. Its CSS and the "Open Codex in a terminal" words go;
comments and the setting's error say "Open Codex with", not the button.

codex-open-button.test.cjs now opens the menu, and checks every
connected row's Details and model picker start at one x.

Run (mica): GUI codex-open-button 62/62, agent-open-terminal 24/24,
agent-prefs 56/56, i18n-keys, i18n-en-no-cjk, chromium and webkit,
en/zh/zh-TW/ja/de, 900 and 400px; go vet internal/gui, settings,
provider; go test internal/gui, settings, provider, agent -run
"Codex|Budget|Settings" ok; gofmt clean.
Broken by hand: the button put back on the row turns the line-up check
red (codex 479 vs claude 532 at 900px, every language).
Again at 5c1c38f63 after the rebase onto dbaf9d68c (mica): codex-open-button 62/62,
i18n-keys, go test internal/gui -run "Budget|Codex" ok.
Not tried: a real Codex app open from the menu; Windows and Linux.
2026-11-13 04:22:45 +08:00
yetone 1281046a02 gui: the Library's Variables tab is called Environment variables
What it holds are environment variables an agent starts with, and
"Variables" alone read as something else (the owner: 应该叫环境变量).
The tab, its empty line, its add buttons and the new item's sheet say
environment variable in en, zh, zh-TW, ja and de (环境变量 / 環境變數 /
環境変数 / Umgebungsvariablen). "Environment variables" moves into the
core i18n.js: otel's page uses the same words, and i18n-keys keeps a
plugin's words its own.

Run (mote, at origin/main ff8b43711 plus this change): library-env 12,
library-hooks 12, library-loading 6, library-subagents 12, i18n-keys 4,
i18n-en-no-cjk 4, all ok, chromium and webkit, every language.
Broken by hand: client.js back to t("Variables") turns library-env 12
of 12 and library-loading 2 of 6 red.
library-loading was red on main before this (#6204, the Claude plugins
tab); fixed in its own commit ff8b43711.
Not tried: the whole GUI suite, the real app.
2026-11-13 04:09:39 +08:00
yetone 32d6be0d05 gui: Memory has a brain of its own, in the sidebar and on its requests
The owner (11-12): Memory should have its own icon, a brain. The
Library's Memory tab had a bookmark, and Memory's own requests (the
conversations it reads into memories, made as memdistill.Agent
"memory") were drawn in Routing's graph, Usage and Sessions with the
generic cube under their raw id, since "memory" was no client.

- icons/memory.svg: a brain, 16-grid, stroke 1.4 with round caps and
  joins, as the sidebar's marks are; drawn as a one-tone mask.
- navicons.js: the Library's Memory tab draws the same path.
- agent.others: a client "memory", named Memory, with that icon, so
  /api/state's clients and agent.Looks (Usage, Sessions) name and draw
  it. It has no User-Agent: its requests are known by their token.
- TestEveryClientHasNameAndIcon: memdistill.Agent is among the ids the
  gateway records, so it must be a client with a real icon.
- tests/memory-icon.test.cjs: the sidebar's Memory tab draws the path
  icons/memory.svg has (and no other tab does), and a request from
  "memory" in Routing is drawn with the memory mask, not the cube.
  Chromium and WebKit, en/zh/zh-TW/ja/de, 1100 and 420px (no sidebar at
  420px, so there the request only).

Run on the tree rebased onto ff8b43711 (same five-file diff; the go packages and the four GUI files first ran at fa7e466ac and again here: TestEveryClientHasNameAndIcon ok, 42 of 42) (mote; mote was at load ~27 and mica ~43, mote was the less loaded):
- go test ./internal/agent ./internal/gui ./internal/memdistill
  ./internal/usageapi: ok.
- node --test memory-icon nav-sub-icons routing-client-icons i18n-keys:
  42 of 42 ok, both engines.
- go vet: darwin agent+gui; GOOS=linux agent (gui needs cgo for wails
  on linux); GOOS=windows agent+gui: ok. gofmt -l clean.

Broken by hand (origin/main fa7e466ac with the new tests):
- TestEveryClientHasNameAndIcon: "the gateway records requests as
  memory, which isn't among the clients".
- memory-icon.test.cjs with no icons/memory.svg: 2 of 2 red; with the
  svg but the old bookmark path: 12 of 22 red, every 1100px case.

Not tried: the real app on any OS; Codex's own memories model row
(MEMORIES in app.js) keeps its notebook, as it is Codex's memories, not
Magpie Memory. The Magpie Memory MCP server keeps magpie's favicon, as
magpie's other servers do.
2026-11-13 04:08:39 +08:00
yetone ff8b437117 gui tests: library-loading's tab lists include Claude plugins (#6204)
6af54dc9a gave the Library a Claude plugins tab after Subagents, always
shown, and library-loading's two tab lists were not brought along, so
the test was red in chromium and webkit on main since 11-11.

Run (mote): library-loading 6/6 ok, chromium and webkit, 980px and
420px. Before the change, at origin/main af7edcc02: 2 of 6 red (the two
tab lists), the same red #6204 names.
Not tried: the rest of the GUI suite; only this test file changed.
2026-11-13 04:05:42 +08:00
yetone 0e181b6f88 gui: the saved-proxy form's fields are the app's own, and no field falls back to the browser's
The owner, 11-12, on Settings › Network › Proxies › Add (Name,
http://127.0.0.1:7890, Username (optional), Password (optional)): "输入框
太简陋了。根本就不是我们整个产品的输入框组件。" proxyFormRow gave its
four fields only the class proxy-credential, which sizes them in
.proxy-form and styles them nowhere, so they drew as the browser's white
inset boxes on either theme. They are input.words now, the same field as
the gateway address and the share password on that page.

The class: app.css gets a :where() base rule (zero specificity) for every
text input and textarea: 1px var(--line) border, 7px radius,
var(--card) background. Any rule that names a field still wins, so a
field only takes it where it had the browser's look before.

input-look.test.cjs opens every Settings part (Network with the
saved-proxy form open and each Custom proxy pressed), a custom provider's
editor and a signed-in Codex editor (every fold open, each Custom proxy
pressed), and a routing group's editor (every fold open). No visible
text field may have an inset/outset border, or a white background on the
dark theme, and an input no rule names, put into the group editor, must
not be inset. Chromium and WebKit, en zh zh-TW ja de, 1100 and 420px,
light and dark.

Run on mote (mote-run), at 648cd3fdb plus this change:
- node --test input-look saved-proxies settings-proxy-auth
  proxy-login-fields provider-proxy account-proxy checkbox-look
  i18n-keys: 108 of 108 ok (input-look 20 of 20, both engines).
- Computed styles (background, border, radius, padding, size) of every
  visible input on the pages above, and of every view's inputs (agents,
  providers, groups, gateway, usage, redact, library, plugins, sessions,
  routing) in dark Chromium, diffed before and after: only the four proxy
  fields changed, and the Plugins search (borderless, transparent) took a
  7px radius that draws nothing. One group-editor pattern field's width
  moved by 10px, beside a button; no field rule changed there.

Again after rebasing onto 1729e1193 (the group editor's keys and masking
moved under Advanced): input-look, i18n-keys, group-redact and
saved-proxies, 74 of 74 ok.

Broken by hand: app.css and proxies.js put back to 648cd3fdb, the test
red at en 1100px: the four proxy fields inset and white in dark and
light, and the unnamed probe field inset.

Not tried: the real app's WebKitGTK and WebView2; the TUI has no such
form. Sheets outside those listed (agent settings, sign-in sheets) are
covered by the base rule but not opened by the test.
2026-11-13 04:05:37 +08:00
yetone af7edcc02a gui: the Library's project section is titled by what it holds
The owner (11-12): the MCP tab's 项目中 ("In projects") read oddly over
the servers a project gets. The heading now says what the section is:
"Project servers" on the MCP tab and "Project skills" on the Skills tab,
which shares the section (项目服务器 / 项目技能, 專案伺服器 / 專案技能,
プロジェクトのサーバー / プロジェクトのスキル, Projektserver /
Projekt-Skills).

Run on mica, at this tree: project-servers, project-skills-groups,
project-scope, library-mcp-agentless, library-all, i18n-keys and
i18n-en-no-cjk, chromium and webkit: all ok (6, 12, 6, 22, 26, 4, 4).
project-servers checks the heading in en and zh, project-skills-groups
in every language. Broken by hand (t("In projects") back): both go red,
6 of 6 and 12 of 12.

Not tried: the real app; the change is the heading's words.
2026-11-13 04:03:55 +08:00
yetone 5c00da3b25 gui: a group's note says it is optional
The owner (11-12): the note field under a group's name read as one more
thing to fill in. Its placeholder now starts with "Optional", in every
language: 可选,例如:给工作 Key 用 and the like.

Run on mica, at this tree: group-note, group-keys, group-redact and
i18n-keys in chromium and webkit, every language, 1100 and 420px: 86 of
86 ok. Broken by hand (the old placeholder back): group-note goes red.

Not tried: nothing beyond the GUI tests; the change is the placeholder's
words.
2026-11-13 03:59:08 +08:00
yetone 109559913a gui: a group's gateway keys and masking sit under Advanced
The owner (11-12): few people bind a group to gateway keys or change how
it is masked, so the group form showed two rows most never touch. Both
rows now sit in the group's Advanced fold with the rest of what is set
rarely, and the fold opens by itself when either is set, so a bound or
masked group still shows it.

Run on mica, at this tree: group-keys, group-redact, group-note and
i18n-keys in chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 420px:
86 of 86 ok. Broken by hand (the two rows back at the form's top level):
the keys, redact and note tests fail, 50 of 82 red.

group-redact now reaches its chip with reader.cjs reach(): Playwright's
scrollIntoViewIfNeeded is put back by the app's scroll hold at 420px,
which made it click the wrong place there. It also checks the click does
not move the page.

Not tried: the real app with real gateway keys.
2026-11-13 03:59:08 +08:00
yetone fa7e466acd gui: Settings' gateway row is titled a port when a port is what it takes
The owner (11-12): the row over a field that takes 3425 read 网关地址
(Gateway address). Only the port is typed there; it is titled Gateway
port (网关端口, 閘道連接埠, ゲートウェイのポート, Port des
Zugangspunkts), and the field's aria-label with it. With MAGPIE_ADDR set
the field shows the whole host:port, off, and the row keeps Gateway
address, as Chicring asked before.

Run (mote, both engines): gateway-port, i18n-keys, i18n-en-no-cjk, 14
of 14 ok.
Broken by hand: settings.js put back as on origin/main, gateway-port red
in both engines (expected 'Gateway port').
Not tried: the real app.
2026-11-13 03:55:09 +08:00
yetone 2bcbae35ef gui: Partners' heading in the Add sheet ends in "Become a sponsor"
The owner asked for an elegant sponsor button at the right of the Add
sheet's Partners heading (在右边加上一个优雅精致的我要赞助的按钮). It is a
quiet pill with an accent heart outline: 我要赞助 / 我要贊助 /
スポンサーになる / Sponsor werden. Hover changes colour and border with
`ease`, gated to a fine pointer, and :active scales to .97.

A click opens the same mail usemagpie.ai's "Become a sponsor" writes
(mailto:yetoneful@gmail.com?subject=Sponsoring%20magpie). /api/open lets
through that one exact link (sponsorMail), not mailto: at large. Web mode
sets location to it.

The heading and the button share a .kind-row. The heading keeps its own
box, so the Partners shine still wraps only the words. The shine test now
finds the tiles after that row.

Run on mica (mote was at load 33-57):
- node --test add-sponsor-me, add-partners-shine, add-sheet: Chromium and
  WebKit, en/zh/ja/de at 900 and 440px. The new file and the shine file
  are green.
- add-sheet chromium is red 1 of 3 with "Cannot read properties of null
  (reading 'serverPin')". It is red 1 of 3 on untouched origin/main
  f0571d7da too, and is filed as #6216.
- i18n-keys and i18n-en-no-cjk pass.
- go test ./internal/gui -run 'Budget|Sponsor|LoginNeeds' passes
  (TestCoreScriptBudget included).
- go vet ./internal/gui passes on darwin, on GOOS=windows, and on
  GOOS=linux with -tags nogui. gofmt -l is empty.
- Screenshots: zh light and dark at 900, en and de at 440, at rest and
  on hover.

Broken by hand, on mica at the rebased head (1f9d2c36c):
- With the allow taken out of /api/open and the constant changed,
  TestSponsorMailOpensThatAddressOnly goes red. It reports that the link
  opened nothing and that app.js doesn't name the link.
- Its cases also check that another address, a changed subject, an
  appended body and MAILTO in capitals stay closed.
- At the rebased head, go test -run 'Budget|Sponsor|LoginNeeds' passes
  again.

Not run: the whole GUI suite. mica was running another session's suite
and mote was over its cores. Not tried in the real Wails app: whether
the system's mail client opens.
2026-11-13 03:43:10 +08:00
yetone 926b1e7dfb provider, gui: put back what 8c7328f3a took out of main by mistake (35aaaa4b9, 2fa79aef3, 797a23cad)
8c7328f3a (remote quotas: a Remote set to Select none still tells its
cards) was committed from a stale tree. Beside its own three files
(docs/subsystems/providers-accounts.md, remote_quotas_scope.go,
remote_quotas_test.go) it wrote 21 files back to their state before
35aaaa4b9, which took out:

- 35aaaa4b9, the Codex client setting (codex_request.go, codex_tier.go,
  settings.go, settingsapi.go, api.go, app.js, i18n.js, index.html,
  codex-client.test.cjs and the rest);
- 2fa79aef3, a save of the bytes a file already holds changes nothing
  (#6289: logins.go, logins_unchanged_test.go);
- 797a23cad, the tray's words (traywords.go, traytip_words_test.go).

The 21 files are checked out from 8c7328f3a^. After this commit
`git diff 8c7328f3a^ --stat` names only the three remote-quota files,
so main is the three lost commits plus 8c7328f3a's own change.

Run (mica, at this tree): gofmt -l clean; go test -count=1 -tags nogui
./internal/provider ./internal/settings ./internal/settingsapi ok.
./internal/cli and . are red on main already, not from this: the
codex-client and codex-open routes have no notYet entry, and
catalog.go's mmddSnapshot is compiled at launch (1ca2c62c4). Both are
fixed in the next two commits.
2026-11-13 02:00:40 +08:00
yetone f1f512c1ec library: a repository's heading folds an agent's profiles into one chip, and a row's profiles chip lines up with the hand (Yanzhongixuy on X)
0.1.3926, several Hermes profiles: the Skills page's source headings
(anthropics/skills ...) drew one icon per profile, a long strip, and the one
chip 2a1111cba made on a row sat out of line. That commit said "Rows only":
groupChips never set change.rows, so headings kept every profile. The row's
chip had data-members, not data-agent, so the fan/stack translate rules in
library.css never reached it.

groupChips now sets change.rows, and its profiles chip is half lit when a
profile has some of the skills. library.css applies the fan rules to
[data-members] chips too. docs/subsystems/library.md says so.

Files: plugins/library/client.js, plugins/library/library.css,
tests/library-profile-group.test.cjs (new), docs/subsystems/library.md.

Run on mote: library-profile-group.test.cjs (new; chromium + webkit, en/zh/
zh-TW/ja/de, 420 and 980px, 22 cases): 22 of 22 green; broken by hand (old
client.js and library.css) 22 of 22 red (13 Hermes chips, not 1); old
library.css alone 22 of 22 red (chips out of line). The Library GUI files,
group-skill-chips and i18n-keys ran in both engines: the only reds are
library-loading's chromium and webkit cases, red on origin/main
8c7328f3a6 too (run there alone, 2 of 6
red), filed as #6204.
Not run: the full Go suite and the 113-file GUI run's final tally (still
running when pushed), Linux WebKitGTK, a real Hermes install with many
profiles.
2026-11-13 01:42:52 +08:00
yetone 8c7328f3a6 remote quotas: a Remote set to Select none still tells its cards (@LOYSoLuI4PG4WlN on X)
On 0.1.3929 a Remote magpie added for the Usage page's quotas showed none
of the remote's subscriptions any more. cfd49e36a made a Remote's cards
follow its enabled models, and remoteCardWanted answered no card at all for
a provider that serves no model (Select none). Select none is documented to
serve no model while its balance and usage are still read and shown
(Provider.NoModels), and a Remote kept only to read quotas is set that way.
Now every card is wanted then; picks still narrow cards by their whole
provider path (93b855d90), and a list not read leaves all shown.

Run (mote): TestRemoteSelectNoneStillShowsItsCards is red on origin/main
797a23cad's scope file put back by hand ("map[]") and green with the fix;
-run 'Remote|Quota|Card' in internal/provider and internal/gateway ok;
go vet darwin/linux/windows of both packages ok; gofmt clean. GUI: remote-*,
usage-*, routing-remote-windows, panel-usage*, name-suffix-remote and
statusline-remote files in chromium and webkit: 74 red, all in usage-agents-hide,
usage-cards-hide, usage-fold, usage-hidden-way-back, usage-ledger,
usage-range-times, usage-speed-all-models, usage-compact-counts and
remote-magpie's address test; the same files are red the same on origin/main
797a23cad (75 red), already filed (#6003, #5475, #3414). The change is Go only.
Not tried: a real second magpie in sandbox HOMEs (a fake peer in the test),
the full Go suite (started after the tag).
2026-11-13 01:25:57 +08:00
yetone 35aaaa4b94 codex: a setting for which client the requests to ChatGPT say they come from, CLI or Codex Desktop (ouhthuo on X)
ouhthuo wants the originator "Codex Desktop", with which, they say, a
high-effort gpt-6.1-sol request is routed to a newer model. magpie sent
codex_cli_rs on every request, and codexSign even overwrote a real Desktop's
own originator.

Settings > Codex > "Codex client" (CLI, the default, or Codex Desktop; the
settings key codexClient is "" or "desktop", POST /api/settings/codex-client,
no free text). codexClientHeaders is the one place that sets originator and
User-Agent, so the model requests, the /wham usage and reset calls, the token
refresh, the device and code sign-in exchanges and "test as" all follow it.
Desktop sends originator "Codex Desktop" and the UA shape codex-rs builds for
it: Codex Desktop/<codex version> (<os>; <arch>) unknown (Codex Desktop; <app
build>). Source: codex-rs login/src/auth/default_client.rs and a captured
Desktop UA. The default is unchanged; base_instructions and the identity
prompt are untouched. The OAuth authorize URL keeps codex_cli_rs.

The row sits in the Codex agent preferences, 5 languages. The two Codex menu
buttons share one helper (codexMenuPick) so app.js stays inside its budget
without raising it.

Run (mote): TestCodexClientSetting (red with codexClientHeaders ignoring the
setting), settings, settingsapi, gui and provider Codex tests ok; gofmt clean;
go vet darwin, windows and linux nogui clean; GUI codex-client,
codex-service-tier, codex-open-button, i18n-keys, i18n-en-no-cjk,
settings-general, click-scroll in chromium and webkit ok. Real Codex account
in a sandbox HOME: gpt-6.1-sol and gpt-6-sol at high effort answer under both
identities with identical usage; the reply's model field only echoes the
requested name, so whether the served model differs can't be told from here.
Red and not mine, already filed: settings-search (#6133, #5982) and
agent-prefs "Settings line" (#6139) fail on origin/main, TestMoveToPlugin
#5524.

Not tried: the real Desktop app (not installed here); the app build number
in the UA is the newest seen in local logs and can go stale.
2026-11-13 01:17:30 +08:00
yetone 227171f69b tests: the tallies fixtures key a seat with a plan as the gateway does (RayYanOnline on X)
routing-acts-calm and routing-acts-idle wrote the day's tallies under the two-part key; tallyKey adds the plan since 2240e5b34 (d6b5f24db), so the page folded a seat's tally and its live request into two cards. They key as the gateway does now. Run (mote): both files in chromium and webkit, 11 and 7 of 7 pass; routing-day-tallies and routing-sign-in-again carry no plan.
2026-11-13 01:06:10 +08:00
yetone 1488762dae settings: MCP server addresses get the This computer / Local network switch (xzhih on X)
Settings > Models showed Image recognition's, Image generation's and Web
search's MCP server at 127.0.0.1 even on a magpie shared on the network.
While sharing is on, each address row now has a switch beside it, This
computer and the far address named as the gateway names it (addrWho: Local
network, Public address, On the internet). The far address is the one the
sidebar uses (sideLAN), so MAGPIE_PUBLIC_URL, container and LazyCat rules
carry over; nothing is copied. The pick is kept (magpie.mcpWhere); an app
starts at This computer as before, a page other machines opened (magpie
web) at the far address. Sharing off: no switch, as before. The Library hub
and the plugin tools line follow the pick through mcpAddress (no switch of
their own).

The two image rows moved from app.js into plugins/gateway/settings.js with
the switch; app.js ends smaller, and the core budget is met.

Run on mote at this tree: mcp-address-lan.test.cjs (new, 22 tests: chromium
and webkit, en zh zh-TW ja de, 1100 and 420px) 22 pass; with mcpAddress's
hook removed 11 of 11 chromium tests fail. vision-mcp, image-mcp,
search-mcp, public-url-default and 98 tests in all pass; the lan/mcp/
gateway/settings/search/vision/image GUI subset (122 files, 2181 tests): 2114 pass, 67 fail; the six failing files I reran (side-effort, settings-hints, settings-search, lan-join, images-codex-one, settings-lines-wrap) fail the same 35 tests on a clean origin/main copy, so they are not from this change; filed separately. The other failing files' names were lost to a tail (not reread). go test
./internal/gui (core budget included) ok; go vet darwin, linux nogui,
windows ok; gofmt clean.

Not run at the rebased head: the Go suite beyond internal/gui; the whole GUI suite and go test ./... (mote and mica both held a
GUI suite; queued after the tag). Not tried: a real LAN server. Library
hub address and the plugin tools line show the picked address but have no
switch of their own; they read it when drawn.
2026-11-13 01:02:07 +08:00
yetone 8097860ab1 gui: put back what 76ceff87c took out of main by mistake
76ceff87c was built on an older base and its tree dropped the Linux
backdrop-blur rule (7c37424fc) and Codex seats change (d6b5f24db) with
their tests, docs and history.go edits. This restores those files from
d6b5f24db; the diff against d6b5f24db is now only the hours feature.
Run: git diff d6b5f24db --stat lists the usage files alone.
2026-11-13 01:01:43 +08:00
yetone 76ceff87c9 usage: a number of hours the reader sets, beside the calendar (eachg0 on X)
The range menu behind Custom has a top row, "[N] hours back". Enter asks
the Usage page for the rolling window last:Nh (1 to 720), which the
backend already answers for every view (totals, chart, models, accounts,
Requests); the chip reads "Last 30 hours". The pick and N are kept on this
device (magpie.usagePeriod, magpie.usageHours). 24 stays the preset's
chip, and an empty page, the credit days and the menu-bar way in know the
new period. zh, zh-TW, ja, de strings added.

Run (mote, at the rebased head): usage-hours, usage-24h, i18n-keys in
chromium and webkit, en and zh. Broken by hand: keptPeriod limited to the
presets turned usage-hours red (expected last:30h, got today).
Not tried: the whole GUI suite (queued on mote's suite.lock behind other
sessions, still running), narrow widths by hand, the tray panel (it has no
24h chip and is unchanged).
2026-11-13 01:00:14 +08:00
yetone d6b5f24db5 routing: Codex seats of one name are not folded into one account card (RayYanOnline on X)
The accounts list on the Routing page folded accounts by provider and name, so a Team seat and a Pro Lite login (or two logins) that carry one email read as a single card, and the day's counts of all of them went to it. An account is now told apart by its plan as well: the page's foldActs key and the gateway's tallyKey add the lowercased plan when it has one; a seat with no plan keeps the two-part key, so stored tallies and fixtures are unchanged. The key still ignores the id, which flips between codex and codex@user when the live login switches.

Run (mote): routing-codex-seats.test.cjs, chromium and webkit, en zh zh-TW ja de: 5 of 5 each. Red on the old client.js (4 cards where 3 are wanted). TestTallyKeyTellsPlansApart and the tallies tests ok; go test ./internal/gui ok; go vet darwin, linux nogui and windows ok; gofmt clean.
Siblings: the TUI draws no account names (no Who use in internal/tui); the combo picker names members from groups.accounts, which already carries the backend's distinct names (email · Team, email · workspace).
Not tried: the reporter's real accounts; the whole GUI suite and the full Go suite are run after the tag.
2026-11-13 00:57:33 +08:00
yetone 7c37424fcf gui: the Linux app draws without backdrop blur, which WebKitGTK repaints on the CPU each frame (Lsheng2012 on X)
Lsheng2012 (CachyOS, KDE, i7-12700H, RTX 3070 Ti Laptop) found the UI laggy.
webkit_linux.go turns accelerated compositing off under Wayland and without a
GPU, and there every backdrop-filter is software-painted for its whole box
each frame. body.linux now drops it on .modal, .pop, the panel's profile
chips, Settings' sticky head and the confirm ::backdrop. Layout unchanged.

Measured (WebKitGTK 2.52.6, Xvfb on magpie-desktop, 240 rAF scroll frames of
600 rows, 1100x760): no blur 16.2ms, sticky head blur 16.2ms, full-window
modal blur(8px) 25.0ms with compositing off (16.4ms with it on).
Run: linux-no-backdrop-blur.test.cjs in chromium and webkit on mote (green;
red with the rule removed by hand), go test ./internal/gui asset tests.
Not tried: NVIDIA, Wayland/KDE, the omarchy VM, a full suite. The sticky head
cost nothing in the probe, so the modal is the measured gain; if the reporter
is still laggy the cause is elsewhere (CPU painting at HiDPI), and we ask for
their session type, driver and version.
2026-11-13 00:47:41 +08:00
yetone ee1553913d gui: Codex's Agents row has an Open button, for the app or the terminal by a setting (Yink88564391 on X)
The Codex row on the Agents page now has an Open button beside the start
button. It opens the Codex desktop app (mac and Windows) when it is
installed, else Codex's CLI in a terminal. "Open Codex with" in Codex's
details (Automatic, Codex app, Terminal) picks which; it is this computer's
own setting (settings.CodexOpen, kept across a sync and a Settings save).
The row menu's Open in terminal still opens the terminal. The web build has
no button.

Run (mica): go test internal/gui, agent, settings, settingsapi, provider
ok; gofmt clean; GOOS=windows vet and GOOS=linux -tags nogui vet clean;
GUI codex-open-button (62), agent-open-terminal (24), i18n-keys,
codex-service-tier in chromium and webkit, en/zh/zh-TW/ja/de, narrow.
agent-prefs lists the new row.
Broken by hand: codexOpensApp always false turns TestCodexOpenButton red.
Budget: coreScriptBudget +1,112 for this code, packed small, no page to
move it to.
Reds on main before this change, same count at e18aca103 without it:
agent-details-ready (16 chromium), gui-ja and gui-de (one string),
agent-prefs panel-sheet test (5 chromium), and from 4e0026661
plugin-signed-out-account, plugin-signin-no-url, saved-signedout-remove,
signin-proxy. Not caused here; not fixed here.
Not tried: a real Windows launch of the Codex app, a real macOS app open,
Linux.
2026-11-13 00:11:20 +08:00
yetone 6edf7a69e5 usage: hide and show single quota rows of an Overview card (wangshaowei39 on X)
Antigravity's card lists Claude & GPT, Gemini and more. A row group can now be
hidden from Usage > Overview the way a card can: right-click or long-press a
row, or use the card's "..." menu, and choose "Hide <group> from Overview". The
"Hidden" line under the cards lists hidden cards and rows with an Unhide button
and Show all. The last group of a card cannot be hidden (use the card's own
hide). Persisted as settings usageWindowsHidden ("<card>|<group>"), changed
through /api/usage/arrange { windowsHidden } and kept by the Settings save.
Table view and tray panel are untouched.

Run (on mote):
- go test: TestUsageArrange*, TestUsageArrangeWindowsHidden (new), TestSettingsSave*,
  settings_keep guard, TestCoreScriptBudget, ./internal/settings, ./internal/settingsapi;
  gofmt clean; go vet darwin, linux nogui, windows.
- GUI, chromium and webkit: usage-rows-hide (new, 5 languages x 1200/560/390;
  32/32), usage-card-more 32/32, usage-arrange, usage-all-accounts 24/24,
  i18n-keys 4/4.
- usage-cards-hide and usage-hidden-way-back: "de 560" red (no sideways scroll
  635 vs 560); the same red on a clean origin/main a5e5f539a, filed as #6294.
Broken by hand: withoutHiddenRows returning its input turns usage-rows-hide
16/16 red in chromium.
Not tried: a real Antigravity account (fixtures only); full suite starts after
the tag.
2026-11-12 23:45:43 +08:00
yetone f4f104d1cc gui: a sign-in kept to its link shows Copy link with Open in browser beside it (Yink88564391 on X)
With Settings > Privacy > "Open sign-in pages in the browser" off, the
add-account window shows the link and opens nothing. The Open button sat
in a row under the link; it now sits in the link's own row, right of the
copy button, labelled "Open in browser" until the page has been opened
(then "Open again"). Every account sign-in goes through openSignIn, so
Codex, Claude and the rest follow it; MCP server sign-ins are not
account sign-ins and are unchanged. The default is unchanged.

Also: signin-close's "nothing else was changed" filter ignores
/api/update/using, which the page's in-use ping (10c4dc109) had turned
red on origin/main.

Run (mica): signin-*, i18n*, gui-* GUI files, chromium and webkit, en zh
zh-TW ja de: all pass; TestCoreScriptBudget ok. signin-link-only was red
on the old assets (no Open button in .signlink) and green after.
Not tried: a real Codex sign-in; Windows/Linux webviews.
2026-11-12 23:04:51 +08:00
yetone e18aca1038 agents: an agent's own context window, and a routing group's own Compact at (ul3140773077392, NovaStudiosss on X)
ul3140773077392 on X: dsh compacts earlier than other harnesses at the same
window, so one global size per model fits none. An agent's sheet (Agents,
the agent's Settings line) now holds "Context window": a size for every
model, or model=size pairs (provider/model, group/<id>, provider/*, a bare
model id, *). Empty follows each model's own window. It is applied in
provider.CatalogFor, the choke point every agent's model list goes through,
so dsh's contextWindow, Codex's catalog and Claude Code's window all read
it, and a window set this way makes Codex/Claude compact at that window
(Entry.WindowSet). Stored in settings.AgentContexts, kept by a general
save (settingsapi); POST /api/settings/agent-contexts and
`magpie model window <agent> [model=size...|off]`.

NovaStudiosss on X: Routing, a group's Edit, Advanced already had "Context"
(the window agents are told). It now has "Compact at" beside it
(Group.Compact; compactSet reads it before the members' smallest), also
`magpie group ... compact=`.

GUI: agentwindow.js, loaded on demand through agentcompact.js so app.js
stays inside its budget (TestCoreScriptBudget passes; the "Context window
in {agent}" label reuses the existing "Context window" key). Every agent
with fields now has a sheet; agent-prefs' Pi expectation says so.

Run at the pushed head, on mote: go vet (darwin; linux -tags nogui;
windows) on provider, agent, cli, gui, settings, settingsapi; gofmt clean;
go test provider, cli, settings, settingsapi, gui (TestCoreScriptBudget
and cli's route table fixed here), agent -run Dsh; node --test agent-window
and group-compact (chromium and webkit, en zh zh-TW ja de, 900 and 420px),
agent-compact, agent-prefs, compact-at. Reds seen identically on a
detached origin/main 4e0026661: agent-prefs webkit "in the panel a
Settings line..." (#6139) and old-webkit "compat.js is the first" / "styles
hold up in Safari 15.0" (#5919, #3403).

Broken by hand, each red then restored: withAgentWindows out of CatalogFor
(TestAgentOwnContextWindow, TestDshOwnContextWindow); the group branch in
compactSet (TestGroupOwnCompactAt); the settingsapi keep line
(TestSettingsSaveKeepsWhatItDoesNotSend); the window row in the sheet
(agent-window tests); compact dropped from the group save
(group-compact tests).

Not tried: a real dsh with a real account (its compaction is dsh's own;
the test reads the window magpie hands it), the full GUI suite (queued
behind another run on mote), Windows and Linux runs of the new tests.
2026-11-12 23:01:29 +08:00
yetone c96f33d659 agent: Hermes is one entry in the Agents list and the model pickers; its profiles are not rows (geekbb on X)
7050da0a4 (Norethcy on X) made each other Hermes profile an agent
hermes#<name> so the Library could give it its own skills and MCP servers,
and that also put one row per bot, each with its own model pick, in the
Agents list. geekbb: Hermes should have one entry; the bots Hermes made are
Hermes's to manage.

The profile agents stay, as the Library's targets (Norethcy's request keeps
working), but are now marked Agent.Nested: DetectedIn (the Agents list, the
tray panel and every picker built from it) and ClientsIn leave them out.
All and Find still reach hermes#<name> by id.

Existing settings: a model a user set on a profile lives in that profile's
config.yaml and is not touched, so it keeps applying; a profile on magpie
still follows the connected config's model unless it was picked, and a
picked one stays picked (hermes:<path>:picked). Nothing is dropped or
rewritten; what goes is only the extra row and its picker.

Run on mote: go test ./internal/agent ./internal/library; new
TestHermesProfilesAreNotListedAsAgents, red with Nested off and green with it;
GUI hermes-profile-row (rewritten: one Hermes row, no "Hermes ·" text),
hermes-profiles, i18n-keys in chromium and webkit, five languages; gofmt;
go vet darwin, linux, windows for agent and library.
Not tried: a real Hermes with several bots; the full suite before the tag.
2026-11-12 22:23:54 +08:00
yetone 10a27651f0 usage: a window's whole is kept across its reset until the new one tells its own (Musikrv77852 on X)
After Kimi Code's 7-day window reset with nothing used, the card lost its
"Whole ≈ N tokens" until the new week passed 5% used. The reckoning is
every provider's (usage.WithWindowHolds), so the fix is too: carryHolds
keeps the last whole told for each account's window (window-holds.json,
temp-and-rename) and, where the new window is under the floor or has none
routed yet, shows it with holds.prevAt set. The tooltip reuses the past
cycle's "Estimated from the window that began X, read Y" line; no new
label. The new window's own figure replaces it as soon as it can be told.

Run (mote): TestWholeKeptAcrossReset (reset with 0% and 2% used, restart
from disk, same-window under floor, other account, new window with data),
go test ./internal/usage ./internal/provider ./internal/gui (only
TestCoreScriptBudget red until its +10 here), quota-holds and quota-curve
GUI files in chromium and webkit (all 5 languages x 360/1000px for the new
case), gofmt, go vet darwin/linux/windows for usage and provider.
Broken by hand: carryHolds returning early reds the Go test and the GUI
case; dropping the prevAt branch in app.js reds the GUI case.
Not tried: a real Kimi account across a real weekly reset; a full
./... suite before the tag.
2026-11-12 21:48:04 +08:00
yetone 11a7e50bd4 gui: Add magpie for Cindy and the other apps opens their link on the host (Jealousy_Du on X)
In a browser tab (magpie web, or the app served to a browser) api("open")
always ran window.open in the viewer's browser, so a cindy:// import link
opened the viewer's own Cindy while the "added" status is read from the
host's Cindy database. App import links now go to /api/open and webHost
opens them with the host's system opener (openOnHost); http(s) links stay
the page's. Fixes Cindy, Lody, AionUi and Cherry Studio rows alike.

Run (mote, at this head): go test -tags nogui ./internal/gui ok; go vet nogui,
windows, darwin ok; gofmt clean; GUI import-web-host, import-row, click-scroll,
i18n-keys: 27 pass / 0 fail in chromium and in webkit.
Broken by hand: old app.js, new import-web-host test in chromium: red (the
page tried to launch cindy:// itself, no /api/open request). The Go test does
not compile on the old web.go (no openOnHost).
Not tried: a real remote host with a real Cindy; the old-code run in webkit.
2026-11-12 20:09:27 +08:00
yetone 6055f626e8 address: a scheme already typed is kept once, in any letter case (eachg0 on X)
Remote magpie and System One addresses got "http://" put in front by
several normalisers that each tested for "://" their own way, and one
saved "http://http://host" stayed that way until the address was deleted
and added again.

provider.WithScheme (new, internal/provider/scheme.go) is the one rule:
trim, add the default scheme when none is there, lowercase http/https,
and collapse a repeated http/https prefix to the innermost one. Path and
trailing slash are left as written; "host:3425/x?u=http://y" has no
scheme. It is used by provider.normalize (every provider URL, on read),
remoteMagpieEndpoints, DetectDecide, parseAddress and gui remoteAddr.
app.js has withScheme as its mirror, used by hostOf, localAddress,
vertexRoot and respellURL (whose gemini/openai regexes now match any
letter case).

Old data: an address saved with a doubled scheme is repaired when it is
read (provider.normalize for providers and System One addresses,
loadRemote for remote-magpie.json). The file is written out correctly on
the next save; nobody has to delete and re-add. Reading alone does not
rewrite the file.

app.js: the core script budget is met without a raise;
withScheme was cut down to fit (final package run after the rebase on fd9033cbf: gui and provider ok).

Run:
- go test ./internal/provider ./internal/gui ./internal/settings
  ./internal/cli on mote: ok, except TestCoreScriptBudget (284 over),
  fixed by shortening the JS and re-run alone: ok.
- gofmt -l, go vet darwin, GOOS=windows, GOOS=linux -tags nogui: clean.
- GUI on mica, chromium and webkit: scheme-once, local-address,
  custom-systemone-url, decide-endpoint-label, azure-endpoint, remote-*,
  i18n-keys, connect-address-kept: 158 of 164 pass; the 6 reds are
  "Remote magpie asks for the other magpie's address", red the same at
  origin/main 5e933e153 (#6099).
- add-sheet-custom, provider-fetch-again, provider-gemini: 14 of 54 red
  on mica, the same 14 at origin/main ab98228cc (#5232, #6209).
Red on the old code: scheme_test.go, remote_test.go (Go) and
scheme-once.test.cjs (withScheme undefined) were run against an
origin/main copy and failed there.

Not tried: the place that produced "http://http://" was not found by
reading (every guard used Contains("://")), so this hardens every
normaliser instead of one site; no real remote magpie was used; the full
GUI suite was not run.
2026-11-12 19:48:02 +08:00
yetone a2feeb11a0 update: pick the update source by hand, Automatic, usemagpie.ai only or GitHub only (RootSir, Sakugar_ on X)
usemagpie.ai's download is slow for some users (Cloudflare R2) and GitHub
is the one that works for others. Settings > Network has an "Update source"
menu button under App updates' proxy (the app's menu, no native select):
Automatic (default, as before: the site, then GitHub when the feed can't be
reached), usemagpie.ai only, GitHub only. Settings.UpdateSource ""/site/
github, this computer's own (KeepOwn), in settingsapi.Keys and Choices so
`magpie settings set updateSource github` works; any other value is refused
on save. The menu loads from assets/updatesource.js, so app.js (at its
budget) grows by one line.

GitHub only: latestAt reads yetone/magpie-releases without asking the feed,
and download starts at the file's github.com address (mirror and GitHub's
API route as before), never the site. usemagpie.ai only: no fallback to
GitHub for the release (fallsBack) nor for a file (toGitHub, toAPI off).
Stable and a MAGPIE_UPDATE_FEED of your own keep reading the site's feed
whatever the source says (Stable's release list is only the site's; its
files still come from GitHub on GitHub only). Every source goes through
Release.verify: ed25519 signature against the embedded key, the version in
the signed text, each hash from the signed list; a release read from GitHub
must be signed whatever its version. The update private key is untouched.

Run (mote, tree before the commit): gofmt clean; go vet update/settings/gui,
GOOS=windows and linux vet of update; go test internal/update, settings,
settingsapi, backup, cli ok; internal/gui TestCoreScriptBudget, assets and
i18n tests ok. GUI: settings-update-source (chromium and webkit x en, zh,
zh-TW, ja, de x 1100 and 420px: three menu items, each pick saves updateSource
alone, tick, no overflow), settings-update-proxy, i18n-keys, i18n-en-no-cjk,
settings-*, gui-* ok except the 22 subtests (gui-de/ja "has every zh string",
settings-hints, settings-lines-wrap de 440, settings-search) that fail the
same on origin/main 5a3d73039 (#6234, #6073, #6156, #6133 are open for them).
New Go tests use a fake GitHub and a live fake site feed that count their
hits: GitHub only never asks the feed and downloads from GitHub, the site and
Automatic never ask GitHub, the site only never falls back (release or file),
GitHub only refuses wrong key, swapped sums, no/junk signature and an
unsigned old version, a custom feed is never overridden. Broken by hand:
without the githubOnly branch and the two download switches, 3 of them go red.
Not tried: the real github.com or R2, a Windows run, Stable with GitHub only.
2026-11-12 19:35:57 +08:00
yetone d99ebb371c gui: a provider's row says its accounts to test on, so "Test on account…" shows (tmr11235 on X)
d96403141 added "Test on account…" to a model chip's right-click, shown
when the provider row has testPicks, and added provider.TestPicks. The
row the GUI is sent (providerJSON in internal/gui/providers.go) never set
the field, so the entry never showed for any provider: tmr11235's ChatGPT
API with two ChatGPT sign-ins on v0.1.3884 has only Test this model, Copy
model ID and the image toggle. The GUI test fed a hand-made testPicks and
the provider tests called TestPicks directly, so nothing joined them.

providerJSON now carries TestPicks (p.TestPicks()).

Account kinds checked (TestPicks reads AccountsOn for any signed-in
provider, KeyList otherwise): API keys (first key and saved keys, off ones
left out); signed-in accounts and their also-on accounts of every sign-in
that AlsoOn lists: ChatGPT API's ChatGPT sign-ins, Codex and Claude logins,
Copilot, Gemini and Antigravity, plugin accounts. Read, not each signed in:
only keys are run as a row (new test); plugin accounts are covered by
TestModelTestPinnedToAnAccount; the ChatGPT API shape is in the GUI test.

Run on mote (load ~107 at the time, mica 128): go test ./internal/gui
./internal/provider ok; model-test-account (now with a ChatGPT API
provider with two accounts) and i18n-keys 14 of 14, chromium and webkit,
en zh zh-TW ja de; gofmt clean; go vet darwin, windows, linux nogui.
Broken by hand: with TestPicks left out of the row,
TestProviderInfoSaysTestPicks fails ("two keys on: testPicks []").

Not tried: the live app with two real ChatGPT sign-ins. The GUI test serves
a fixed /api/providers, so it is not red on the old code; the Go row test
is the guard. The other model-* and provider-* GUI files not rerun (a Go
field the page already reads).
2026-11-12 19:35:07 +08:00
yetone 4519eea711 gui: Settings › About has Report a problem, which copies the details and opens the feedback post (River_WLan on X)
A user who hit a problem had to work out what to tell us. Settings ›
About now has a Report a problem row with an Open button: it copies a
short block to the clipboard (magpie version, OS name and version,
architecture, and whether this is the app or the browser page), says it
was copied, and opens the feedback post
https://x.com/magpie_router/status/2119861020978188499 so the user can
paste it in a reply. GET /api/feedback builds the block and the URL.

The block holds no account names, keys, paths, host or user names, and
nothing is put in a URL: the opened address has no query or fragment.
The TUI has no Community links, so it gets nothing here. The core script
budget is raised by 458 bytes for the row and its translations
(1,263,851 to 1,264,309 with the provider commit under it).

Run, on mica: new TestFeedbackBlockHoldsNoPrivateFacts (version, OS,
arch, surface; no home dir, host or USER; URL with no ? or #; macOS
version present; unknown surface becomes app) and about-report.test.cjs
(clipboard gets the block, /api/open gets the post URL with no
diagnostics), chromium and webkit, en zh zh-TW ja de, widths 1100 and
420, 40 of 40 with about-website; vet on darwin, windows and linux nogui
clean. Broken by hand: a "Home:" line added to the block turns the Go
test red. A loaded run of the About files plus gui-de/ja/zh-tw and the
i18n files had 40 reds in usage and picker files; the reachable ones
were run alone on origin/main 5e933e153 (see the provider commit under
this one: usage-hidden-way-back #6295 and usage-agents-hide #3414 are
red there; the rest pass alone).

Not tried: the Linux app (WebKitGTK) and Windows; the clipboard write in
the Wails webview rather than a browser.
2026-11-12 19:31:11 +08:00