IntersectMBO / govtool

🔩 GovTool and utilities monorepo.
https://gov.tools
Apache License 2.0
14 stars 9 forks source link

🐛 Incorrect Success Modal and Navigation on Save/Publish Error for Proposal Edits #2338

Open kneerose opened 2 weeks ago

kneerose commented 2 weeks ago

Area

Proposal Pillar

Domain

dev-sanchogov.tools

Which wallet were you using?

No response

Context

I attempted to edit an existing proposal by updating the link text. After exceeding 255 characters and attempting to save it as a draft or publish with the new edits, the UI displayed a "Proposal saved" message and navigated to the proposal details page. However, there was actually an error in updating and saving the draft, meaning the draft was not saved despite the success popup being shown. This indicates that even when saving as a draft or publishing with edits encounters an error, a success modal still appears.

Steps to reproduce

  1. Connect to the wallet.
  2. Create a new proposal.
  3. Edit the created proposal and add more than 255 characters to the link text.
  4. Attempt to save as draft or publish with new edits.
  5. Observe the "Proposal saved to drafts" modal on saving as draft.
  6. Observe navigation to the proposal details page on publishing with new edits withou any updates, instead of an error toast or popup.

Actual behavior

https://www.loom.com/share/d805e64a47bd46649aa351d43c041eef?sid=530f3903-bb0e-4b51-9853-b44c7f321630

Expected behavior