When using action=undo to undo an edit (or a series of edits), changes to all slots should be undone, not just changes to the main slot.
This means that the logic for undoing edits needs to be extracted from EditPage.
At present, undo simply fails if multiple slots are involved, see T194412.
Note that undo presently allows manual editing of the content to be undone. This is not possible for all kinds of content (see ContentHandler::supportsDirectEditing), and EditPage also does not currently support editing multiple slots at once.
It would probably be acceptable to not offer the ability to manually edit during an undo (check with product/UX), at least if the undo spans multiple slots. Or manual editing is only offered for the main slot - this seems ok for the SDC use case, but may be surprising when multiple slots are text based. We should at least show a warning explaining this.
Some considerations:
* Undo should not offer any free form editing ability for models for which ContentHandler::supportsDirectEditing returns false.
* Perhaps free form editing can be dropped from the undo function completely. If we keep it, we'll need {T174033}.
* A diff for each slot should be shown for confirmation (T194731).
* If undo supports editing, it needs to support preview! If it does not support editing, it could show a preview right away (T194731).