Skip to content

Conversation

@EnriqueBet
Copy link
Contributor

@EnriqueBet EnriqueBet commented Apr 10, 2023

Request

Exact URL where the bug happened
https://lichess.org/training/replay/30/mix

Steps to reproduce the bug
Go to puzzle dashboard
Replay failed puzzles
Succeding all puzzles to replay.

What did you expect to happen?
Redirecting to the puzzle dashboard. (without prompting any popup)

What happened instead?
Showed an alert popup saying : "No more puzzles available! Try another theme."
After clicking ok, redirecting to puzzle themes.

Operating system and browser version
Windows 10
Chrome 109

Fix

Modified the path to redirect to the puzzle dashboard instead and removed the alert from the controller
fix #12332

@EnriqueBet EnriqueBet changed the title Issue-#12332 Issue-#12332 | Bug fix: Remove alert when successfully completed replayed puzzles Apr 10, 2023
@kraktus kraktus changed the title Issue-#12332 | Bug fix: Remove alert when successfully completed replayed puzzles Bug fix: Remove alert when successfully completed replayed puzzles Apr 10, 2023
}
redraw();
if (!next) {
alert('No more puzzles available! Try another theme.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This not only remove the alert when replaying from the puzzle dashboard, but also when playing a specific theme such as https://lichess.org/training/xRayAttack and no more puzzles are found.
The proper fix would be to detected if the user is replaying a puzzle and do not display the alert only in this case.

If (!data.replay) {
 alert(...)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your feedback @kraktus I'll take care of it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the alert back within an if block as suggested @kraktus

EnriqueBet and others added 3 commits April 10, 2023 22:32
* master:
  improve study controller typing
  scala3 tweaks
  charge both limiters during login with pwned
  Update xml2js to v0.5
  Allow newer pnpm versions
  Reveal appeal text box even with reduced animations
  add Rusyn language (Русинська бисїда)
  New Crowdin updates (lichess-org#12636)
  Update caffeine to 3.1.6
  update chessops to 0.12.7 (insufficient horde material)
  Revert "remove unused xml2js package"
  Update pnpm-lock.yaml
  remove unused xml2js package
@ornicar ornicar merged commit 17c92dd into lichess-org:master Apr 11, 2023
@bill-starr
Copy link

What I would prefer to happen -- and I think this is the "old" behavior -- is for no redirect at all after the last puzzle in a group is replayed. I would prefer to be able to follow the "From game" link to the source game after I have successfully replayed the puzzle. I think a redirect to the puzzle dashboard would be appropriate, but not until I have clicked on the green "thumbs up" or the red "thumbs down" icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alert popup after replaying failed puzzles

4 participants