Files
magpie/internal/plugin/testdata/options
yetone 79477604a5 providers: a plugin option that says placement "top" sits under the accounts, above Routing (#5269)
mycf_711 (#5269): WorkBuddy Pro's plugin-level "panel" switch was drawn in
Plugin options, under the whole model list, so it took a scroll every time.
An option in auth.options may now say `placement: "top"`: the provider's
editor draws those in a Plugin options block right under the accounts,
above Routing, and the rest under the models as before. The note that the
plugin reads them goes with the first block. host.js keeps placement only
when it is "top" (anything else is left out, so the option goes under the
models), and plugin.Option carries it to /api/providers. A plugin that says
no placement is drawn exactly as before, and an older magpie ignores the
field. Documented in docs/subsystems/provider-plugins.md and
docs/reference.md.

Run (mote, through mote-run):
- new internal/gui/tests/plugin-option-placement.test.cjs: chromium 31/31,
  webkit 31/31 (1100 and 420 wide, en/zh/zh-TW/ja/de; mixed, top only,
  none or an unknown placement; the top switch posted on Save).
- plugin-options.test.cjs 11/11 and plugin-option-words.test.cjs 21/21,
  i18n-keys 4/4, each in chromium and webkit.
- go test ./internal/plugin ok (TestPluginOptions checks "top" kept and
  "sidebar" left out); go test -run Budget|Script|Asset ./internal/gui ok.
- gofmt -l internal/plugin empty; go vet ./internal/plugin ./internal/gui
  ./internal/cli, GOOS=linux -tags nogui and GOOS=windows vet of
  internal/plugin ok.

Broken by hand:
- app.js put back to its parent: the placement test fails "mixed" and
  "top" in both engines (blocks under the models), "none" still passes.
- host.js's placement line removed: TestPluginOptions fails
  "second = {... Placement:}".

Not tried: a real WorkBuddy Pro plugin (Gitee, private) with the field;
the full go test ./... and the whole GUI suite run after the next commit.
2026-11-05 00:55:36 +08:00
..