providerInfoWith grew a row's model list by append for the decision
models the vendor list lacks and for the picks it lacked, then grew it
again with slices.Insert to put those picks in front, and grew Agents
one append at a time. The rows are now counted first and each list is
made once at its size, in the same order as before.
Real accounts (sandbox copy of the owner's HOME, network blocked),
40 polls of /api/state, /api/providers and drift, pprof alloc_space
between the two heap snapshots, v0.1.2484 (mhost) vs this (mrows):
providerInfoWith flat 50.7 MB -> 38.5 MB, cum 164.9 MB -> 138.8 MB
providersState cum 273.2 MB -> 270.5 MB (the total is noisy +-25 MB
from the state encoder's pooled buffers: 621 vs 637 MB)
/api/state and drift bodies byte-identical; /api/providers equal
but for `fetched` and one login's `lapsed`, set by a refused refresh
in the blocked sandbox when a token came due during one of the runs
(logins_on.go), a path this change doesn't touch.
TestProviderRowListsMadeAtTheirSize: 107 rows from 100 listed models,
7 picks the list lacks plus one it has, 3 agents; picks in front in
their order, cap == len for Models and Agents. On the old
providers.go (at HEAD) it fails: "models made for 219, 107 rows".
Forcing growth by hand in the new code fails it the same way.
Run on mote at this tree: gofmt, go vet, GOOS=windows go vet ok; the
new test and the model-order tests 3/3 ok; go test ./internal/gui:
only the known reds TestSettingsSaveKeepsWhatItDoesNotSend (#4514) and
TestMainWindowCorners (#3949) failed.
Not run: the full ./... suite.