Guild icon
One Army
One Army General / website-problems / Useful button
Avatar
So, I am pretty sure I did mark as useful this how-to but not showing.. Many times I find myself on a how-to I feel like I previously marked as useful that is not. I have the feeling useful button is potentially buggy, anyone else having issues? (edited)
👀 2
Avatar
davehakkens 3/15/2023 8:34 AM
Would be good if you or anyone can really check it. Make a note/screenshot of the state and check in again later to see if the feeling is legit (edited)
Avatar
Yesterday I marked the first 3 how-tos as useful. Today if I open them button still says "Mark as useful" for all of them.
Avatar
davehakkens 3/16/2023 10:56 AM
Did the number/count change in both states? And which user account do you use? (edited)
Avatar
When I click it count goes up. However next day it is gone, and can click again with count going up. Like if I didn't click it the day before.
Avatar
thisislawatts 3/21/2023 8:54 PM
I have not been able to recreate this buggy behaviour, across two user accounts I marked a few items as Useful. Checking back in a few days later that state is still as it was. I took the following steps: User account thisislawatts 1. Viewed howto: https://community.preciousplastic.com/how-to/precious-plastic-font- 2. Before: Useful count 2 3. Marked as useful 4. After: Useful count 3 User account: qa-user-mark-as-useful 1. Viewed howto: https://community.preciousplastic.com/how-to/precious-plastic-font- 2. Before: Useful count 3 3. Marked as useful 4. After: Useful count 4
Avatar
davehakkens 3/21/2023 9:13 PM
Thanks for checking @thisislawatts! One thing it could be @Mattia, is that it can take a few seconds for the useful update to send it to the server. So if you click useful and close the tab fast it might have not registered it.
😬 1
Avatar
Ok let me try this way. Today 22/03/23 I useful this and it's got 2 usefuls I'll update you tmw or later 🤙 (edited)
Avatar
Ahhh there it is, back to 1 Today 23/03/23 useful count is back to 1
4:37 PM
4:38 PM
And I can even click again and it goes back to 2
4:38 PM
Could this be the reason for such low useful count?
Avatar
davehakkens 3/24/2023 3:20 PM
Can confirm this on Project Kamp Instance Marked these two new research topics with 0 (-) useful They both got 1, back to 0 (-) now. (edited)
Avatar
Ok at least I am not going mad
Avatar
thisislawatts 3/25/2023 2:21 PM
I never doubted your sanity @Mattia ✨ the challenge here is around consistently recreating this. @davehakkens can we raise this as an Issue on GitHub and get someone with DB access to look into this? I am limited to poking things from the outside
🙃 1
Avatar
davehakkens 3/25/2023 3:01 PM
yeh issue makes sense to me! @Eva Did you manage to have a look at it with perhaps some additional insights?
Avatar
working on it! the optimistic update we were talking about is causing the UI and the DB to get out of sync. this explains the wonkiness when you smash the button and maybe this issue as well, if in some cases the UI updates but the database does not. i've been playing around w a couple ideas and will have a PR ready soon
✨ 2
👍 2
🙏 1
Avatar
okay.. so i had a draft PR that seemed better but i realized that the local button update strategy causes the 2 useful buttons on the page to get out of sync. adding back in an optimistic aggregation update fixes the issue, but i think the behavior feels just as wonky as it does on prod. plus, i realized the actual problem with the button is the aggregation, not the DB update. we store useful votes on a user's profile, then use an aggregation to keep track of the number of total useful votes for a howto/research article. the aggregation function increments or decrements the useful count value when the user changes their useful vote. the problem is these updates don't always execute in chronological order, which why smashing the useful button can cause the value to go from like 2,3,4,5,6 and then reset back to 3 once the aggregation catches up. a better aggregation function might be one that stores an array of user ids that have marked the howto/research as useful, so we can count the distinct users as they mark an item useful or un-useful. maybe this would be worth making an issue for? anywho, after looking into this i'm not sure the issue with the useful votes disappearing is related. that problem seems to be with the database update, and i haven't been able to repro that either. sorry my updates weren't extremely helpful 🙃 but i think we can rule out the button theory.
🙌 2
Avatar
I will have a look into this, gut feeling is that this is an issue with caching similar that we had when implementing the v1 of views
Avatar
@Mattia @davehakkens what steps can I take to try and recreate the bug? Seems to be working for me locally, so the issue may only be in production? In that case it's definitely caching
Avatar
Avatar
Alfonso
@Mattia @davehakkens what steps can I take to try and recreate the bug? Seems to be working for me locally, so the issue may only be in production? In that case it's definitely caching
davehakkens 3/29/2023 3:53 PM
Could give it a try on https://dev.onearmy.world. Here you can easily add accounts and useful stuff.
❤️ 1
Avatar
I've been trying to recreate this for a little while and it seems to be working for me even if I load into separate accounts on different browser instances. I'm very curious as to how I can get it to bug out!
12:40 PM
12:41 PM
The values do seem to be correctly storing and incrementing/decrementing in the DB, so the issue must be that something is causing them to be overwritten, but I really have no idea what it could actually be.. (edited)
Avatar
davehakkens 3/30/2023 9:19 PM
Thanks for having a look @Alfonso! Not sure how to move forward with it tbh... Lets give it a think 🤔
Avatar
No worries @davehakkens, I'll have another look today and see if I can figure out what it could be. However, it is still displaying the correct count today as well. Maybe @Chris Clarke has a better idea of how the aggregations may be overwritten 🧐
Avatar
I'm afraid I can't really figure out how to replicate the bug sorry 😦
✅ 1
OneArmy 1
Avatar
Any updates here, still very buggy behaviour 😥
Avatar
So I went back and took another look, @Mattia have you been experiencing this buggy behaviour with the howto or reserach? I think I can see that the research is not quite working well
Avatar
Mainly how-to on Precious Plastic
Avatar
Is there any chance you can give me any way to try and replicate the bug as you see it? This whole aggregation code is quite complex and hard to really make sense 😦 (edited)
Exported 33 message(s)
Timezone: UTC+1