Commit Graph
56 Commits
Author SHA1 Message Date
yetone 0f8cdc79f1 library, gui: Claude Desktop's own built-in skills are one row to keep, on the Skills tab, not five failed writes on every tab (#1896, SivanCola)
What changed: the screenshot on #1896 asked how to read a "duplicate MCP"
box on the MCP page. It wasn't MCP servers: it was five "Claude Desktop
already has a skill of its own called docx/frontend-design/pdf/pptx/xlsx"
lines, Anthropic's built-in skills, shown as failed writes in English
monospace, with a Try again that can never help, on every tab.

- library: that problem is Own (the agent's own skill by the library's
  name), as other agents' are. UseLibrarySkills/KeepAgentSkills settle
  several names at once; Desktop's own skills are never set aside for the
  library's (they are its built-ins), only kept.
- gui: the problems card shows each problem on its own tab and, on the
  others, a "{tab}: {n} more" button that opens it (no scroll). An
  agent's own skills are one row per agent ("Skills docx, pdf, ...");
  Claude Desktop's row says it has its own and offers only Keep. With
  nothing failed the title says so and there is no Try again. API:
  skills/use-library and skills/keep-own take names[] beside name.
  Decision (product calls delegated): follow macOS's pattern of grouping
  related alerts with one action, rather than a list of errors.
- i18n: 10 new strings in zh, zh-TW, ja, de.

Run:
- go test -tags nogui ./internal/library (474s, -timeout 40m at load
  ~90; the 10m default timed out in TestRTKUpgradeScript under that load)
  and ./internal/gui: ok. TestClaudeDesktopOwnSkillsKept broken by hand
  twice, red each time: Own dropped from the problem; Desktop's skills set
  aside by UseLibrarySkills.
- GUI: own-skill, library-items, i18n-keys, gui-ja, gui-de, gui-zh-tw,
  panel-usage in Chromium and WebKit: all pass. With origin/main's
  library.js put back, 10 of own-skill/library-items' 20 fail.
- gofmt -l; GOOS=linux and GOOS=windows go vet -tags nogui on the
  touched packages: clean.

Not tried with the reporter's real Claude Desktop; the fixture uses the
skills-plugin manifest's creatorType "anthropic" entries.

Reported-by: SivanCola
2026-10-13 13:03:25 +08:00
yetone 2d721f7f3d library, gui: the skills in your agents can be picked and removed together
wongxy on Discord: 资源库技能支持批量删除 (batch delete for the Library's
skills). The library's own skills already have this: Select, then
Remove…, since #1852 (a4385e099, v0.1.1217). The skills under "In your
agents" (the ones an agent has of its own) could only be removed one at
a time. This adds the same for them.

What it does:
- RemoveFoundSkills(names), POST /api/library/skills/remove-found-some.
  One change takes each name out exactly as RemoveFoundSkill does (its
  body is now removeFound, shared by both). Folders and byte copies, the
  shared ~/.agents/skills entry and a folder in the library's own folder
  go to magpie's backups, not the OS trash and not deleted. Links are
  taken away. A folder elsewhere that the skill only links to stays, and
  so does another skill by that name.
- A name that can't be taken out is left as it was and goes in
  Result.Unremoved; the others go all the same. When none can go the
  change fails, the endpoint answers 400, and nothing is touched.
- The "In your agents" heading gets its own Select. Each row gets a
  box, its own buttons go, and a bar has All, Clear, the count, Remove…
  and Done. Remove… asks once, naming the count, the agents, how many
  folders go to the backups, how many are only unlinked and how many
  have a shared entry. A name that wasn't removed stays picked, with its
  error in its row's place, and the status names it.
- Only one Select is on at a time: while either is on, the other is
  dimmed with a title saying why ("Done picking … first"). Ending one
  from the other took its bar away above the pointer and scrolled the
  page.
- Eight new strings in zh, zh-TW, ja and de.

Run:
- TestRemoveFoundSkills: picks notes (a folder plus a byte copy), dev (a
  link to a folder of the user's own), stuck (a read-only folder in
  Gemini's skills) and notes again. Checks that stuck is in Unremoved
  with its files intact, that the others are gone with their backups,
  that dev's own folder stays, that keep (not picked) stays, that
  "none can go" fails and touches nothing, and that no names is refused.
  Broken by hand, it goes red both ways: returning on the first error
  ("permission denied", the change fails), and dropping Unremoved
  ("unremoved: []").
- found-skill-pick-remove.test.cjs in Chromium and WebKit, en, zh,
  zh-TW, ja and de, at 1100 and 420: 11/11 each. Every press checks
  that nothing scrolled and that the pressed button didn't move. It
  covers the one-Select-at-a-time rule both ways, picking 3 and the
  sheet's title and lines, Clear, a partial failure, the 400 when none
  can go, and All then unpicking one. Broken by hand (failed names not
  kept, or unpicked anyway), it goes red: 0/11.
- 80 Library, skill, group, removal, i18n-keys, gui-de/ja/zh-tw and
  click-scroll GUI test files: Chromium 458/458; WebKit 456/458. The
  two reds are group-member-info (en) and library-mcp-tool-switch
  (zh-TW 980), both "locator.click: Timeout 5000ms exceeded". Both fail
  the same way, with different cases each run, at 2c3112969 with this
  change stashed.
- gofmt -l is clean. go vet passes on darwin, GOOS=linux -tags nogui
  and GOOS=windows; go build passes on all three.
- go test -tags nogui ./... under a sandbox HOME, rebased on a069f224c:
  all pass except internal/gateway, which hit the default 10m timeout
  while the GUI suites were running alongside it. Run alone with
  -timeout 25m it passed in 327s.

Not tried against a real agent's skills folder; only the sandbox HOME.

Reported-by: wongxy (Discord)
2026-10-13 11:04:13 +08:00
yetone 1a84447832 gui: the library's Select keeps its place when it turns Done, in German and at 420
Found while building Select for the skills in your agents (wongxy, the
next commit). Two things moved the library's own Select (#1852) from
under the pointer when it was pressed:

- Done was narrower than Select. In a heading on two lines (German at
  420: Auswählen, Fertig) the narrower word fitted on the first line,
  and the button jumped 52px up and to the right. Select and Done now
  take the width of the wider of the two (data-alt, drawn as a hidden
  zero-height ::after), in the skills', servers' and hooks' headings.
- The heading's first line sat 1px lower on one line than on two (one
  line centred in the 26px, two beginning at the top). A press that
  unwrapped it (German at 1100) moved the button 1px, and the page was
  scrolled 1px to hold it. The wrapping headings now have 1px padding
  above and below, so the first line sits in the same place with one
  line or two.

Run:
- library-pick-remove, library-servers-bulk, library-hooks,
  remove-all-skills and click-scroll, in Chromium and WebKit: 36/36 each.
- library-pick-remove now checks that Done is as wide as Select. With
  the ::after taken out it goes red in every language at both widths
  (Select 80.6px wide, Done 53.0px in German).
- The 1px padding is checked by the next commit's
  found-skill-pick-remove (German at 1100), which goes red without it:
  view-library scrolled 0 to 1.
2026-10-13 11:04:13 +08:00
yetone 6746655a8c gui: a Library row's agent chips fan out like a hand of cards, by translate alone
The owner: hovering an MCP server's row, the agent icons came out with
"一点都不丝滑优雅精致美观,应该像翻起扑克牌一样丝滑优雅". The fan grew every
chip's margin at once while a spacer before them shrank, so the row was
laid out again on every frame and all the cards moved as one block.

The chips are now laid out fanned for good and drawn stacked by sliding
each one by translate (--k, the chips to its right, set in agentChips).
Hovering only clears translate: the compositor moves the cards, the
strip, All and the name beside them never move, and the cards are dealt
one after another (a stagger of at most 120ms in all), the one with the
furthest to go first, so none passes over another; they go back
together, quicker. Transform stays free for the press. Reduced motion
fans at once.

Run: library-chip-fan.test.cjs (new), chromium and webkit, en, zh,
zh-TW, ja, de, with and without reduced motion: 22/22; 0/22 on
origin/main 689edbd6b. It samples each frame: no relayout, no card
passing another, more than three frames in motion. It caught that the
reduced-motion rule lost to the stagger's specificity, fixed here.
Measured with the dev instance's real 26 agents at 1800px: strip, All
and name at the same places as before at rest and fanned. The library
and skill GUI tests pass in both engines, except pick-skills on WebKit,
which fails 0/3 the same on origin/main 689edbd6b (.lib-pickbar takes
the click on the pdf skill's name).
2026-10-13 05:44:08 +08:00
yetone 9a34a784dc library: Collapse all / Expand all for the skill groups (#1862)
WardLu (#1862) asked for a way to fold every skill group at once in a
library of many groups. Library > Skills now has a Collapse all / Expand
all button beside the sort (foldAllButton in library.js):

- without a filter it sets every shown group's kept fold
  (magpie.libSkillFolds), the same as clicking each heading;
- while filtering it folds or opens only the groups the filter shows,
  until the filter changes (unfiltered), and leaves the kept folds alone;
- it says Collapse all while any shown group is open, else Expand all;
- it is hidden with fewer than two groups (A->Z, or a filter only one
  group matches);
- a part inside a group keeps its own fold, and nothing is sent.

skillHits/groupFolded pull out the rules drawSkills already used, so the
button and the headings can't disagree. Strings in en, zh, zh-TW, ja, de.
docs/subsystems/library.md's Skill groups row describes it.

Run:
- new internal/gui/tests/skill-fold-all.test.cjs: chromium and webkit,
  en/zh/zh-TW/ja/de, at 640 and 1180. 22/22 pass, three times. With
  origin/main's assets it fails in every case (no button).
- the skill-*, library-* (skills side), pick/remove/import skill tests
  and i18n-keys, at concurrency 4: everything passes except
  pick-skills.test.cjs in WebKit. That test is red with main's own assets
  too (#1672, being fixed separately).
- screenshots in German at 640 and 1180: the button sits in the heading
  row and wraps with it.

Not run: a real library with many groups in the app window. I didn't
check by hand that the scroll check fails when something scrolls.
2026-10-13 04:32:20 +08:00
yetone 76c6580ea6 gui: a skill group's agent chips count only the skills magpie decides, and a row's chip for one an agent reads from ~/.agents/skills itself is locked (#1862, WardLu)
A skill kept in ~/.agents/skills is had by every agent that reads that
folder itself (SkillView.Always), whatever is ticked. Its row's chip said
so only on a click, greyed like a chip that can't take the skill, while
the group's chip counted s.agents alone. Turning the group off for Codex
then said "off for Codex" and left the row lit.

What changed:
- groupChips (group headings, parts and the Select bar) counts, gives and
  takes only the skills magpie decides for each agent. agents-some is
  sent, per agent, the names it doesn't read itself, so a skill Codex
  reads from the shared folder is never sent for Codex.
- A chip whose agent reads only some of them itself says how many, in its
  tooltip. After a click, the status says "Codex still reads 1 of them
  from ~/.agents/skills itself".
- An agent that reads every one of them itself has a lit, locked chip, as
  the row's is. It sends nothing, and a click says why.
- The group's heading says "N in ~/.agents/skills", with a tooltip naming
  the agents that read it, before any click.
- A row's locked chip is lit, with a small lock on its corner, rather
  than greyed out at .35.
- Nothing deletes from the shared folder or touches another agent's
  config. Servers and hooks keep their own reach rules unchanged.
- Strings in zh, zh-TW, ja and de. docs/subsystems/library.md (Skill
  groups) says it.

What was run:
- New skill-group-shared.test.cjs, in Chromium and WebKit; en, zh, zh-TW,
  ja and de; 640px and 1180px:
  - heading note;
  - partial chip tooltip;
  - the locked row chip's opacity and its lock;
  - the post sent, the status, and parents and rows agreeing after a
    click;
  - All;
  - a fully locked group chip sends nothing;
  - no sideways scroll.
  22/22 pass, twice. It fails on the old code (no heading note; Codex is
  sent mango too).
- group-skill-chips, skill-parts, skill-groups, shared-skills,
  every-skill, library-all, i18n-keys, library-own-folder,
  skill-repo-groups, library-pick-remove and library-null-agents pass in
  both engines.
- pick-skills is red in WebKit on origin/main's own assets too, the same
  as here. It is out of date since 18e82adc6, and the GUI-triage session
  is fixing it (#1672).
- Looked at in WebKit screenshots, light.

What wasn't run:
- Not tried with a real Codex reading a real ~/.agents/skills. The
  backend (SkillView.Always, agents-some) is unchanged.
2026-10-13 04:32:20 +08:00
yetone accc8c0903 library: an MCP server whose sign-in has no client registration (GitHub's) is signed in to as the user's own OAuth app (新v学员 on Discord)
What changed: GitHub's remote MCP server (api.githubcopilot.com/mcp/)
points to https://github.com/login/oauth, whose metadata has no
registration_endpoint, so magpie's sign-in, which always registered
itself (DCR), could never sign in to it. A server now carries an
optional OAuth app, `oauth: {clientId, clientSecret, callbackPort}`,
Claude Code's names for --client-id/--client-secret/--callback-port
(oauth.clientId in its .claude.json). mcpauth.StartWith signs in as
that app without registering: PKCE S256, a loopback callback
http://127.0.0.1:<port>/callback (any port unless callbackPort is set),
client_secret_post with a secret (basic only when the server lists
basic alone), "none" without one.

Without an app, a server with no registration endpoint now fails with
mcpauth.ErrNoRegistration, which says to make an OAuth app with the
vendor (GitHub's under Settings > Developer settings > OAuth Apps, with
http://127.0.0.1/callback) and give it under "OAuth app" in the editor.
The editor opens those fields with Client ID focused when that error
comes back. Filling them makes Sign in read "Save and sign in", and
Cancel asks before dropping them, as the earlier Cancel fix does.

GitHub answers token errors with 200 and {"error": ...}; tokenRequest
now reads a 2xx body with `error` as the error, and bad_refresh_token /
incorrect_client_credentials count as a dead sign-in as
invalid_grant/invalid_client do.

Secrets: the client secret sits in library.json like header and env
values. A backup without keys blanks it; WithSecrets puts this
computer's secret back only for the same client ID. No agent file is
given the app. The TUI editor, which doesn't show it, keeps it on save.
check() keeps it only on an HTTP server, requires a client ID when a
secret or port is given, and a port 1-65535.

Run (worktree at 98b5a02d1 + the two earlier commits):
- go test -race ./internal/mcpauth/... (new github_app_test.go: an
  httptest fake built from GitHub's real PRM and AS metadata bytes:
  no app -> ErrNoRegistration, sign-in as the app, wrong secret, fixed
  callback port, bad refresh token)
- go test -tags nogui ./internal/library ./internal/tui ./internal/gui;
  go test ./internal/gateway -run MCP
- gofmt -l; go vet darwin, GOOS=linux -tags nogui, GOOS=windows
- GUI, Chromium and WebKit, 1100/390, en zh zh-TW ja de:
  mcp-oauth-app (new, 22/22), mcp-editor-cancel, mcp-signin,
  mcp-signin-health, library-mcp-health, i18n-keys - all pass
- Broken by hand, each went red: no 2xx error parse, GitHub codes out
  of dead(), app ignored in StartWith, secret not blanked / not matched
  by client ID in carry, check() without the non-HTTP rule; in the GUI,
  oauth left out of the save, and the failed hook not opening the fields.
- Sandbox HOME, rebuilt magpie web, against the real GitHub server:
  Sign in showed the new error and opened the fields; Save and sign in
  saved the app and produced a real github.com/login/oauth/authorize
  URL with the app's client_id, S256 and a 127.0.0.1 redirect, which
  GitHub answered with its login page. .claude.json didn't hold the app.

Not run: a real GitHub sign-in to completion. There's no real OAuth app
to use, and I didn't make one on the owner's account. Claude Code's
callback says localhost where magpie's says 127.0.0.1, so an app made
for Claude Code needs its callback URL changed; that isn't bridged.
2026-10-13 03:43:05 +08:00
yetone a4385e0999 gui: the Library's Select bar removes the skills, servers or hooks picked, a whole group at once with its header's box (#1852)
What: Select's bar on the skills, servers and hooks pages gets Remove…
(red, beside Clear). It asks first, as Remove all does, naming the count
("Remove 3 skills?", or "Remove pack-a?" for one), and posts only the
picked names to the existing remove-all endpoints (RemoveSkills /
RemoveServers / RemoveHooks), so each goes exactly as its row's Remove
would: same backups, only magpie's own copies. A group's or part's header
box (already there in Select) picks the whole group, so an outdated group
goes in one step. Groups have no menu, so no "Delete group…" item was
added.

A name that wasn't removed stays picked, its row's second line shows
"Not removed: <error>" in red, the status names it ("notes removed ·
stuck wasn't removed: …"), and nothing reports success for it. When every
name fails the endpoint answers 400: the sheet stays open with its button
enabled again. The label stays "Remove…" whatever the count (the count is
beside it and in the sheet): "Remove 3…" rewrapped the bar at 440px in
ja and moved the box under the pointer (library-servers-bulk caught it).
No Go change: the batch removals already reported Unremoved per name.

Strings in zh, zh-TW, ja, de. docs/subsystems/library.md says it.

Run: new internal/gui/tests/library-pick-remove.test.cjs (Playwright
1.62.0, chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 390 px): group
box picks 3, Cancel posts nothing, Remove takes 3 and leaves the rest, a
partial failure keeps the failed one picked with its error, a total
failure keeps the sheet; every click checked for no scroll and nothing
moving. Red by hand: dropping every name from picked after a partial
failure, and dropping the partial-failure status. With it, both engines:
library-servers-bulk, library-hooks, i18n-keys, gui-de, gui-ja,
gui-zh-tw, click-scroll, group-pick-filter, remove-found-skill,
library-items, remove-all-skills: 60/60 pass. library-servers-bulk
chromium failed once in a parallel run, then passed 3/3 alone and 2/2 in
the same parallel run on this tree and on origin/main.

Not run: pick-skills.test.cjs is red in webkit (en, zh: the click on the
"pdf" row times out) on origin/main 6669d497d without this change too,
the same as before; chromium passes. Not tried in the real app.
2026-10-13 02:48:46 +08:00
yetone 6ccf23efa6 gui: the Library's Backups button is at the top of every tab, after Library folder (Dade on Discord)
Dade: each Library tab's 备份 (Backups) sat at the very foot of the page,
under the whole list, and was hard to find. It is now a button in the
Library's head strip, on every tab (Instructions, MCP servers, Skills,
RTK). That strip stays at the top as the page scrolls. The button sits
right after 资源库文件夹 (Library folder) and looks the same: a small
glyph (a clock with a turning arrow, as macOS draws backups) and a label.
- It opens magpie's backups folder.
- Its tooltip keeps the sentence the foot had ("magpie keeps a copy of
  every file before it writes it.") with the folder's path.
- It is disabled until the library has loaded, as Library folder is.
The foot line and its .lib-foot/.lib-link styles are removed. Two
messages that pointed to "Backups, at the foot of the Library" now say
"at the top", in all five languages. The page with no agents, which had
no foot, now has Backups too.

Run:
- library-backups-top.test.cjs covers chromium and webkit,
  en/zh/zh-TW/ja/de, each of the four tabs, and browser 1000/420px plus
  window 1000/800/560px. It checks the button comes right after Library
  folder on the same line and looks the same, waits for the library, has
  a label that doesn't wrap, has no left border, causes no sideways
  scroll and nothing at the foot, opens the backups folder, and doesn't
  move the page on click. 10/10 pass. Without the button appended, red.
- library-loading, library-discover-jump, library-all, library-items,
  library-rtk-gain and library-own-folder pass (138).
- go test ./internal/gui -count=1 under a sandbox HOME: ok.
- mobile-web.test.cjs: the phone widths pass. Its desktop 900/1280
  comparison with origin/main fails only on the library page (about 650
  pixels: the new button in the strip). Its before/after screenshots show
  nothing else changed, and it matches again once this is on main.
2026-10-12 23:30:08 +08:00
yetone e3a497d7a2 library, gui: Hooks are a fifth Library category, kept once and written into each ticked agent's own hooks file (#1790, AllenReder)
What: the Library page has a Hooks tab beside Instructions, MCP, Skills
and RTK. A hook is a command, an event, an optional tool filter, a
timeout and the agents ticked for it. magpie writes it into each agent in
that agent's own file and shape:
  Claude Code  <claude dir>/settings.json   hooks.<Event>[{matcher, hooks[]}]
  Codex        <codex home>/hooks.json       same shape
  Gemini CLI   ~/.gemini/settings.json       same shape, timeout in ms
  Cursor       ~/.cursor/hooks.json          flat entries, version 1
Portable events (turn end, after a tool, before a tool, prompt sent,
session start) map to each agent's own name; "shell"/"edit" map to each
agent's own tool names. An agent's own event (codex:PermissionRequest,
cursor:afterFileEdit, ...) is offered too and given to that agent only.
Rows have agent chips (All first), Select + bar, and Remove all, like
skills and servers. An agent that can't take a hook has its chip greyed
with the reason: every agent but those four ("has no hooks magpie can
write"), an agent in WSL (not yet), and another agent for a native event.
The page also says when an agent has all hooks turned off
(disableAllHooks, hooksConfig.enabled=false, [features] hooks=false).

Why these choices (product call delegated to us): the four agents are
the ones with a documented, file-based command-hook API whose events line
up; others (OpenCode's JS plugins, dsh, ...) have no comparable file, so
they're named as unavailable rather than half-supported. Removal is
exact: Applied.Hooks records each entry as written (canonical JSON), and
only an entry still exactly as written is taken out; one the user edited
is theirs, and their own hooks beside it are never touched. A hooks file
that doesn't parse is a problem, never treated as empty or written over.
Codex keeps trust per hook in config.toml keyed by group position, so
taking a group out re-keys the user's trust for the groups after it
(codexRekey) instead of silently untrusting them. Carried bundles
(backup/WebDAV/S3) don't carry hooks in this first version.

Run:
- go test ./internal/library ./internal/gui (sandbox HOME): pass. New
  hooks_test.go: each agent's shape; the user's edited entry stays and is
  no longer recorded; an unparseable file is left alone and reported;
  Codex trust moves with its groups; native events/unavailable agents;
  hooks-off reported.
- library-hooks.test.cjs: 12/12 in chromium and webkit, at 440px, in en,
  zh, zh-TW, ja, de; against the old library.js it fails (timeouts on the
  missing tab). All 52 new strings translated in the 4 languages.
- library-loading.test.cjs expects the Hooks tab in its tab lists
  (it failed on this change before; 6/6 now).
- Every library-*/skill-* GUI test in chromium and webkit: all pass but
  WebKit timeouts in library-mcp-tool-switch/library-mcp-tools, which fail
  the same on origin/main b0a904bd9 under load (#1609, commented).
- gofmt -l, go vet ./..., GOOS=linux go vet -tags nogui ./...,
  GOOS=windows go vet ./...: clean. Full go test ./... at the pre-rebase
  head c1c1a730f: 49 packages ok. After rebasing onto 86b2f4d05:
  library, gui and gateway's Anthropic/Zed tests ok.

Not tried: real Claude Code / Codex / Gemini / Cursor runs firing the
written hooks; the shapes were checked against each agent's source and
docs, not executed.
2026-10-12 22:44:28 +08:00
yetone b7a926e9aa library, gui: a market search one source of which didn't answer says which, over what the rest found, not a failed search; a 503 is asked once more (#1589, Ti800)
Ti800 searched the Library's Discover for "prototype" and saw the amber
error "couldn't search skills.sh: www.skills.sh answered 503 Service
Unavailable" over two results. The cause was neither a stale request
(fetchMarket already drops an answer whose seq is old, results and error
alike) nor an error left over from an earlier search: MarketSkills matches
skills.sh's most-installed list (front page, cached) and magpie's picks
itself, then asks skills.sh's search. The search answered 503; the two
cards were the most-installed list's matches, and the handler sent both
the list and the search's error, which the page drew as a failed search.

- library: the search's failure is a SearchError naming its source
  (skills.sh, the MCP Registry); get() asks once more after a 503, after
  a one-second pause (one extra try, nothing else retried).
- gui: /api/library/market/{skills,servers} add failed and cause beside
  error. With results, the page says in a muted line with an amber dot
  that skills.sh's search (or the MCP Registry) didn't answer and why, and
  that these are only the matches among magpie's picks and the most
  installed (or magpie's featured servers). With no results the error bar
  is as before. Strings in zh, zh-TW, ja, de.

Siblings: the MCP market has the same shape (featured + registry) and gets
the same notice. The Plugins page's npm search already shows its error in
the "On npm" section only, beside the market's own list, keyed by query.

Tests:
- internal/library TestSkillsSearch503 (httptest fake skills.sh): 503 then
  200 gives the search's results and no error; 503 every time gives the
  popular match and a SearchError for skills.sh, searched exactly twice.
  With the retry taken out it fails: "after one 503:
  [mattpocock/skills/prototype] couldn't search skills.sh: … 503 …, 1
  searches".
- internal/gui TestMarketOfNamesTheFailedSource.
- gui tests market-partial.test.cjs: the reporter's case (two results +
  skills.sh 503), nothing found (error kept), an older search's 503
  answered 1.2s after a newer search's results (nothing changes), and the
  MCP Registry case; Chromium and WebKit, en/zh/zh-TW/ja/de, 520px wide:
  10/10. With the new branch disabled, 5/5 Chromium fail with "the partial
  list is shown as a failed search". market-*.test.cjs and
  library-discover-jump: 114/114.
- go test ./internal/library ./internal/gui, gofmt -l, GOOS=linux and
  GOOS=windows go vet -tags nogui on both packages; full suite in the
  push record.
Not tried against the real skills.sh (it answers 200 now); the fake
answers 503 as the report's text says.
2026-10-11 20:10:05 +08:00
yetone f1001ec991 library, gui: each of an MCP server's tools has a switch, and the agents that can leave one out are told to (nf1qaz2w on Discord)
nf1qaz2w asked to turn single tools of a Library MCP server on and off.
6f4fb883e listed each server's tools by name and description; each now
has a switch beside it.

What changed
- Server.DisabledTools keeps the tools turned off, by the names the
  server gives them; ServerTools (POST library/servers/tools) sets them.
  The editor's save sends none, so SaveServer keeps them.
- Each agent given the server that reads a per-tool setting is written
  it in its own form (mcp_tools_off.go, toolsOffOf), checked in source:
  - Codex: [mcp_servers.<name>] disabled_tools (codex-rs/config/src/
    mcp_types.rs, ToolFilter in codex-rs/codex-mcp/src/tools.rs;
    openai/codex cc7ba336)
  - Gemini CLI: excludeTools in the entry (docs/tools/mcp-server.md,
    mcp-client.ts; gemini-cli 9b6e0265)
  - Crush: disabled_tools in the entry (internal/config/config.go
    MCPConfig, filterTools; crush df5b024a)
  - Hermes Agent: tools.exclude in the entry, original names
    (tools/mcp_tool_registration.py, mcp-config-reference.md;
    hermes-agent c5733167)
  - Claude Code: mcp__<server>__<tool> in permissions.deny of
    settings.json (code.claude.com/docs/en/permissions; names spelt as
    Claude Code 2.1.296 normalizes them, [^a-zA-Z0-9_-] -> _)
  - OpenCode: "<server>_<tool>": false in top-level tools of
    opencode.json (docs mcp-servers "Manage"; name() in
    packages/core/src/tool/mcp.ts, migrateTools in config/normalize.ts;
    sst/opencode 0d61729b)
  Every other agent (Cursor, Copilot, Goose, Zed, Kimi, Pi, Grok, Devin,
  Antigravity, Alma, dsh, omp, ZCode, Command Code, Cline, WorkBuddy,
  CodeBuddy, Droid, Claude Desktop, MiMo Code, plugin agents) gets the
  server whole; AgentView.ToolsOff is false for it, and the open tool
  list names those agents as unable to turn off single tools.
- Applied.ToolsOff / Applied.ToolRules record only what magpie added
  (offList): a name, deny rule or tools key the user had is theirs and
  stays when the tool is turned on again; an OpenCode key the user set
  to true is never written over. A list or deny that isn't a list of
  names is a problem and the file is left as it is. The key (and an
  emptied permissions / tools) goes when magpie's were the last.
- GUI: a switch per tool, flipped at once with no repaint or scroll,
  quick clicks sent as one request; turned-off tools dimmed. zh, zh-TW,
  ja, de strings. Project files and Copy config… don't carry it
  (docs/subsystems/library.md says so).

What was run
- go test ./internal/library -run 'ToolsOff|OffList': per format the
  list is written, removed on re-enable, the user's own entries kept
  (Codex, Gemini, Crush, Hermes, Claude deny, OpenCode tools); cursor
  untouched; SaveServer keeps the list. Broken by hand (no off.apply,
  no syncToolRules): TestToolsOffInTheEntry, TestToolsOffClaudeDeny,
  TestToolsOffOpenCode go red.
- go test -tags nogui ./internal/library ./internal/gui: ok.
- library-mcp-tool-switch.test.cjs: chromium and webkit, en/zh/zh-TW/
  ja/de, 980 and 420 wide: pass; 10/10 red against the old library.js,
  library.css and i18n.js. library-mcp-tools.test.cjs' fixture gives
  Claude Code toolsOff (as the real view does).
- library-*.test.cjs, click-scroll, i18n-keys: chromium and webkit.
- gofmt -l; go vet, GOOS=linux and GOOS=windows go vet -tags nogui
  ./internal/library ./internal/gui.
- go test -tags nogui ./... (full suite, under the queue lock).
All in sandbox HOMEs; no live agent config was touched.
2026-10-11 13:44:02 +08:00
yetone 6f4fb883eb library, gui: an MCP server's tools are listed by name and description (nf1qaz2w on Discord)
nf1qaz2w on Discord: "mcp现在好像只能看到有几个工具,看不到具体的工具名和描述等,
能否支持下?" The Library's MCP check kept only len(tools) from tools/list.

What changed:
- internal/library/mcp_check.go: ServerHealth carries ToolList (json
  "toolList"): each tool's name and the first paragraph of its
  description, whitespace collapsed and cut at 500 runes (a tool with only
  a title gets the title); names cut at 128; at most 500 tools kept while
  Tools still counts all. tools/list is now asked through listTools, shared
  by the stdio, streamable HTTP and SSE checks: it follows nextCursor up to
  10 pages, each page with a step budget of its own (the #1467 per-step
  timeout), and a page after the first that is refused ends the list there.
  Before, nextCursor was ignored and only the first page counted.
- internal/gui/assets/library.js/.css: a server whose check listed tools
  shows a chevron on its "N tools" status; a click opens the list under the
  row (name in the code font, description under it, "N more not shown" when
  magpie kept fewer than the server has, and Check again). Clicking the
  count again shuts it. A server with no listed tools keeps the old click,
  which checks it again. The list stays while it is checked again, no
  editor opens, no left-border stripe, no native select. The click guard
  keeps the clicked status in place (a centred row gives up 1px as it
  grows).
- i18n: "Click to see them", "Click to hide them", "{n} more not shown" in
  zh, zh-TW, ja, de.
- docs/subsystems/library.md: the check's tool list and paging.
There is no CLI/TUI output of a server's check, so nothing changed there.

What was run:
- go test ./internal/library: TestCheckKeepsToolNames runs the check on the
  tools/list reply @modelcontextprotocol/server-filesystem really gave
  (captured with npx, testdata/filesystem-tools-list.json, 14 tools, the
  longest description 457 chars); TestCheckToolPages (no description, title
  only, a 1000-char description cut, two pages by nextCursor, the JSON the
  page reads); TestCheckToolPagesEnd (a server that pages forever is asked
  10 times). With the list not kept and paging off, the first two fail:
  "got {State:ok Tools:14 ToolList:[] ...}, want ok with 14 tools, each
  listed" and "...Tools:3 ToolList:[]..., want ok with 4 tools over 2 pages".
- GUI: internal/gui/tests/library-mcp-tools.test.cjs, Chromium and WebKit,
  en/zh/zh-TW/ja/de, at 980 and 420 wide: 20/20 pass; against the old
  library.js it fails. library-*.test.cjs, mcp-signin, search-mcp,
  i18n-keys and click-scroll in both engines: 377/377 pass.
- gofmt -l (nothing), go vet / GOOS=linux / GOOS=windows go vet -tags nogui
  on internal/library and internal/gui, go build for darwin, linux and
  windows (nogui). Full go test -tags nogui ./... under the queue lock:
  every package ok but internal/provider, where TestClaudeSavedAccountDir
  failed "sign-in never finished" (waitDone's 2s bound on a fake claude
  process under full-suite load); alone it passes 5/5. Not touched here.
2026-10-11 09:24:07 +08:00
yetone 177fbdfe28 library, gui: the agents a skill is installed for have an All chip, one click takes them all off (#1531, liuweifeng)
Installing a skill from a repository starts with every agent lit, so
installing it for one agent alone meant unticking each of the others.
The picker now has the All chip the library's skill and server rows
already have (allChip): lit while every agent that can take it is lit,
a click takes them all off, another puts them all back. Only this one
is then All + that agent's chip, two clicks, with the same control as
the rows rather than a new idiom.

The same fix reaches every sibling picker that chooses agents before an
item is added: the market's skill install, the MCP server editor (add
and edit), pasting several servers, and the market's server install.
No new strings: All and its tooltips are already in every language.
The CSS sets All a little apart from the icons outside a row.
docs/subsystems/library.md says so.

Run:
- new internal/gui/tests/skill-install-agents-all.test.cjs: Chromium and
  WebKit, en/zh/zh-TW/ja/de at 1100px and 420px, with the reporter's
  repository: All lit at first, All -> none, Codex -> install posts
  agents ["codex"]; All puts every agent back; the server editor's All
  too. 28/28 pass; on the old library.js/css 0/28.
- the library's sibling GUI tests (by-agent, every-skill,
  group-skill-chips, library-*, market-have, market-featured-skill,
  pick-skills, project-servers, skill-install-skip,
  skill-name-many-agents, mcp-signin, import-all-skills) in both
  engines: all pass, except library-servers-bulk's known 2px flake
  (#1322), which fails the same way with this change reverted.
- screenshots of the picker in zh at 1100px and de at 420px.
No Go changed.
2026-10-11 01:45:47 +08:00
yetone ad136426d2 gui: the context window's 400 cells and other entrance animations let go of their layers once played (#1481, hoffman24)
hoffman24's macOS app had a WebKit WebContent process over 1GB, 866MB of
it IOSurface graphics buffers for ~1,600 compositing layers. One clear
cause is ours: entrance animations played with fill "both" stay in effect
for good once finished, and an element with a finished transform/opacity
animation held keeps its compositing layer. The context window card's
waffle is 400 cells, each with ctx-cell (opacity + scale) and fill both,
so every card on Routing kept 400 layers alive.

Every one of these keyframes only says where the element starts (from),
or ends where its own style already is, so "backwards" draws the same
before and during the animation and lets go after:
- context.css: ctx-cell (waffle cells), ctx-grow (cache bar), ctx-arc
  (ring), ctx-draw (tune chart), ctx-pop (tune dots)
- library.css: lib-skel-in, .mk-card content-in (a market card's hover
  lift now shows too: the held animation overrode its transform)
- routing.css: .masking .pii rtpii

Measured on Routing with one context card (origin/main assets vs these):
- document.getAnimations(): 412 -> 13 (WebKit), 412 -> 15 (Chromium)
- Chromium CDP LayerTree: 421 layers -> 21

held-animations.test.cjs opens Routing with three traced requests,
waits for the cells to finish and asserts no finished animation is held
and the card looks the same (every cell opacity 1, no transform, cache
bar grown). It fails on origin/main ('ctx-cell': 400 held) in all four
cases and passes here: Chromium and WebKit at 420 and 1100px.

Run: the GUI tests touching ctx-/mk-card/lib-skel/masking/Routing/
Library (116 files): Chromium 576/576, WebKit 574/576. The two are one
case of routing-pointer-pin.test.cjs, whose card moved 588.56 -> 590px
under the full run's load; alone and 4-up it passed 3/3 and 36/36 here,
and 12/12 on origin/main's assets 4-up. Filed with the purpose-filter
WebKit 1px drift.
2026-10-10 20:00:38 +08:00
yetone cde2a351e2 library, gui: the Skills and MCP tabs' strip has a Discover button that goes to the market under the list, many screens down with dozens of skills (#1348, ttmouse)
The strip that stays at the top of the Library page gets a Discover button on
the MCP and Skills tabs. It scrolls the market's heading to just under the
strip (through scrollOnPurpose, so the click-scroll guard lets it) and puts the
cursor in the market's search box. The strip's buttons now keep together at its
end and wrap onto a line of their own when the window is too narrow, so the
window's 560px minimum doesn't scroll sideways.

New test library-discover-jump.test.cjs (Chromium and WebKit, en and zh, web
and window, 1000px and 560px; 60 skills, 40 servers): the market starts more
than 700px below the view, the button fits without sideways scroll, and after
the click the market is in sight under the strip with its search box focused,
and still is 500ms later. It fails without the library.js change (12 failures
waiting for the button).

Ran: library-discover-jump 64/64; library-*, market-*, click-scroll, gui-ja,
gui-de, gui-zh-tw, i18n-keys, skill-*, mobile-web, phone-web, project-* and
others in both engines, 520/524. The 4 failures: library-servers-bulk in
Chromium fails the same without this change (#1322), and mobile-web's 900px
desktop compare timed out / differed by 338px on Providers under
--test-concurrency=6; run alone it passed 30/30 twice.
2026-10-09 01:20:22 +08:00
yetone 0d8f85e47b gui: Providers, Library and Plugins no longer scroll 12-16px sideways in macOS 15 with scroll bars shown (#1236, pineog)
Library's and Plugins' sticky tab strip (.lib-head) and Providers' sticky
Add bar (#view-providers .after-list) reached over the view's side padding
by a negative margin (-12px, -16px in the window, the view's padding in
the narrow browser page), so their boxes ran 12-16px past the view's
content end edge. macOS 15's WebKit (Safari 18) takes a flex scroller's
scrollable width as the furthest in-flow child's right edge plus
max(0, margin-end), then adds the padding-end (RenderBlock::computeOverflow's
includePaddingEnd, before WebKit 290159@main / bug 218579, which shipped in
macOS 26): the negative margin is left out, the page is 12px (Providers) or
16px (Library, Plugins) wider than the view, and with classic scrollbars a
draggable horizontal bar shows. That is the reporter's three pages and only
those, at every text size and width. Chromium and macOS 26's WebKit count
the margin, so neither scrolls.

The strips' boxes now keep to the content box; a ::before paints the
frosted strip / the fade over the padding (--bleed-l/-r), the hairline
moves to it, and the pre-color-mix fallback too. Looks the same
(before/after screenshots, light, window and browser page).

New internal/gui/tests/view-no-sideways.test.cjs visits every page, en/zh/
ja/de, the window (body.mac) at 560 (windowMinW) and 1000px and the browser
page at 360/440/1000px, Chromium with its scrollbars shown and WebKit, and
checks both macOS 15 WebKit's sum, worked out from the layout, and the
engine's own scrollWidth. Red before: 40 of 40 cases in each engine, on
providers (12px, div.after-list), library and plugins (12/16px,
div.lib-head) and no other page. Green after, 42/42.

Also run, BROWSER=chromium and BROWSER=webkit (712 of 714 pass; the 2 are
library-servers-bulk in Chromium, the same 2px flake on the old assets, #1322):
click-scroll, gui-ja,
gui-de, add-button, deprecated-subscriptions, plugin-market,
provider-discovery, every library-*, plugin-* and provider(s)-* test.
GOOS=linux and GOOS=windows go vet -tags nogui ./internal/gui pass.
Not tried in a real macOS 15 WKWebView: this Mac runs macOS 26, whose
WebKit has the fix; the rule was read from WebKit's source at 2025-01.
2026-10-08 22:11:26 +08:00
yetone dcbae2ef98 library, gui: the MCP servers page has the skills page's Select, Turn all on, Turn all off and Remove all, under one "In the library" heading (#1027, emo172)
The servers page had only By agent and the order, each with its own "In the library" heading, so with both the heading showed twice. Turning every server on or off, or removing them all, took one chip or one row at a time. The page now has one heading (lib-serverhead, which wraps when narrow) holding the order, Select, Turn all on, Turn all off, By agent and Remove all, as the skills page does. The skills page's helpers now serve both pages rather than being copied. picking names the page ("skills" or "servers"). pickingFor, pickRow, pickBar and groupChips(kind) are shared, and so are everyButtons, confirmEveryOff and everyOf, which replace everySkillButtons and everySkill. removeEveryButton, confirmRemoveEvery and removeEvery replace removeEverySkillButton. The skills page says and does what it did before.

- Turn all on and Turn all off post every agent shown to servers/agents-all (EveryServerAgents, now serversAgents(nil, …)). A hidden agent is left alone. Turn all on is greyed once every server is on for every agent that can reach it. Turn all off asks first, in the page.
- Select puts a box on each row. A row's click ticks it rather than opening the server. The bar's chips post the servers picked to the new servers/agents-some (SomeServersAgents), which gives an agent only the ones it can reach (mcpFile.supports) and leaves unnamed servers and agents as they are. An agent that can reach none of the picks has its chip greyed, with the reason.
- Remove all asks first. It says which agents lose the servers, the projects they are taken from, the sign-ins forgotten, and that the agents' own servers stay. It then posts every name to the new servers/remove-all (RemoveServers). This is one change that takes each server out as RemoveServer does: out of the library, its projects and its icon (removeServer, now shared by both), then out of every agent through syncMCP, which takes only what Applied says magpie wrote, and then forgets its sign-in. A name the library hasn't is listed in Unremoved, and the rest go all the same.
- The pick bar wraps, so its chips and Done fit at 440px in ja and de.

TestRemoveServers checks a server the user put in Claude Code's file and Codex's own "docs" of a library server's name: both stay, while fs, docs and neon leave the library, both agents and the project's .mcp.json, and the project's own "team" stays. neon's sign-in is gone, "nope" is reported, and an empty list or one with only "nope" errors. TestSomeServersAgents checks that Codex gets fs but not the SSE web, that git stays untouched, that a call naming no servers or no agents errors, and that a call naming an unknown server writes nothing. Both pass with -race -count=10, alongside TestEveryServerAgents and TestRemoveServer*.

library-servers-bulk.test.cjs passes on Chromium and WebKit in en, zh, ja and de at 440px. It checks one heading with every button, Turn all on's post without the hidden Copilot CLI, Turn all off's Cancel posting nothing and Confirm keeping Copilot CLI's, the pick bar's codex chip posting agents-some for the two picked and its greyed state for web alone, the All box, Done, and Remove all's lines, Cancel and post. It also checks for no sideways scroll and that each control clicked stays where it was on the screen. The fake check answers every server, since an unchecked one is checked again at each drawing. It fails without the change and passes 6 runs beside pick-skills, every-skill and gui-ja at --test-concurrency=4. by-agent, pick-skills, every-skill, remove-all-skills, group-*, library-*, mcp-signin, project-servers, skill-*, i18n-keys, gui-ja and gui-de pass. skill-how's WebKit case and click-scroll's "Live and a day" fail the same on the unchanged origin/main when run beside each other, and pass alone. go test -tags nogui ./internal/..., go vet, gofmt -l, and the linux (nogui) and windows builds pass. Not tried in the real app. docs/subsystems/library.md says it.
2026-10-06 22:24:04 +08:00
tsuixl bd33e575f1 gui: let users choose installed interface and code fonts (#1007)
* gui: choose installed interface and code fonts and styles

Discover installed styles through DirectWrite, CoreText and Fontconfig. Keep choices per computer, apply them before paint and notify both desktop webviews after saving; defaults retain platform and Omarchy fallbacks.

Verified seven focused Go tests, including real Windows discovery (90 families, 276 styles), 14 font browser cases in Chromium/WebKit, 68 settings/zoom/Omarchy/web cases, go vet, Windows amd64/arm64 and Linux nogui builds. Against the original assets, the new UI test fails with Settings must offer an interface font picker (0 != 1). Full Windows suites have separately reproduced upstream failures; macOS/Linux native discovery is covered by the added CI step.

* gui: retain bundled Mac fonts and variable style precision

Only filter an undownloaded CoreText face when it is explicitly downloadable; bundled fonts are installed without being downloaded. Use resolved font names when descriptors omit them. Preserve fractional weights and nonnegative CSS widths for named variable styles.

* gui: restore the authored font cascade when returning to defaults

Apply family-only trait overrides only while a custom face is active. The browser regression catches code under a bold parent becoming 700 instead of its original 400. Keep the compatibility shim first, and apply boot fonts before visible content.

* gui: keep font picker review separate from CI integration

Leave the native test sources and manual verification command with the feature. Move the added workflow step to a follow-up so the font picker can take the normal review path requested on PR #1007.
2026-10-06 19:32:56 +08:00
yetone 69665a6960 gui: styles hold up in Safari 15.0–15.3 again (macOS 12, #220) — no :has(), and :focus-visible kept out of selector lists
old-webkit failed on main: app.css and routing.css had :focus-visible inside
selector lists (.quota-refresh, .sess-go, .acap, .alane, .us-handle, the
routing group and member grips) and inside :is() (.am-or's grip). Safari
before 15.4 drops the whole rule, so the hover reveal went too. Those parts
now sit in rules of their own. library.css and routing.css used :has().
A library row with agent chips is now marked .with-agents by agentChips,
and a request whose tag says where it went upstream is marked .upstreamed.

The keys-row collapse (#841) and the library chips' rings kept a control
out with :not(:focus-visible), which Safari before 15.4 also drops whole.
Each now has an @supports not selector(:focus-visible) copy on :focus.
old-webkit's checker now splits a selector list on its own commas, not
those inside :is()/:not(). It also wants that fallback wherever
:not(...:focus-visible...) is used.

The new old-webkit fails on origin/main's assets (12 findings) and passes
with this change in Chromium and WebKit. account-cap, lane-limit,
fold-show-grip, group-member-drag, library-all, library-items, pick-skills,
skill-name-many-agents, routing-upstream, usage-arrange, usage-card-refresh
and click-scroll pass in both. group-arrange fails in Chromium en the same
way on origin/main.
2026-10-06 05:07:13 +08:00
yetone a806409394 gui: a skill's name and its group's repository stay in the row beside many agents' chips, and a group's head reads as its card's title, not one more skill (#936, liuweifeng)
With some 25 agents the hand of agent chips in a Library › Skills row (each chip flex: none, plus a spacer reserving room for the fan-out) was wider than the row, so the name beside it (min-width: 0) was squeezed to 0px: every skill and every group head showed only its icon and chips, and the heads, looking like the rows under them, read as the list shown twice. The name now keeps min(140px, 32%) of the row, and with many agents the chips close up (each further under the one before, -7px down to -19px) so the hand stays within about half the row; the fan-out on hover opens only as far as there is room. The row is a container for that (cqw); a WebKit without container units keeps -7px and 3px. A group's head is shaded, its repository in bold.

skill-name-many-agents.test.cjs (Chromium, WebKit; en, zh; 866px and 560px windows, 30 agents, grouped skills) checks that every skill's and head's name is shown inside its row, the chips stay in the row, the heads name their repositories and don't look like a skill's row, and the page doesn't scroll sideways; it fails without the change ("mattpocock/skills: its name is 0px wide"). The 33 Library GUI tests pass, but for library-own-folder, list-sort and shared-skills, which fail the same way on main before this change. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass.
2026-10-06 01:51:50 +08:00
yetone 3c7ceb68f4 library, gui, cli: skills can be given to the agents as copies rather than links, for every agent or one (#896, ADabbler) — the Library linked each skill into the agents (a copy only where it couldn't link: Windows without the right to make links, WSL, Claude Desktop), and some want each agent to have a folder of its own. Skills › under the list, "Give skills as: Links | Copies" sets the library's way (library.json copySkills), and By agent gives an agent its own way (skillHow: Library's way / Links / Copies; Claude Desktop and WSL only ever take copies and have no switch). A copy is the whole skill folder with the .magpie-library marker, made by the same swap as before (.name.magpie-next, the old one set aside), so it is known for magpie's: taking a skill away removes magpie's copy and never a folder of the user's by that name. Switching makes each enabled skill again in place: a link becomes a copy; a copy becomes a link (made beside it and swapped in; a copy edited by hand is kept with the backups first). Where a link can't be made (Windows without the right) it stays a copy, as before. A copy follows the library's skill on every sync (at start, and after any change in the Library) as before; one that differs now (the library's folder edited by hand) is marked "Copy out of date" on the skill, saying in which agents, and a click copies it again. CLI: magpie library skill how link|copy [agent], magpie library skill how default <agent>. en/zh/ja/de. TestSkillHow (temp HOME: links at first, bad ways refused, copies marked, Read's how and copySkills, behind after a hand edit and cleared by a sync, codex its own way, an edited copy kept in the backups, back to the library's way, the user's own same-name folder and own skill untouched both ways, a copy removed with its skill) fails without the change; TestSkillCopyFollowsTheLibrary and TestSkillCopySwapSurvivesAnUndeletableFile now ask for copies rather than leave a copy where links are given, which is made a link again now. skill-how.test.cjs (WebKit, en and zh: the bar, Links/Copies posted with the note and status, the out-of-date tag with its agents and a click syncing without opening the skill, By agent's sheet with Claude Desktop's copies-only row and no switch, an agent's way posted and back to the library's, By agent (1), no select, no scroll, no left border) fails without it. Every Library and skill GUI test and click-scroll pass in WebKit. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass. 2026-10-05 19:46:55 +08:00
yetone 6ac01d2835 library: the skills picked can be put in a group of the user's own (#791, mintonight: 能不能在选择后自己创建分组呢) — with Select on (By source), the pick bar has Group…, which asks a name in the bar (Enter makes it, Escape goes back; a group there is is offered to add them to). The group is kept in library.json (skillGroups) and shown as a card of its own above the groups by source, open, its skills taken out of their sources' cards; a skill is in one group at most. The card has Rename (in place) and Ungroup, and the pick bar Ungroup for picked skills that are in one; grouping changes only how the page shows the skills, never what the agents get. A skill taken out of the library leaves its group, and an empty group goes. zh/ja/de strings added. TestSkillGroups and skill-groups.test.cjs (WebKit, en and zh: group, rename, ungroup; it fails on the old code, which has no Group…); pick-skills, skill-parts, group-skill-chips and the other library tests pass on WebKit. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass (TestProvidersAnswerWhileListsComeIn, TestUserPath and TestClaudeSignedOut flaked under load and pass alone). 2026-10-05 01:21:05 +08:00
yetone 26706c3371 library: skills are picked to turn on or off together, and a part of a list (lark-*) has its own chips (#791, mintonight: 资源库中local中的技能,能不能支持多选分组,或者支持多选来开启或关闭 … lark-* 我希望把他们归到一起统一来管理) — the skills on this computer are one list with no heading when they're all from there, so #787's group chips never showed for them, and Feishu's lark-* skills were turned on or off one row at a time. A part of a big list (its skills' shared name start, or their folder) now has chips on its heading, as a repository's heading does: lit when an agent has them all, half lit when it has some, a click gives it every one or takes them all, All does it for every agent; a click doesn't fold the part. Select, beside Turn all on, puts a box on every skill's row and on every heading (ticked when all under it are picked, half with some), a row's click picks it instead of opening its SKILL.md, and a bar that stays in view under the list says how many are picked, has a box for every skill the filter shows ("All 4 that match"), the same chips for the picked ones, Clear and Done; the picks stay through a change and Done takes the boxes away. A pick doesn't scroll the page. zh and ja strings added. pick-skills.test.cjs (WebKit, en and zh): the lark part's Codex chip posts the four lark skills, rows and headings pick, the bar's chips post the picked ones, the filter's All picks what it shows, Done ends it; it fails on the old code. Looked at in light and dark. group-skill-chips, every-skill, library-all, library-items, library-toggle-status, library-row-open-scroll, own-skill, remove-all-skills, shared-skills, import-all-skills, library-own-folder and library-loading pass on WebKit; Chromium doesn't launch in this sandbox. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./internal/gui/ under a temp HOME pass. 2026-10-04 22:52:01 +08:00
yetone 13742b1cb4 library: a repository's skills are turned on or off for an agent at once from its group's heading (#787, mintonight: 我记得昨天还能直接一次性开关一个作者的所有技能包,怎么今天不行了) — the heading of a repository's group (owner/repo, N skills) showed which agents had its skills as plain icons, which looked like the rows' chips but did nothing, so its skills could only be switched one row at a time (or every skill in the library at once). The icons are now chips, as on a row, with All ahead of them: a chip is lit when its agent has every one of the group's skills, half lit (dashed, the icon dimmed) when it has some, and a click gives that agent every skill of the group or, when lit, takes them all; All gives them to every agent shown, or takes them from every one when all have them. Other groups' skills and agents not clicked keep what they have; a click doesn't fold the group. The page sends the group's skill names to a new library/skills/agents-some, library.SomeSkillsAgents, which is EverySkillAgents for the skills named alone (one write; a name not in the library is refused). zh and ja strings. TestSomeSkillsAgents (on and off for named skills only, the agents' folders follow, an unknown or empty name list refused) and group-skill-chips.test.cjs (WebKit, en and zh: lit/half-lit, a click on a half-lit chip, a lit chip, All on and off, the requests sent, the group not folded) — the latter fails on the old code. gui-ja, list-sort, own-skill, shared-skills, every-skill, library-all, library-toggle-status, library-items, remove-all-skills, import-all-skills, library-row-open-scroll and click-scroll pass on WebKit. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-04 21:23:31 +08:00
yetone 680ca5508f library: RTK's savings are read from rtk gain's stdout alone, a count rtk couldn't give says why instead of "Nothing saved yet", and the page says whose commands the count is (#741 part 2, on Windows with magpie 0.1.807, RTK 0.51.0 and Codex: the RTK card said 还没有节省记录 while rtk gain in a terminal listed savings) — ReadRTK ran rtk gain --daily --format json with CombinedOutput and json.Unmarshal'd the lot, and took any error, from rtk or from the JSON, for nothing saved. rtk writes warnings to stderr with the JSON on stdout — on Windows the console code page it has no decoder for (warn_unmapped_codepage), a command it couldn't resolve, a history table it found damaged — and any of them in front of the "{" made the output unreadable, so the card said nothing was saved however much was. rtkGain now runs it with stdout and stderr apart (stdin closed, 30s at most), parses stdout from its first "{" to its last "}" (a notice printed ahead of it is passed over), and when rtk fails or prints no summary it can read, gainErr says so with what rtk said ("rtk gain: <last lines>", "rtk gain printed no summary magpie can read: …"), shown on the card as "magpie couldn't read what RTK saved: <why>" and by magpie library as "what rtk saved isn't known". magpie counts no agent itself: the figure is rtk gain's, global, every command any agent or terminal ran through RTK on this computer, and the card now says that after it, so an empty one isn't read as magpie counting only some agents. On Windows, Codex with its Windows sandbox on (config.toml's [windows] sandbox = "elevated"/"unelevated", or the older elevated_windows_sandbox / experimental_windows_sandbox features, and not danger-full-access) runs its commands as its CodexSandbox account, whose own %LOCALAPPDATA%\rtk\history.db keeps what RTK saved there, or with a restricted token that can't write the user's — either way not in the rtk gain the user runs; ReadRTK reports that as codexSandbox, and the card (and magpie library) says why what Codex saves isn't counted. The count is read again each time the RTK tab is opened, so commands run since show without restarting magpie. TestRTKGainRead uses a fake rtk: a code-page warning on stderr with JSON on stdout (read — the old CombinedOutput code says nothing saved), a notice line before the JSON, zero commands, an rtk that exits 1, and one that prints no JSON, with the exact gainErr; TestCodexSandbox covers each config form. library-rtk-gain.test.cjs (webkit) checks the reason and the scope line, the Codex sandbox note, and that reopening the tab re-reads the count, in English and Chinese. go vet, builds (darwin, GOOS=linux -tags nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass, as do the Library and click-scroll GUI tests. Not tried on the reporter's machine: which stderr line broke it there isn't known (the card now shows it if it's still there), and the Codex sandbox account's separate history is from Codex's and RTK's source, not seen on a real Windows Codex. 2026-10-04 12:15:40 +08:00
yetone 5e3343c0ad library: a failed RTK upgrade says what went wrong — the tool, its exit code and what it last said — on the RTK card, and a finished one says so (#741 part 1, on Windows with magpie 0.1.807, RTK 0.51.0: Library → RTK → 升级 only flashed a red, cut-off WinGet command line) — runInstaller's error was "<the whole command line>: <its last 4 lines of output>", and the GUI showed it in the status pill, which is one line wide and times out, so a long winget upgrade --id rtk-ai.rtk --exact --silent --accept-source-agreements --accept-package-agreements filled it and nothing of why it failed was ever seen; winget also writes its spinner (-\|/) and progress bars between carriage returns to a pipe, so the "last lines" were mostly those. runInstaller now returns installFailed: "<tool> failed (exit code N)" — winget's HRESULT exit codes as 0x8A15…, whether Go reports them as the uint32 or a negative int, with what AppInstallerErrors.h means by the common ones (no newer version, package in use, no network, not found, installer failed, blocked by policy, …) — or "<tool> didn't finish in <timeout>" / "<tool> couldn't run: <err>", then " — " and the last 3 meaningful lines the tool printed (installerSaid: ANSI codes and bad UTF-8 dropped, split at \r and \n, spinner frames, progress bars and winget's licence boilerplate left out, 400 runes at most). winget's "no applicable upgrade" (0x8A15002B) isn't a failure: UpgradeRTK re-reads RTK and says winget has no newer RTK than the one installed yet (or, as before, that winget hasn't got the release GitHub has). In the GUI, the upgrade under way says "Running <cmd> — this can take a few minutes." on the RTK card; one that failed leaves "The upgrade failed: <why>" there (red, selectable, wraps), the pill only says the card has the reason, and the card is read again so the version the installer left is shown; a later try clears it, and a success says "RTK is now <v>" with the new version, as before. TestRTKUpgradeFailureSaid feeds installFailed winget-like output (spinner, progress bar, licence lines, 0x8A150101 both as 2316632321 and -1978334975) and checks the exact message, plus 0x8A15002B, a curl exit 6 through sh, and real processes: one that exits 3, one that isn't there and one that times out. library-rtk-upgrade.test.cjs (webkit) checks the running line, the failure on the card and the short pill, the re-read after a failure, and a retry that clears it and shows v0.51.0, in English and Chinese. go vet, builds (darwin, GOOS=linux -tags nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass, as do the Library GUI tests. Not run against a real winget: the exit codes and output shape are from winget's source and docs, not the reporter's machine, and nothing was installed or upgraded here. 2026-10-04 12:15:40 +08:00
yetone 4f25ed83d3 library: Discover finds an MCP server by its address — a repository, page, endpoint or package pasted in (lc on Discord: https://github.com/crystaldba/postgres-mcp in Library › MCP › 发现 said 没有与 … 匹配的结果) — MarketServers matched featured servers on their words and asked the MCP Registry with the search as typed, and the registry's search is a part of a server's name (checked: "postgres mcp" lists 0, "crystaldba" 0), so a URL found nothing anywhere. A search that reads as an address (address: a scheme, git@, www., host/path, owner/repo or @scope/pkg; words with a space, or a bare word, are searched as before) is normalised (normAddr: lower case, no scheme, user, www., query, fragment, trailing slash or .git; npmjs.com/package/x, pypi.org/project/x, hub.docker.com/r/x and docker.io/x are the package, an image's tag and a package's @version dropped) and matched (addrScore: equal, under it, or a file under one's repository; owner/repo on any host; never a bare host or an owner's page standing for every repository) against each server's addresses: a featured one's page, endpoint and package; a registry one's name, websiteUrl, repository.url, remotes' URLs and packages' identifiers. The registry is asked for the names the address suggests (addrTerms: the repository's or package's name, then its owner's; a site's name for an endpoint, context7 for mcp.context7.com/mcp), and what it lists at the address comes first and alone, marked match; when nothing is, what it lists for the first name is shown, as that search would. Searched against the live registry: github.com/Eszetael/postgres-mcp-hardened.git, ghcr.io/eszetael/postgres-mcp-hardened:0.1.10, github.com/upstash/context7, https://mcp.context7.com/mcp (featured Context7), npmjs.com/package/@playwright/mcp (featured Playwright), github.com/modelcontextprotocol/servers (the reference servers) and an endpoint of ai.getvda's each find theirs. crystaldba/postgres-mcp itself isn't in the registry (no name, repository or package of it in the 124 servers a "postgres" search pages through), so it shows the 12 others called postgres-mcp, and above them "None of these is at {q} — they're found by its name." (以下都不在 {q},是按它的名字找到的。; "Nothing listed is at {q}." 没有列出位于 {q} 的服务器。 when none) with "+ Add it yourself…" (+ 自己添加…): the market's answer carries custom (CustomAt) when the search is an address nothing found is at, and the button opens the existing new-server form filled in — named for the repository (postgres), an endpoint's URL as HTTP, npx -y / uvx for an npm or PyPI page. TestAddress, TestAddrScore and TestMarketFindsByAddress (a fake registry that searches names: by repository found through its owner's name, featured by endpoint, repository, package and a repository folder, registry by endpoint, by name with one to add by hand, words as before) and market-address.test.cjs (webkit, en and zh: the note over the name matches, the form named postgres with no command, an endpoint's URL in it, words that match nothing as before; fails on the old library.js) pass, as does market-have. go vet ./internal/..., builds (-tags nogui, GOOS=windows) and go test -tags nogui -count=1 ./internal/library/... ./internal/gui/... under a temp HOME pass. Not tried in the app. 2026-10-04 07:54:08 +08:00
yetone 5c1160a8cc library: each MCP server in the Library shows whether it works — a dot and a few words beside its name (12 tools, needs sign-in, can't start: uvx not found, exited (1), no answer, connection refused, the server's HTTP status), the whole reason (the server's last stderr line, the status line) in the tooltip; checked once a session when the MCP list opens, and again by clicking it (Discord, lc: a status display for MCP servers in the Library page) — POST /api/library/mcp/check {names, fresh} runs library.CheckServers: up to four at once, 15 s each, by really connecting. A stdio server is started with its command, args and env (proc.Command + StartTree, so the whole tree is ended after, Windows too), sent initialize (2025-06-18, clientInfo magpie), notifications/initialized and tools/list over newline JSON; a missing command is "not found", an exit before the reply gives its code and last stderr line. A Streamable HTTP server is POSTed the same with Accept: application/json, text/event-stream, a JSON or SSE reply read, Mcp-Session-Id and the negotiated MCP-Protocol-Version carried, magpie's own sign-in token sent when it has one and the session DELETEd after; 401/403 is "needs sign-in" (OAuth when WWW-Authenticate says so). A legacy SSE server is read through its endpoint event. A server without tools/list (-32601) is fine with 0 tools. Results are kept in memory for the session, keyed on the server's definition and sign-in state, so an edited server is checked again; nothing is written to any agent's config. The GUI keeps a status per server name, paints it on the row (a grid in .who so .who > .name stays as other tests read it), a checking state pulses, the click stops propagation so it neither opens the server nor scrolls, and the strings are in i18n.js (zh). TestCheckStdio (ok with 3 tools after a junk stdout line and a notification, exit 3 with its stderr, not found, timeout ending the server and its child), TestCheckHTTP (JSON and SSE replies with the session and token carried, OAuth 401, key 403, 404, broken JSON, timeout, refused), TestCheckSSE and TestCheckServersOnce (cached, fresh, re-run on a changed env, no file under HOME changed) use a fake server re-executed from the test binary and httptest, -race; library-mcp-health.test.cjs (en and zh: one check for all servers on opening, texts, tooltips, dot not border, row height, no re-check on returning, a click re-checks only that server without opening it or moving the page, no <select>) fails on the old library.js and passes in webkit with the other Library tests. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. Not tried against real MCP servers from a user's config. 2026-10-04 06:44:51 +08:00
yetone b66f128d2b library: a greyed-out agent chip says why when it is clicked (蓝猫 on Discord: the MCP server's Claude Desktop chip was grey and clicking it did nothing) — a chip whose agent can't be given the item (a remote server for Claude Desktop, which runs only a command from its settings; an SSE server for an agent without SSE) or has it whatever is ticked was a disabled button: its click went nowhere, and WebKit shows a disabled button no tooltip, so the reason in its title was never seen. It is now aria-disabled instead: a click puts the reason in the status line (for Claude Desktop, add a remote server in its Connectors instead) and changes nothing; All, the toast after All and morphChips read aria-disabled where they read disabled, and the pressed look is left out for it. library-all.test.cjs gains the case (Claude Desktop's chip for an HTTP server and Codex's for an SSE one, en and zh: not disabled, the click's toast, nothing posted, the page not scrolled, All passing over it) and fails on the old code; it, library-items, library-toggle-status, library-desktop-skills, mcp-signin, library-own-folder, by-agent, library-row-open-scroll, click-scroll, library-loading and library-rtk-path pass in webkit. 2026-10-04 05:23:43 +08:00
Snowyy e32c49ff76 fix(gui): keep library All chip stable during hover (#648) 2026-10-03 15:01:33 +08:00
yetone bf0f3e3f73 library: a remote MCP server signed in once in magpie is used by every agent without signing in again (#615) — a streamable-HTTP server behind OAuth (Neon, Notion, Supabase) had each agent run its own sign-in. The server's editor now has Sign in: magpie finds the authorization server from the server's 401 (RFC 9728 protected-resource metadata, RFC 8414/OIDC metadata, else the 2025-03 /authorize, /token, /register at its origin), registers itself (RFC 7591, a 127.0.0.1 redirect), opens the browser with PKCE S256 and the resource, and keeps the tokens in mcp-signins.json beside its other account secrets (0600, never the keychain). While signed in, the agents are given the gateway's /mcp/<name> for that server, without the Authorization the library has for it; the gateway passes POST (JSON or event stream), the GET stream and DELETE on with the Mcp-Session-Id and magpie's token, renews it 2 minutes before it runs out and once on a 401, one renewal per server at a time, and a sign-in the server won't renew is answered 502 "sign in to it again" (never a 401 the agent would act on). Signing out, a new URL or an SSE server gives the agents the server's own address as before; a rename keeps the sign-in and removing the server drops it. /mcp/ is local-only or LAN-shared with the key, and refuses a request with an Origin or a Host not naming this computer, so a web page can't borrow the sign-in through the browser (form posts, DNS rebinding), and isn't counted as busy or key-limited. WSL agents are given their distro's gateway address. The row says Signed in or Sign-in ran out; zh strings added. Tests: TestSignIn, TestSignInWithoutMetadata, TestSignInPage, TestNothingToSignIn, TestTokenRenewsBeforeItRunsOut (8 calls, 1 renewal), TestRenewRefused, TestRenewRefusedForGood, TestMCPProxy, TestMCPProxyStaysHere, TestMCPProxyNotForWebPages (fails without the Origin/Host check), TestSignedInServerGoesThroughMagpie against a local fake OAuth+MCP server; mcp-signin.test.cjs (webkit, en and zh). Not tried against a real Neon/Notion/Supabase sign-in. go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... under a temp HOME pass. 2026-10-03 09:37:39 +08:00
yetone 3b3f5fa726 library: ZCode and Pi get a project's MCP servers too, and a project can be removed keeping what magpie wrote into it (#514, follow-up to #500: zcode支持项目级mcp添加 / pi也支持项目级mcp / 删除项目但保留mcp/skill) — a project's servers went only to Claude Code, Codex, Gemini CLI, Cursor and OpenCode, and Remove took every skill and server magpie had put in the folder away, so a project given some once had to stay in magpie for good. ZCode's project file is <project>/.zcode/config.json, servers under mcp.servers as in its user-wide ~/.zcode/cli/config.json (zcode.z.ai/en/docs/mcp-services, "Configuration Files and Default Load Paths": workspace scope, read before the user's, "enable": false the user's to set), written with fmtZCode (type, command/args/env or url/headers); Pi's is <project>/.pi/mcp.json, mcpServers as Pi's own MCP reads them once the project is trusted (pi.dev/docs/latest/mcp, "Configure servers"), written with fmtPiNative (command/args/env, url/headers, no type; SSE refused, as Pi refuses it), whatever extension the user's own Pi file is written for. Both are merged as the other agents' are: the user's keys, servers and comments stay, a server of the same name that isn't magpie's is left alone and said, a file magpie made (.pi/mcp.json) goes in the .gitignore and goes again once empty, and ZCode's user-wide file isn't touched. The page learns a project file's own SSE limit (projectNoSSE), so Pi's chip is greyed for an SSE server in a project even when its user-wide file (pi-mcp-adapter's) takes SSE; the trust note now names Pi beside Codex. The Remove dialog of a project magpie put anything in has "Keep its skills and MCP servers" / 保留项目里的技能和 MCP 服务器 (a checkbox row in the library's pick style, no coloured left border): checked, the text says what stays and Remove posts projects/remove with keep, and RemoveProject(dir, keep) only takes the project off the list — skills (links still following the library's), servers in the agents' files and magpie's .gitignore lines stay as they are, and nothing magpie does later (a sync, the server removed from the library) touches them; unchecked it removes as before. A one-off add without a project first (pick a folder from a server or skill) is not in this change. TestProjectServersZCodePi (ZCode's file with the user's model, server, enable:false and key kept beside magpie's three; Pi's file made in its shape, the SSE server refused with its reason, listed in .gitignore; ZCode's user-wide file unchanged; removing takes out only magpie's and the file it made) and TestRemoveProjectKeep (every file byte for byte after the removal, after a sync and after the server leaves the library) fail without the change, as does project-remove-keep.test.cjs (WebKit, and Chromium through a temp copy on plain chromium.launch(); en and zh: the box unchecked, its text, no stripe, pressing it scrolls nothing and swaps the text, Remove posts keep: true and says they were kept; a project with nothing written has no box and posts as before) against HEAD's assets. project-servers, click-scroll, library-items, library-all pass; menu-scroll and old-webkit fail the same on HEAD. No live config was read or written. go vet ./internal/..., go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui -count=1 ./... (under a temp HOME) pass (TestFXInState failed on a TempDir cleanup race twice in the full gui run, passes alone and on the rerun; untouched). 2026-10-02 14:10:55 +08:00
Arvak f3ba918491 gui: make magpie web usable on phone screens (#391)
* gui: make magpie web usable on phone screens

* gui: keep phone content readable and retain idle scroll protection

* gui: tolerate small desktop screenshot rendering differences

* tests: synchronize Zhipu team quota request records

* gui: keep every agent field visible on phones

* gui: exercise touch scrolling in the settings usage part

* gui: serve plugin parts in the phone test fixture
2026-10-02 10:15:42 +08:00
yetone 03ab46dda3 library, plugins: the installed lists are sorted as the reader picks, and remember it (#481: the installed MCP servers, skills and plugins had no order the user could choose; the plugins came in the order they were installed) — the Library's MCP servers and the installed plugins now have A→Z and Z→A beside their list, A→Z until one is picked, so the plugins are no longer in the order they were installed in; the Library's skills have By source (the groups by repository and their parts, as before, and still the default), A→Z and Z→A, the last two one flat list of every skill by name, the filter still finding a skill by its repository. Each list keeps its own pick in the browser's storage (magpie.sort.<list>, read and written in try/catch), and a pick redraws only its list, the control left where it was on the screen. The skills' heading, the fullest, goes on to a second line in a narrow window rather than past the page's side. Sorting by use or by when a thing was installed waits for the library to keep those. list-sort (Chromium, WebKit; en, zh) fails without the change; library-items, library-all, own-skill, every-skill, the plugin tests, click-scroll and old-webkit pass; go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass. 2026-10-02 06:33:46 +08:00
yetone e3bf9d05d4 library: one agent's skills or MCP servers are turned on or off at once, and a hidden agent's taken out of it (#475: turning Copilot CLI's 32 skills off was a chip on every row, and once it was hidden on the Agents page it had no chips at all, so what it had been given stayed with no way to take it out) — By agent, beside "In the library" on the Skills and MCP tabs, opens a sheet of the agents that take them, each with how many it has, a Turn all on and a Turn all off; each writes that one agent, every other keeping what it has, and reports what couldn't be written as a row's chips do. An agent hidden on the Agents page is listed while it has any, tagged Hidden and given nothing new; its instructions row is shown while it reads the shared instructions, so it can be switched off. Skills use the existing skills/agents-all; servers get servers/agents-all (EveryServerAgents), which turns on only the servers the agent can reach (no SSE for Codex, no remote one for Claude Desktop). TestEveryServerAgents and by-agent.test.cjs (Chromium, WebKit; en, zh) fail without the change. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; every-skill, library-all, library-items, library-toggle-status, remove-all-skills, click-scroll, old-webkit pass. 2026-10-02 06:33:40 +08:00
yetoneandClaude Opus 5.5 03b4cadb1f library: Remove all beside Turn all on/off takes every skill out of the library at once (#449) — a library of many skills could only be emptied a row's Remove at a time. Remove all, in red, asks in the page first, naming the agents that lose the skills, the projects magpie placed them in, the folders that go to magpie's backups and those of the user's own that are only unlinked; Cancel sends nothing. Confirming sends every name in one call, library.RemoveSkills, which takes each as RemoveSkill does, the folders kept aside together under one backup; one that can't be taken out stays, and is said, while the rest go. magpie library skill rm --all does the same, asking y/N on a terminal and, with none, only with --yes. TestRemoveSkills and TestLibrarySkillRmAll fail without the change, as does remove-all-skills.test.cjs (Chromium and WebKit, English and Chinese); click-scroll, old-webkit, every-skill pass. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass (bar the known Claude account flake TestClaudeSignedOut).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:47:15 +08:00
yetone 71a4da187c library: while the Library loads, the page is drawn as it will be (资源库的加载动画有点草率) — it was one card of four blank bars, each shimmering on its own, with no tabs, and the page jumped when the library came. Now the real tabs are there at once (the last one open picked, and one can be picked while waiting, drawn in its own outline and kept), the Library folder waits, and the open tab's rows are in outline: an icon, a name and a path of varying lengths, a switch where the switches will be, the Instructions card and its Agents heading. The outline fades in only after 180ms, so a quick load goes straight to the page, and one sweep of light crosses every bar together; none with reduced motion. The tabs don't move when the library comes, only gain their counts. The header is one function for both. library-loading.test.cjs (Chromium, WebKit) fails without the change; library-all, library-items, library-toggle-status, import-all-skills, own-skill, market-have, old-webkit pass; click-scroll's WebKit Routing case fails now and then on main as well. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build pass. 2026-10-01 03:20:37 +08:00
yetone ed5b3da53a library: an All chip gives an MCP server or skill to every agent at once (StringKe on Discord: 一个个点太麻烦) — each row of the Library now leads its agent chips with All: one click turns the item on for every agent that can take it (those with no MCP file, or no SSE for an SSE server, are skipped; agents hidden on the Agents page keep what they have), and once all have it a click takes it off all. It is one call to the same servers/agents or skills/agents endpoint as a single chip, so the row isn't redrawn and nothing scrolls; a partial failure says on how many it took and names the first refusal, and the refused chip carries its dot. Shown only where two or more agents can take the item. library-all.test.cjs (Chromium, WebKit, en/zh) fails 14/14 without the change. library-all, library-toggle-status, library-items, shared-skills, old-webkit, click-scroll pass (70); go test ./internal/gui passes. 2026-09-30 22:07:21 +08:00
yetone 68f9daa4fa library: an agent's own copy of a library skill gives way to it, and one that differs is settled from the warning (StringKe, JasonLeeForOnly on Discord: after Bring in all, "Claude Code already has a skill of its own called impeccable", 这里没有强制覆盖的能力) — a skill is brought in from the agent with the very folder and given to the agents that had that folder; another agent's copy (CC Switch copies a skill into each agent) was listed as "differs in" and left out, and giving the skill to it, or a copy put back into an agent after its folder became magpie's link (by CC Switch or whatever installed it), was a hard failure with no way out. A folder there holding the same files as the library's (bytes compared; .DS_Store, .git and magpie's copy mark aside) is now set aside into backups/<when>/<agent>/skills and the library's linked in its place; a skill brought in takes the agents with such a copy too, which are no longer said to differ; a move that copied it all but couldn't remove the folder brings it in all the same, what was left set aside. One that differs keeps the warning, now in the reader's language with "Use the library's" (the agent's set aside, the library's linked) and "Keep <agent>'s" (the agent, and any reading the same folder, taken off the skill) on its row — skills/use-library and skills/keep-own, magpie library skill use-library|keep-own <name> <agent>, which the CLI suggests under the problem. Backups holding a skill set aside are never pruned. TestOwnSkillInTheWay, TestSameTree, TestPruneKeepsSkillsSetAside and own-skill.test.cjs (Chromium, WebKit, en/zh) fail without the change; TestSharedAgentsSkills now expects the byte copy to be the library's. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./... pass; own-skill, import-all-skills, library-items, shared-skills, market-have, click-scroll, old-webkit pass. 2026-09-30 19:42:43 +08:00
yetone 23365f2216 library: a long link or description stays inside its row, an icon whose picture failed is drawn again, and what the Library couldn't write is listed on the page (#257 long links break an item; Discord, neiko: Claude's icon missing until a refresh; JasonLeeForOnly: the toast says "see Library" and the Library shows nothing)
#257: in a skill's source line the "linked from" / 链接自 label could shrink, and Chinese breaks after any character, so a long path squeezed it into a column of single characters; the line grew tall, and skill rows in a long list have a fixed height with overflow hidden, so the name was clipped and the path cut. The label now stays whole on one line and the path gives way with an ellipsis; long names and descriptions break anywhere rather than widening the row. Icons: each agent's icon was made once and copied onto every row, so if the first copy's picture failed to load every copy stayed empty until a reload. An icon whose picture fails is dropped from that cache, a drawn one asks for its picture again (up to 3 times, growing delays), and the Library's icons are built apart from the Providers page's recycled ones. Problems: the Library only showed a problem as an amber dot on a chip, with nowhere for an agent's instructions, its whole MCP file, a removed server, a project, or an agent hidden from the page, and the failures of applying a profile were never shown although the toast pointed there. GET /api/library now returns every standing problem, and a card above each tab's content lists them (amber dot, no stripe): which agent or project, what failed, the error, with Try again re-running all/sync; it updates in place when a chip is toggled. en and zh. Tested with a new library-items.test.cjs, Chromium and WebKit, en and zh (18/18): long names, links and descriptions inside their rows with the label on one line in light and dark at 980 and 560px, the card's lines and errors, Try again posting all/sync without moving the page, a chip click updating the card with the row in place, Claude Code's icon appearing after its picture fails for the first 300ms; all fail against the old library.js/css. click-scroll, old-webkit and shared-skills pass. go vet, go build -tags nogui (and GOOS=linux, GOOS=windows) and go test -tags nogui ./... pass (TestClaudeSignedOut timed out under load and passes alone). Not tried in the real Wails window; the icon's first failure is simulated, its real cause not reproduced.
2026-09-30 11:01:17 +08:00
yetone b881932ec2 gui: the page runs in macOS 12's WebKit — no regex lookbehind, the few newer built-ins filled in, fallbacks for container queries, subgrid, :has and color-mix (#220 uclort: on macOS 12.7.6 the app opened blank, the panel showing its tab bar, a "Profiles + Save current" heading and "Open magpie · Quit" and nothing else, no button working) — the page runs in the system's WebKit, on macOS 12 Safari 15.x's, and app.js's snippet highlighter had a regex lookbehind, (?<==)\S+ (app.js:2167), which WebKit only parses from Safari 16.4: a SyntaxError in a literal fails the whole file, so app.js never ran (and routing.js and library.js, which lean on it, threw), leaving index.html's static markup; library.js had two more, (?<![\w-]) in the SVG greying (library.js:162-163). The highlighter now finds a value after "=" by hand (the character before the match, a sticky \S+) and the greying checks the character before a colour name in its replace callback, each giving the same output as before (compared on shell, curl, Python and Node snippets and an SVG with attribute and style colours, data-fill and x-color left alone). Built-ins newer than Safari 15.0 in use, routing.js:307's findLast and library.js:1042's structuredClone (15.4), are filled in by a new compat.js loaded before the other scripts (with at, findLastIndex and Object.hasOwn), each only where missing; structuredClone there is a JSON copy, enough for the API's plain data. Styles: a selector list with :focus-visible (15.4) drops the whole rule before 15.4, so the agent handle's hover, an account's Remove and protocol buttons showing on hover, the protocol menu's hover and the editor's focus ring are split from their :focus-visible (or it is dropped where :focus covers it); .acc:has(.aq) and the panel's .profiles:has(> .chip-input) hint (15.4) are classes set by app.js (with-aq, naming); the Routing page's container queries and the request list's subgrid (16) get @supports not fallbacks by the window's width (the tray panel is narrower than all of them) and a row's own columns; and the panel's --panel-tint, a color-mix() (16.2) in a custom property that would have gone invalid and painted the panel clear (tintPanel then handing the system white under dark text), falls back to --bg, as the floating status and Library's sticky head do. Other things newer than 15.0 are left as cosmetic: inert (15.5) on the folded agent list, accent-color, the rest of color-mix() on hover and focus shades, .quota's subgrid rows. The build: Go 1.25 and later run on macOS 12 and up only (the linker stamps 12.0 as the oldest), so Info.plist's LSMinimumSystemVersion and the Makefile's -mmacosx-version-min go from 11.0 to 12.0 and the site says macOS 12+ rather than 11+. Tested with a new internal/gui/tests/old-webkit.test.cjs: every assets/*.js parsed with the Babel parser Playwright bundles, failing on a regex lookbehind, v flag or modifiers (in a literal or new RegExp("…")), a class static block, decorators, import attributes or using (checked against the old highlighter's regex and a static block, and not on named groups, lookahead, ??= or private methods); a grep for built-ins newer than 15.0 (at, findLast, structuredClone, hasOwn, toSorted and co., Set methods, groupBy, withResolvers, Iterator helpers, popover …) unless compat.js fills them in (fails on main's routing.js:307 and library.js:1042 without it); compat.js the first of the page's scripts and every script loaded; the CSS with no :has(), no :focus-visible in a mixed list, no nesting or dvh, and @container, subgrid columns and a color-mix() custom property only with an @supports not fallback in the same file; and, in WebKit with those built-ins deleted, the panel's tabs, Save current's name field and every window page drawn with no page error. Documented in internal/gui/tests/README.md. go build -tags nogui (and GOOS=linux, GOOS=windows), go build (darwin GUI), go test -tags nogui ./... and the whole GUI suite (130 tests) pass. Not tried on a real macOS 12 or Safari 15: the old engine's parse is judged by the parser, not run. 2026-09-29 23:52:38 +08:00
yetone e08627be61 library: an agent's icon beside a skill or server an agent has of its own shows once again (这里的图标怎么变成这样了?) — since ef247c1 an agent's icon is made once, with a grey copy for a chip whose agent hasn't the item, and copied from there; the copy was hidden only inside a chip (.lib-ag), so in the rows of what the agents have of their own (Agent 中已有) each icon showed its colour and grey pictures squeezed side by side. The grey copy is hidden wherever the icon goes, and shown only in a chip that's off, as before. Checked in a sandbox magpie's Skills tab 2026-09-29 01:10:12 +08:00
yetone 5b43bdd61c library: RTK's version is kept up to date from magpie, and what it saved is drawn day by day (这里要能够管理RTK的版本,比如给它升级,以及能够看到RTK省token的趋势) — the RTK card shows its latest release beside the installed one (read from where github.com/rtk-ai/rtk/releases/latest redirects, as RTK's install.sh does, the API as fallback; kept six hours) and, when newer, an Upgrade button that brings it up the way it was installed: brew upgrade rtk for Homebrew's (in a Cellar; Homebrew updated first), winget upgrade on Windows, cargo install --git again for cargo's, and RTK's own script again, into the same folder (RTK_INSTALL_DIR), for one it put elsewhere; when Homebrew's formula is still behind the release, that is said. Also magpie library rtk upgrade. Under the totals, a chart of what RTK saved each day (week by week past 92 days) over 30 days, 90 days or all it has recorded: each bar the commands' whole output, the part saved above what still went to the model, the range's own total beside it — from rtk gain --daily --format json (RTK 0.28 on), which carries the summary too. Tested with a fake Homebrew rtk behind its release and a fake script install, and against the real rtk 0.28.2 and its history in a sandbox magpie (GitHub says 0.50.0); the upgrade itself not run on this machine 2026-09-29 01:01:25 +08:00
yetone ef247c1889 library: a long skill list is drawn near the view first and then filled in while the page is idle (requestIdleCallback, or 20 rows every 24ms in WebKit), every row kept once drawn so a scroll neither builds nor removes rows (a scroll that outruns the filling finishes it at once), each row is contained as a skipped one was and shows its buttons without the fade while its list scrolls (in WebKit each fade under a passing pointer was a long frame), and a chip's grey icon is made once rather than filtered on every paint (a drawing with its colours greyed by grayscale's own sum, a picture greyed pixel by pixel, one in the text's colour through a relative colour) with its cut-out ring an outline instead of a spread shadow, so scrolling 300 skills in WebKit has a median of 0–8 long frames where main had 11–37 and 8767eb6 94–152 2026-09-28 20:28:08 +08:00
yetone 372eb2cc07 library: the Skills tab draws only the rows near the view — each group's list is a window with room kept above and below, rows held to fixed heights so what's kept is exactly what's missing, a few more a frame as a scroll nears the end of what's drawn and those far behind taken away, no content-visibility flips on every scroll — a single big group (215 on this computer) no longer skips folding, a group of more than eight splits into parts by the folder its skills sit in (the path inside a GitHub repository, the folder a local one was linked from) or else by a start of their names three or more share, each part folding on its own and remembered, and the filter redraws only the rows, 120ms after the last key 2026-09-28 20:28:08 +08:00
yetone 23847a8a56 library: hundreds of skills no longer make the Skills tab crawl — they're grouped by the GitHub repository they came from (owner/repo, how many, an Update N for those a check found changed, which agents have all or some of them, and a link to the repository), those on this computer in a group of their own, each group folded to its heading line and opened with a click, remembered in the browser; with more than 40 skills from several places the groups start folded. A filter over the skills (name, description, repository) shows when there are more than 8, opening the groups that have matches, and a filter or a fold draws only the groups again, not the page. Every row was drawn with a chip for each agent, 4400 icons for 400 skills, and each redraw, scroll and hover laid out and painted all of them: a row out of view is now skipped by the browser (content-visibility) and an agent's icon is made once and copied rather than made afresh (and probed) for every chip. On 400 skills from 6 repositories and 100 local ones, drawing the tab went from 131ms to 17ms folded (55ms with every group open), a pointer sweeping the list from 1.4–1.65s of main-thread work to 0.4s (0.67s all open), and a 6000px scroll from 0.65–0.71s to 0.29s (0.49s) 2026-09-28 15:35:54 +08:00
yetone e02d3f28d7 library: a project's agents can have some of the library's skills as the project's own — under Skills, In projects takes a folder (the system's picker in the app, a typed path anywhere) and each of its skills gets agents' chips; magpie links the skill into <project>/.claude/skills for Claude Code and <project>/.agents/skills for Codex, Gemini CLI, OpenCode, Pi, Cursor and Copilot (the agents documented to read it; MiMo Code, Crush, ZCode, DeepSeek Harness and oh-my-pi aren't, so they're left out), or copies it when the project asks for copies, a copy made again whenever the library's skill changes (updates included). What it places is listed between magpie's marks in the project's .gitignore, made if there was none; taking a skill or the project away removes only what magpie placed, its lines and the folders it made once empty, and a folder of the same name that isn't magpie's is left as it is and said so. The home folder, or one whose project skills folder is an agent's own, can't be added 2026-09-28 13:34:17 +08:00
yetone 41cbe54a14 library: which skills from GitHub have changed there can be checked — Check for updates asks GitHub for the last commit to each skill's folder (one request per folder, a repository's skills together; once GitHub limits requests the rest are left unknown, each skill's trouble its own) and a changed one carries an Update available pill whose tooltip has the commit's summary and date, a click opening the changes on GitHub; Update N fetches just those. The library keeps a hash of a skill's files as fetched and, once a check finds GitHub's files to be the same, the commit they're at, so a later check needs only the API; a skill installed before this is compared by its files, the repository fetched once 2026-09-28 13:11:25 +08:00
yetone 3597cbbcc3 library: instructions come in sets — Default and any others named, each its own text, one of them the one the agents read; a set is added, renamed, switched to and removed (after a confirm, never the one in use or Default) in Library → Instructions, and a setup snapshot keeps which was in use. Providers: each protocol keeps its own URL, so a saved chat URL no longer shows as the Anthropic one; a URL typed and not saved yet moves to the protocol picked after it, spelled as that one wants it (/v1 dropped for Anthropic, added for OpenAI). Settings: an open WebDAV, export or import form is no longer emptied when the window regains focus. Tested in the browser from a sandbox. Issues #104 #105 #106 2026-09-27 17:05:59 +08:00