Perchance Saving Bugs

There were a few instances where in the editor ended up failing to “save”, but the generator saving process still succeeded and is still recorded in the revisions.

I was editing my generator hub page that day and saved it by clicking on the save button and then it errors after a classic 20 seconds…

I decided to check the DevTools network and it shows all the details behind that saving process, and things look suspicious, until the revisions told me wrong.

@perchance

  • VioneT@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    7 months ago

    @perchance@lemmy.world - ping dev.

    There were a few instances where in the editor ended up failing to “save”, but the generator saving process still succeeded and is still recorded in the revisions.

    By ‘failing’ to save, the button didn’t resolve to the disabled ‘saved’ button state, but it added a revision?

    And one more bug I want to point out, every time you click on the save button, the save function will be executed (so if you click two times, it’ll be run two times), making the revisions list clogging up with multiple saves from the exact same moment (see the revisions list in the image).

    I think it works as intended, since you clicked it two times, then it should return two saves. I would suggest not spamming the button xD.

    Sometimes Perchance will throw a warning that saving has failed due to not being able to talk to the server.

    • BluePower@mastodon.socialOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      7 months ago

      @VioneT “By ‘failing’ to save, the button didn’t resolve to the disabled ‘saved’ button state, but it added a revision?”

      Yes, either the save button displays the “error” or stay in the “save” as it’s not saved.

      • VioneT@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        1
        ·
        7 months ago

        I would think that if an error occurred on saving, the save request might just ‘save’ the previous version that it has as a fallback to prevent issues.

        • BluePower@mastodon.socialOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          7 months ago

          @VioneT That might be the case, what could go wrong? 😆

          As of what I can say, the new “save-after-reload” behavior is still a bit janky, considering that before it was implemented, the generator straight up saves but then the preview don’t display the saved content in case auto-update mode isn’t activated (except when the generator is created for the first time).