     @itemsBySlug  = {}
     @itemsByName  = {}
     @selectedItem = null
+
+    # @appsList = new DockController
 
     notificationController
       .on 'AddedToChannel',            @bound 'accountAddedToChannel'


    @machineTree = new JTreeViewController
      type                : 'main-nav'
      treeItemClass       : NavigationMachineItem

    section.addSubView header = new KDCustomHTMLView
      tagName  : 'h3'

      KD.utils.stopDOMEvent event
      KD.singletons.mainView.openMachineModal machine, machineItem

    else if event.target.nodeName is 'CITE' and machineItem.type is 'machine'

      @handleMachineToggle machineItem, event

    else if machineItem.type in ['app', 'workspace']

      return

    else if machineItem.type is 'machine'

      {Running, Stopped} = Machine.State

      unless machine.status.state is Running
        KD.utils.stopDOMEvent event
        @machineTree.deselectNode machineItem
        KD.singletons.mainView.openMachineModal machine, machineItem


  handleMachineToggle: (machineItem, event) ->

    KD.utils.stopDOMEvent event

    unless machineItem.child.hasClass 'running'
      @machineTree.deselectNode machineItem
      return

    @machineTree.toggle machineItem

    for id, node of @machineTree.nodes when node.type is 'machine' and node.id isnt machineItem.id
      @machineTree.collapse node



  addFollowedTopics: ->
