Add items to list is not exactly working

It's time you started using the Companion's Do It facility, to see what is coming back from TinyDB.

Trace the inputs feeding your global history list, all the way back into where they arrive from TinyDB.