
Doing a hard refresh right now clears the list and then populates the list. This leads to environments with groups out of order:

Normal refresh does not clear list and updates the environment in place but does not remove the environments which maybe no longer applicable to the workspace.
Instead, introduce a new type of refresh which replaces the two, which does not clear the list & updates environments in place, but also removes the environment which may no longer be applicable to the workspace. This way elements would still be in order.