It appears that once we customize a view (e.g. add a webpart), the "Documents" and "Library" tabs will now be hidden from the ribbon until you manually click the list view webpart.
This will automatically pick the "Documents" tab, so we will also be tweaking that so we can try to create an almost seamless behaviour as before by choosing the "Browse" tab instead.
One caveat of this approach is that we need to wait until the ribbon has loaded in order to run our code.
This was possible thanks to a few posts in stack exchange,