-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app-project: YourProjectStats counts either freezing or number going down #6661
Comments
This is a regression of the classification counts bug mentioned in this comment: #5081 (comment) |
@eatyourgreens are you able to replicate this bug? The talk comment above is from January 25, and the same commentor was mentioned in #6588. The solution to #6588, PR #6589 was deployed on January 29.
The code that produced this bug is completely replaced at this point. In order for this Issue to be actionable, please elaborate on the bug, if it's reproducible. |
Yep, it came up again today, while the API was running slow earlier this afternoon: https://www.zooniverse.org/talk/17/3531984?comment=5877516 |
Very easy to reproduce when the API is running slow. Clicking out of a tab then back in again will make a request to |
The simplest fix might be to ignore the API response if it's lower than the counts currently displayed on the page. Turning off |
Thanks! That helps. It looks like #6589 made this bug more obvious specifically for revalidate on focus. |
I don’t think classification counts ever go down, so that’s one potential validation check that could be made for incoming values.
|
An update from Talk: sometimes the counters refresh on focus to show 0.
https://www.zooniverse.org/talk/17/3531984?comment=5880453 I think the the frontend code maybe isn't handling response errors or timeouts properly. |
front-end-monorepo/packages/app-project/src/screens/ClassifyPage/components/YourProjectStats/useYourProjectStats.js
Line 12 in a7d4db0
See
@mutabilitie
's comments here:https://www.zooniverse.org/talk/17/3531984?comment=5863673
Classification stats revalidate on focus, which means that they can appear to freeze, or even go down, if you click out of a tab then back again and the number stored in the browser is replaced with an outdated count from the stats API.
The text was updated successfully, but these errors were encountered: