IP info is not updated when you switch to a different reviewable

AI-generated summary

In the Bug category under review-queue, user Moin reported that IP information in the review queue fails to update when switching between flagged posts. They provided reproducible steps showing that while the author details refresh correctly, the IP address persists from the previous post until the user manually toggles between the “Timeline & notes” and “Insights” tabs Moin. Moin also noted that the data reloads unnecessarily on every tab switch, causing visual jumps Moin. User awesomerobot acknowledged the issue and confirmed a fix in pull request #39271, which will reset data when navigating between flags and prevent redundant data fetching on tab toggles.

I noticed wrong IP information in the review queue. To me, it seems this is not always updated when I switch from one flagged post to another.

Repro steps from the video below:

  1. Enable Reviewable UI refresh at least for the admin group.
  2. Flag two posts from two different users with different IP addresses. It is easier to distinguish between them if you use two different users to flag them, but it is also possible using one flagger.
  3. As the admin, click on one of the flag notifications in your user menu.
  4. Switch from “timeline & notes” to “Insights”.
  5. Notice the IP address.
  6. Use the notification to switch to the other flag.
  7. The “Insights” tab is already open.
    → You see the user information for the author of this post, but still the IP address of the author of the other flagged post.
  8. Switch to the “Timeline & notes” tab and back to “Insights”.
    → Now the IP address for the author is shown.

I also wondered whether it was necessary to reload the data every time I switched between the two tabs. It’s rather unlikely that the time when the post was created would have changed while I was viewing the insights. Nevertheless, the data reloads every time I switch tabs, causing the information below to jump.

3 Likes

I just paid attention to it again, and it’s still the same

2 Likes

Thanks for following up, this will fix it so we’re resetting when navigating directly from one flag to another and will also prevent the insights tab from re-fetching data on every toggle

https://github.com/discourse/discourse/pull/39271

3 Likes