ui: move history interaction out of wrapper