I'm increasingly doubtful that commit messages should be entirely immutable.
I sometimes find myself editing or commenting on merged pull requests, to help future readers.
Phabricator appended a URL to commit messages, which helped. In principle PR merging could do the same thing.
Beyond structural editing: semantic editing!
https://reasonablypolymorphic.com/blog/towards-tactics/index.html
(Uses Coq-style tactics.)
There's a tension between 'editing content' commands and 'change UI' commands when undoing.
Usually you don't want to undo e.g. zooming, just edits. I've seen novices accidentally change UI and get stuck though.
Perhaps UI customisation should be minimised?