Import on the Routing page always added a new group. When the pasted text
carries the id of a group of the user's own (not one magpie found), the
box now says so before it is pressed: the button reads "Replace <name>"
and a line under the box says its models, routing and rules are replaced
and its accounts and folder rules stay. Pressing it posts groups/import
with replace, and provider.ImportGroupOver saves the text's group over
that one, in its place in the list. Matching is by id only; no other group
changes. Kept as the user has them, since the text can't carry them: the
group's accounts, its folder rules (that still fit the new members) and
its on/off switch. A name another group has gets a number. A text whose
id nobody has, a found group's id, or any import that doesn't ask to
replace adds a group as before. ImportGroup is unchanged.
Run on mote at the pushed tree before rebase:
- go test ./internal/provider (Share|ImportGroup): ok; the new
TestImportGroupOverReplacesSameID is red with the match switched off by
hand (replaced=false, id three-2).
- go test ./internal/gui -skip TestMainWindowCorners: ok. TestMainWindowCorners
fails on mote's macOS 27 box and on an untouched origin/main checkout
alike (c360d9d30), so it is not this change; not filed here.
- GOOS=windows go vet ./internal/provider ./internal/gui, gofmt -l: clean.
GOOS=linux go vet of internal/gui can't cross-compile wails (cgo), not run.
- group-import-replace.test.cjs (new, 10 tests: chromium and webkit x en,
zh, zh-TW, ja, de, at 420px): green; red 10 of 10 with the id match
broken by hand. Its checks: Import for an unknown id or a found group's
id, Replace One + the line for an own id, the label survives a redraw,
replace is posted only then, the list keeps its groups.
- group-*.test.cjs, i18n-keys, gui-de/ja/zh-tw, routing-accounts-narrow,
routing-save (407 tests, chromium and webkit): all pass. A wider run of
group/routing/i18n/gui-* files at concurrency 3 was cut at 444 tests with
one red, routing-accounts-narrow, chromium en, which passes alone (load
from other sessions on mote); the rest of that wide run was not finished.
Not tried: a real account's group pasted into a real magpie; the TUI/CLI
have no import, so nothing there changed.