The owner (10-17): "所有的内置插件默认都应该是开启的", "尤其对新用户来说……
不然新用户都不知道有哪些功能". Since 3ccbe6bc1 (10-13) a new install was
written plugins.yml with the Essentials preset, which left Sessions, the
Library, routing groups, warm-ups and Observability off for every new user
(origin/main's binary, fresh sandbox HOME: those five "off").
- pluginrt.Settle() writes All when there is no plugins.yml, new install or
not; settings.RanBefore, which only told the two apart, is gone.
- plugins.yml gets `settled: 1`. A file below it is brought up once on
start: an Essentials preset becomes All, the user's own rows kept (a
plugin they turned off stays off). Every write (Set, SetConfig,
SetPreset) sets it, so `magpie plugin preset essentials` picked
afterwards stays the user's. An unreadable or unparsable file is left
alone, as before.
- Docs (plugin-runtime.md) and comments that said a new install starts
with Essentials.
Run (origin/main 72ed518bc + this):
- gofmt -l internal: clean; go vet pluginrt, cli, gui, settings: clean.
- go test ./internal/pluginrt/ ./internal/settings/: ok. New
TestSettleBringsUpAnEssentialsInstall; TestSettleAndSet and
TestBuiltinSwitch now check a new install has all 14 on.
- Broken by hand (Settle writing Essentials, the bring-up skipped):
TestSettleAndSet, TestSettleBringsUpAnEssentialsInstall and
TestBuiltinSwitch go red; restored, green.
- Real binary, sandbox HOME: a new install lists all 14 on and writes
`preset: all, settled: 1`; a plugins.yml of `preset: essentials` with
otel off comes up `preset: all`, groups/library/sessions/warmups on,
otel off.
- go test -count=1 -timeout 45m ./...: every package ok but internal/cli
(TestPluginLoginTakesTheLapseOff, passes 5/5 alone here and on
72ed518bc; filed #2748) and internal/gui (TestMainWindowCorners, #1936).
- GUI: builtins.test.cjs 4/4 (chromium + webkit; a first try under load
~445 had chromium's page.goto time out at 5s, #2542),
routing-groups-off.test.cjs pass. Only comments changed in those two.