You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c82dded
Browse filesBrowse the repository at this point in the historyBrowse files
fix(gui): a superseded quota refresh joins only a newer successful outcome
`useProviderAccountPools` stamped `freshLandedRef[key] = generation` for every
HTTP 200 quota payload and only then returned false for a structured
`quotaUnavailable` row. A refresh A that had been superseded by B consulted
that stamp and reported success, so the operator saw "Quota check completed"
for a read whose newest result was a failure.
A landed quota observation and a successful refresh are now separate facts.
The hook keeps the latest quota outcome next to its generation
(`quotaOutcomeRef: { generation, ok }`), written for a structured-unavailable
payload, a thrown quota read and a failed roster read alike. A superseded
request joins the newer request only when that outcome is newer and ok. The
newer request's membership, selection, last-good readings and unavailable
flags are applied exactly as before; only the boolean a stale caller receives
changes.
Overlap controls in provider-account-quota-loading.test.tsx, each asserting
the returned value, the active account, the roster membership and the
last-good/unavailable flags:
- newer HTTP failure -> superseded A returns false
- newer HTTP 200 / unavailable -> superseded A returns false
- newer successful enrichment -> superseded A returns true
- a later failure after an earlier success -> false (latest outcome wins)
Against the previous hook the unavailable and latest-outcome cases fail and
the HTTP-failure and success controls pass, which is the reproduction in
review 5481554870.
Also in this change, because it is the same overlap seen from the poller: the
visibility poll skips a provider whose forced quota read is still in flight
instead of starting a cached read that would supersede it.
The removal-confirmation scope binding that landed with the merge gets its
regression test here: the dialog does not follow the panel to another provider
or another API base, and confirming back in the original scope removes from
that scope only.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments