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
Analytics: older requests can overwrite newer filters or a later page visit #2200
The Analytics page has no generation check around its six-request bulk load. If a user changes the time window or region while an earlier request is pending, whichever batch finishes last replaces the page, even when it belongs to the older selection. A late rejection can similarly replace newer results with an error. Leaving and re-entering the page does not invalidate that earlier load.
A related readiness problem occurs when a tab click or theme-refresh renders Overview/RF/etc. before _analyticsData has been populated. Overview dereferences rf.totalTransmissions while rf is undefined. The early theme-refresh case is also noted in #2194; a guard at the common rendering boundary is needed for tab clicks as well.
Reproduction
Open Analytics with a delayed response for one of the initial analytics requests.
Select a different time window and let that newer batch finish first.
Release the older response. The old data replaces the results under the newer selection.
Alternatively, leave/re-enter Analytics before releasing the old response, or switch Overview/RF tabs while the first batch is pending.
Deterministic tests against the actual analytics page IIFE reproduce the out-of-order success, stale rejection, early rendering and page-leave cases without live network timing.
Expected
Only the current page visit and filter selection may update the page. Data-dependent tabs retain a clear loading/error state until their required responses arrive. Independently loaded tabs remain usable and are not rebuilt or replaced by an unrelated late bulk result.
This is a focused lifecycle correction, with no database or API changes. Related: #1778 and #1925.
Activity
fix(analytics): leave tabs with their own data to themselves (Kpa-cla…
fix(pages): drop late responses that belong to an earlier page visit (K…