The terminal and `magpie serve` never called provider.FetchNew, which the
window calls at start: a signed-in Cursor account's list exists only at
Cursor, so the TUI's Routing pickers (and a headless gateway's /v1/models)
offered the fallback cursor/auto alone until the list was fetched by hand
with m on the Providers page.
- tui: Init fetches the new lists (fetchModelsCmd, alongside the catalog
sync). A model picker open when they arrive (Routing members, the
classifier, a provider's models, an agent's model field) is filled in
place through its relist, keeping its filter and the model under the
cursor. A list left missing (no network) is asked for again a minute
later (modelsRetry). Built on reyoung's branch and test.
- serve: FetchNew at start, again each minute while a list is missing.
- provider: FetchNew reports whether a list is missing, and waits for a
CLI asked who is signed in for the first time (awaitIdentities), then
lists the accounts again. With the real Cursor account in a fresh
sandbox, `cursor-agent about` answered after a look's 3s firstAsk, so
FetchNew saw no Cursor account and `magpie serve` still listed 1 model
with the TUI fix alone. The window's startBackend gets the same wait.
- docs: providers-accounts.md says who fetches the lists and when.
Run:
- internal/tui TestTUIFetchesSubscriptionModels (6 views) and
TestTUIAsksAgainForAMissingList, -race x3; red with the Init fetch,
the relist, the cursor restore or the retry tick each removed by hand.
A first `about` slowed to 12s injected: passes (the test re-asks).
- internal/provider TestFetchNewWaitsForASlowSignIn: red without
awaitIdentities (no provider "cursor"); TestFetchNewAccount covers the
missing result.
- Real Cursor account, sandbox HOME with a keychain holding only Cursor's
two items: TUI on main showed cursor/auto only in Routing; the fix shows
the full list and "24 models" on Providers. `magpie serve`: main 1
Cursor model at /v1/models, the fix 24 within 5s.
- gofmt -l, go vet (darwin, GOOS=linux, GOOS=windows), go test ./... in a
sandbox HOME.
Not tried: Linux and Windows real Cursor CLIs (the fake CLI tests skip on
Windows); Devin's CLI identity goes through the same wait but wasn't
tried with a real account.