Skip to content

UI: Switching quickly between users or assets can show the previous one's activity #39653

Not planned

Description

@harsh-vador

What the user sees

On the classic feed, open one user's or asset's activity and quickly switch to another one. If the first request answers after the second, the first one's activity replaces the second one's. The page then shows the wrong user's or asset's activity until it is reloaded.

Why

ActivityFeedProvider.tsx has a helper, runActivityRequest, that ignores any response that is not the latest request. Three of its fetchers use it. The other two, fetchEntityActivityHandler and fetchUserActivityHandler (around lines 935–970), set the result directly and skip that check.

Fix

Send both through runActivityRequest.

fetchUserActivityHandler also adds the domain parameter by hand. The domain interceptor already adds it to these requests, so drop the manual one.

Add a unit test with two overlapping requests where the first one resolves last.

Activity

  1. added
    UI
    on Dec 3, 2026
  2. added a commit that references this issue on Dec 4, 2026
    c18ea92
  3. harsh-vador commented on Dec 4, 2026

    @harsh-vador
    ContributorAuthor

    Closing: this can't be reproduced in the UI.

    The two fetchers do lack the latest-request guard, but no current UI path lets a stale response reach the screen. When the asset changes, the page remounts its ActivityFeedProvider, so a late response for the previous asset lands on a provider that is no longer mounted.

    How I checked, on main with a local backend:

    • Classic mode, dashboard A's Activity tab. A's /activity/entity/... responses were delayed by 5 s, and I navigated in-app to dashboard B.
    • B's requests answered at about 3.0 s and A's stale ones at about 6.4 s.
    • B's list stayed correct throughout (B's two events). A's events never appeared.

    The proposed fix was dropped from #39733, and #39670 removes the guard along with the dead fetchers that used it. If a flow is ever added that re-fetches different targets on the same mounted provider, the guard belongs in that change, with a test for it.

  4. self-assigned this
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

UI

Type

No type

Projects

  • Status
    Done ✅
  • Status
    Done ✅

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions