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/pendingreturns conflict data. Editing 2 Page entities in Canvas without publishing them, runningdrush esav canvas_page <first_page_entity_id> -yand 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> -yshould 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