           return showError err
 
         editor = @showView stackTemplate
+
+        { sidebar } = kd.singletons
+
+        sidebar.setSelected
+          templateId: stackTemplateId
+          stackId: stackId
+          machineId: null
+
         # If selected template is deleted, then redirect them to ide.
         # TODO: show an information modal to the user if he/she is admin. ~Umut
         stackTemplate.on 'deleteInstance', =>

      Object.keys(@shouldReloadMap).forEach @bound 'removeEditor'


  openEditor: (stackTemplateId = no) ->
    { mainController, groupsController, computeController } = kd.singletons
    { setSelectedMachineId, setSelectedTemplateId } = EnvironmentFlux.actions

    unless groupsController.canEditGroup()
      mainController.tellChatlioWidget 'isShown', {}, (err, isShown) ->

        return if isShown
        mainController.tellChatlioWidget 'show', { expanded: no }

    if stackTemplateId
      if @editors[stackTemplateId]
        { sidebar } = kd.singletons

        sidebar.setSelected
          templateId: stackTemplateId
          stackId: stackId
          machineId: null

        return  @showView { _id: stackTemplateId }

      computeController.fetchStackTemplate stackTemplateId, (err, stackTemplate) =>
