You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because sveltekit is preloading the links on hover. If you hover over a link and refresh the site it will be shown as visited. I'll look into how to prevent setting visited on preload
The issue is that updating the visited state for a challenge is intertwined with fetching the challenge via "post_challenge". This way it is not possible to preload the challengeClass without marking it as visited.
Possible solutions would be:
Make fetching the challenge and updating the visited state two different endpoints. This way the visited state could be updated from the client side code and the challenge class still be preloaded (my favorite solution)
Pass a boolean parameter "markVisited" to the "post_challenge" endpoint (really hacky, do not recommend)
Disable preload for all challenge links (implemented right now)
Refactor endpoints to have exactly one where for all things concerning the history of a challenge. So we should call this endpoint to update the states of the challenge to visited, tried and successful.
I just visited one state but 3 more states were shown to be
visited
The text was updated successfully, but these errors were encountered: