I had an issue that should register JS and CSS resources just at view tab at plone admin bar with collective.glossary product:
There I found that it is not that simple to know what is the selected tab because sometimes you configure a folder default view or other issues solved by this code
Also I saw some hacks at collective.cover to determine if we are at compose tab.
So I was complaining if we should write something at plone.api or portal_actions that return the current tab of plone admin interface (using the same rules of the code mentioned) ?
I'm not commenting about the rest, but this special case could be handled, at least, by rendering the JS / CSS resource link in a viewlet registered against IViewView view interface: