Files
magpie/internal
forever dbcf791e4e providers: the Providers page keeps asking while an account's list is on its way, as a fetch started behind it is counted before it returns (#1147)
* providers: the Providers page keeps asking while an account's list is on its way, as a fetch started behind it is counted before it returns

FetchNewBehind and FetchNewSoon started FetchNew in a goroutine, and
newRunning, which FetchingNew reads, was counted only once it ran:
providersState read FetchingNew straight after, was told no fetch was on
its way, and the page stopped asking with the list still to come.

fetchNewGo counts a fetch before it returns, but only one with work: a
poll with nothing due starts and counts nothing, or each poll found the
last one's no-op still under way and the page asked for ever (#1092 at
GOMAXPROCS=1). Which accounts are due is known at once unless a CLI is
left to ask who is signed in (never answered, being asked or about to be
asked by the next look): then the fetch is counted and lists, waits on
the CLI (#1789) and fetches behind the page, which doesn't wait on a CLI
(#541). FetchNewSoon lists nothing before it returns, so /api/state?last=1
still answers at once (#1519). FetchingNew also says true while
fetchingNew is set, for a page whose FetchNewBehind found another still
picking the accounts due (tsuixl).

FetchNew keeps main's missing: an account that failed, one waiting out
newFetchRetry unless another's fetch listed it meanwhile, or a CLI that
didn't answer in time. The accounts are listed again when a CLI answered
while they were listed.

* providers: a CLI that answers while the accounts are listed has its account's list fetched in that pass, and one forgotten then sends the fetch behind the page

fetchNewHeld counts the CLIs answered before it lists the accounts and
lists them again if one answered by the time awaitIdentities returns,
in place of listForNew; TestFetchNewListsAgainForAnAnswerWhileListing
fails without it (and on main). fetchNewGo, which lists only with no CLI
left to ask, sends the fetch behind the page when one was forgotten
meanwhile (a sign-in finishing); TestFetchingNewForgottenWhileListed
fails without it. FetchNewSoon no longer counts itself before FetchNew
does: fetchingNew covers that. The CLI cases of
TestFetchingNewOnceStarted wait on a 5s look and allow 1s (yetone).
2026-10-13 15:58:31 +08:00
..
…
…