wiretap
wiretap copied to clipboard
time travelling
since there now is a undoManger - patchRecorder grouped by actions - we could add a proper time traveling to wiretap. https://github.com/mobxjs/mobx-state-tree/pull/504
though for wiretap we'd not only want to time travel the actions - reverse apply all patches of the action - but also be able to apply/ reverse-apply a single patch.
to do so we'd need to know if a patch within an action is applied or not, so in case he decides to undo a whole action when he already reverse-applied several patches of the same action, we'd know which patches are missing undo the whole action.
as discussed we could then also implement the UI like: (collapsible)
- Action
- Patch
- Patch
- Patch
- Action
- Patch
- Patch
- Action ...
and therefore disable the entires for the reverse applied patches/ undone actions.
snapshots should be separate since when applied we lose the actions and can only time travel for the following actions.
This sounds like a plan 👍 Let's do this. Maybe refactoring the UI to the collapsible format would be a good place to start. I'll try my best to work on it soon.