I know I can add this behaviour with ui.undo.addCallback(…), but is there a rule which actions need a special callback function and which actions do not?
This system is in ongoing development. There is no simple rule as to which actions currently work and which don’t. For now, you just have to test and write functions for those that don’t.
Working with this for a while now, I think it is pretty dangerous, that we do not know, which commands have an effect. I would prefer, that only addCallback would work, because we won’t have to think about unwanted side effects of things happen between startBlock and endBlock. With addCallback we can implement any functionality already.
I’m picking up what you’re putting down here. I am going to see what I can do about 1) getting a report on what is inside a block and 2) creating a callbacks-only block.