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
BUG-81: Quotas: the range label shows the new sort or filter while the table still shows the previous rows; check 11 flakes on it #317
BacklogNot started: the work waits in the backlogbugSomething isn't workingsev:mediumIncorrect data, a weak control or a slow service, with no direct lossstatus:openNo fix yet
What happened. CI failed once on PR #166, head 927b05e (run 43941248868, attempt 1, job portal-ui), in check "11 Quotas" at cmapi-portal-ui/tests/api/portal.test.mjs:1183, then passed on the rerun of the same head. The records PR changes only Markdown, so the cause is in the portal or its test.
Evidence. The check clicks Sort "% used" and waits for the range text "1–25 of 70 · most used first" (:1180-1181). It then reads the rows (:1183) and expects them in most-used order. Attempt 1 read A–Z rows (accounts-api-dev, accounts-batch-dev, ...) instead of the most-used ones (checkout-api-rnd, data-worker-rnd, ...).
Cause, inferred from the code and to be confirmed. The range label follows the sort the person picked at once, while the table keeps the previous query's rows (TanStack Query keepPreviousData) until the new answer arrives. So for a moment the page shows "most used first" over A–Z rows.
In the test, that is a race: it waits on the label, not on the data.
In the portal, it is a small truth problem: the label claims an order that the rows on screen do not have yet.
Fix to research.
Portal: while a query's placeholder data is shown (isPlaceholderData), mark the table as busy (aria-busy, and a muted style) and keep the label of the shown rows' own query until the new rows arrive.
Test: wait for the rows themselves (or for aria-busy=false), never for the label alone. Check every waitQuotaRange call that a row comparison follows.
How to prove it.
Delay the stand-in's answer to the sort by 300 ms. Check 11 must fail on main every time; today it fails only sometimes.
With the fix it passes 20 of 20 runs.
A browser check asserts that the label and the rows agree at every step.
BacklogNot started: the work waits in the backlogbugSomething isn't workingsev:mediumIncorrect data, a weak control or a slow service, with no direct lossstatus:openNo fix yet
Activity