dekkerglen / CubeCobra

An open source web application for building, managing, and playtesting Magic the Gathering cubes.
https://www.cubecobra.com
Apache License 2.0
191 stars 117 forks source link

Recovery from "Cube has been modified since changes were made. Please refresh and try again." #2452

Open oscarhermoso opened 4 months ago

oscarhermoso commented 4 months ago

Describe the bug Have been building out a new cube recently, and have ran into this error three times in the last two days "Cube has been modified since changes were made. Please refresh and try again.", when commit a changelist to my cube.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Cube' > 'List' > 'Edit'
  2. Add cards over the course of ~1 hr, with multiple tabs open, compare page, etc. (don't think I made any intentional changes in this time)
  3. Save Changes
  4. See error: "Cube has been modified since changes were made. Please refresh and try again.".

Expected behavior

When this error ocurs, please maintain the changelist, or at least print the names of the cards into the error output so they can be copy-pasted by the user.

Currently, the submitted changelist is lost entirely, which is doesn't feel very good 😅.

Desktop (please complete the following information):

Additional Context

This is the link to the cube being updated: https://cubecobra.com/cube/list/41e4620a-b176-44ee-9656-6c83ccbe93b6#

oscarhermoso commented 4 months ago

Raised a PR to hopefully resolve this issue

oscarhermoso commented 4 months ago

Ooft, just happened again, after reading through about ~2100 recommendations on the /cube/analysis page, and pending about about ~50 additions to my Maybeboard, attempted to submit and lost all data...

Screenshot from 2024-06-09 11-47-51

Screenshot from 2024-06-09 11-48-55