feat(Conflict detection): #3591723 "Add 'Conflict detected' toast message"

Adds conflict toast messages for detected conflicts.

  • Shows a toast when pending auto-saves contain conflict items.
  • Keeps this separate from /canvas/api/v0/notifications.
  • Stores conflict detection error state in localStorage to avoid repeated toast spam.
  • Shows the toast message again if the conflict detection error content changes.
  • Adds the conflict item to Activity Center and badge count.
  • “Resolve conflicts” opens the Review Changes conflict UI without page reload.
  • Uses existing color/spacing tokens for the toast styling.

Testing instructions

  •  Trigger a conflict where /canvas/api/v0/auto-saves/pending returns conflict data. Editing 2 Page entities in Canvas without publishing them, running drush esav canvas_page <first_page_entity_id> -y and potentially clearing cache should be enough to trigger HTTP 409 on the next auto-save poll.
  •  Confirm the “Conflict detected” toast appears.
  •  Dismiss the toast message and confirm it does not keep showing for the same conflict.
  •  Change the conflict response and confirm the toast can appear again. Running drush esav canvas_page <second_page_entity_id> -y should be enough to change conflict error response content.
  •  Click “Resolve conflicts” and confirm Review Changes opens without page reload.
  •  Open Activity Center and confirm the conflict notification appears there.

Closes #3591715 (closed)

Edited by Feliksas Mazeikis

Merge request reports

Loading