Due to a recent regression the selection management was failing in drawer mode for threads. We were not correctly setting the active thread. This commit fixes the issue and adds a spec.
discourse-common/config/environment
discourse/lib
discourse-common/(utils|lib)