Skip to content
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

Report form autocomplete = broken #233

Closed
Viba opened this issue May 24, 2020 · 13 comments
Closed

Report form autocomplete = broken #233

Viba opened this issue May 24, 2020 · 13 comments
Labels

Comments

@Viba
Copy link
Contributor

Viba commented May 24, 2020

Users are unable to report other users due to the autocomplete not autocompleting properly.

e.g. trying to report "Kalvirox" it returns results for the first two and three letters like below (with weird spaces), then nothing. If the form doesn't find a valid player it doesn't allow filing a report. This is quite important to moderation.

image
image

@Brutus5000
Copy link
Member

It works but it is broken by design.
image

I looked up the code and it seems to work like this:
It only collects player names of the players who played a game in the last 24 hours at the moment of startup and never refreshes it.

@1-alex98
Copy link
Member

I will just check if I am reportabe and if not I can do what I want XD @Brutus5000 when is the next restart?

@Brutus5000
Copy link
Member

Looks like it crashed 11 minutes ago and was restarted

@1-alex98
Copy link
Member

Well it updates the names every 15 minutes

@MrRowey MrRowey added the Bug label Dec 30, 2021
@Rackover
Copy link
Member

Rackover commented Apr 7, 2022

You can submit a report even if the autocomplete does not include it now, so is that still a problem?
The suggestions when writing someone's name are incomplete because they only include players from the last 24 hours for performance/caching reasons, but this could be changed and/or extended if necessary - ultimately as long as we rely on caching it will result in passing a huge list of names to the client/browser and making the page more heavy (or we could kill caching and fetch the names from the API as they are typed, realtime, but not sure how to do that with awesomplete)

@Brutus5000
Copy link
Member

Are we sure it is refreshed once per day? I think I didn't find anything related back then.

@Rackover
Copy link
Member

Rackover commented Apr 7, 2022

Every 15 minutes normally! https://github.com/FAForever/website/blob/develop/express.js#L293
Script is there : https://github.com/FAForever/website/blob/develop/scripts/getRecentUsers.js

Now only way to see if it actually runs on prod is to check website logs on prod. Locally it appears to work, but test server has no recent games so no players get updated on it! Also 15 minutes might be a bit long...

@Brutus5000
Copy link
Member

Would be good to log these jobs not only when the fail :)

@Rackover
Copy link
Member

Rackover commented Apr 7, 2022

Would be good to log these jobs not only when the fail :)

there is logging in the normal behaviour look :

    console.log(moment().format("DD-MM-YYYY - HH:mm:ss")  + ' - Updating the recent users...'); // When it starts
    console.log(moment().format("DD-MM-YYYY - HH:mm:ss") + ' - Recent players file created successfully'); // When it finishes

Could you look at prod logs and see if they're here?

@Brutus5000
Copy link
Member

It does work now. I'm pretty sure the log was mostly empty back then 🤷

@Rackover
Copy link
Member

So is that... still an issue ? 😄

@fcaps
Copy link
Collaborator

fcaps commented Nov 8, 2023

Still an issue😄
new design/layout, but autocomplete is still broken

@fcaps
Copy link
Collaborator

fcaps commented Dec 1, 2023

finally fixed with #504

@fcaps fcaps closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants