mobile icon indicating copy to clipboard operation
mobile copied to clipboard

WIP: Replay Failed Puzzles from Dashboard

Open CloudyDino opened this issue 11 months ago • 1 comments

This PR adds the ability to replay your failed puzzles from the dashboard.

I don't see an API endpoint to get all the failed puzzles from a certain time frame so the only thing I could think of was to go through the history from newest to oldest (since that's how it's paged) and to keep letting the user solve puzzles until they do all in that time frame. I think having an endpoint would make this easier to do in the same way as the web version.

Another issue I haven't figured out how to fix is the dashboard doesn't update after you solve some of your failed problems. Part of it is because we aren't sending a solve request to the API after every solved puzzle and part of it seems to be because we aren't refreshing the page after we return to the dashboard.

Overall, I would love some guidance on this since this is one of the best puzzle features on web.

https://github.com/user-attachments/assets/845aa3ca-69f7-48b5-a05d-9beb50881b18

CloudyDino avatar Feb 15 '25 20:02 CloudyDino

Thanks for tackling this. I'll review first the hint and rating PRs.

In the meantime I think you can get in touch with the server dev team on discord, and ask about an endpoint to get failed puzzles.

veloce avatar Feb 18 '25 10:02 veloce

Hey @CloudyDino, I just noticed that the Puzzle Replay API is now available: https://lichess.org/api#tag/Puzzles/operation/apiPuzzleReplay

HaonRekcef avatar Aug 08 '25 13:08 HaonRekcef