peterroe's plugin signs in to several providers. Each provider gets its own
picture from the auth hook, and package.json's magpie.icon is the picture
for the plugin itself. Settings → Plugins → Installed only took a plugin
picture from the market listing. A plugin that isn't listed (installed from
a path, git or an unlisted npm package) had none, so its row and its page
showed its first provider's picture.
- plugin.InstalledIcon reads magpie.icon from the installed package.json.
It goes through the same ownIcon check as a listing's icon (data: or
https only).
- pluginsState stores the picture through provider.RepoIcons, as listed
plugins' pictures are, and returns it as `icon` on each plugin entry.
- plugins.js: the installed row and the detail page use the listing's
icon, then the plugin's own, then its first provider's, as before.
- Docs (en, zh, ja): magpie.icon is the plugin's picture (Discover card
and Installed row) and the fallback for providers without their own. A
plugin of several providers gives each provider auth.icon.
Run:
- go test ./internal/plugin ./internal/gui: ok.
TestPluginsStateGivesThePluginsOwnIcon covers a data: icon (kept), no
icon and a plain-http icon (both "").
- internal/gui/tests/plugin-own-icon.test.cjs: Chromium and WebKit, en,
zh, zh-TW, ja, de, at 980 and 420 wide. It fails on the old plugins.js
(the row shows pa.png).
- The plugins GUI tests: 34/34 in each engine.
- gofmt; go vet darwin, windows, and linux -tags nogui.
- Full go test ./...: the only red is gateway OTel timing under load ~79.
That's #1794, commented there; alone it passes 3/3.
Not tried with peterroe's real package; the fixture follows the layout
the issue describes.