   #   else new MoreVMsModal {}, KD.userMachines
 
 
-  handleMoreWorkspacesClick: (data) ->
-    workspaces = for workspace in KD.userWorkspaces when workspace.machineUId is data.machineUId
-      workspace.machineLabel = data.machineLabel
-      workspace
-
-    data.workspaces = workspaces or []
-
-    new MoreWorkspacesModal {}, data
+  # handleMoreWorkspacesClick: (data) ->
+  #   workspaces = for workspace in KD.userWorkspaces when workspace.machineUId is data.machineUId
+  #     workspace.machineLabel = data.machineLabel
+  #     workspace
+
+  #   data.workspaces = workspaces or []
+
+  #   new MoreWorkspacesModal {}, data
 
 
   addFollowedTopics: ->

        .forEach (data) => @setWorkspaceUnreadCount data, data.unreadCount


  addNewWorkspace: (machineData) ->
    return if @addWorkspaceView

    {machineUId, machineLabel, delegate} = machineData
    type     = 'new-workspace'
    parentId = machineUId
    id       = "#{machineUId}-input"
    data     = { type, machineUId, machineLabel, parentId, id }
    tree     = @machineTree

    @addWorkspaceView = delegate.addItem { type, machineUId, machineLabel }

    @addWorkspaceView.child.once 'KDObjectWillBeDestroyed', =>
      delegate.removeItem @addWorkspaceView
      @addWorkspaceView = null

    KD.utils.wait 177, => @addWorkspaceView.child.input.setFocus()


  createNewWorkspace: (options = {}) ->
    {name, machineUId, rootPath, machineLabel} = options
    {computeController, router } = KD.singletons
    layout = {}

    if not name or not machineUId
      return warn 'Missing options to create a new workspace'

    machine = m for m in computeController.machines when m.uid is machineUId
    data    = { name, machineUId, machineLabel, rootPath, layout }

    return warn "Machine not found."  unless machine

    KD.remote.api.JWorkspace.create data, (err, workspace) =>
      if err
        @emit 'WorkspaceCreateFailed'
        return KD.showError "Couldn't create your new workspace"

      folderOptions  =
        type         : 'folder'
        path         : workspace.rootPath
        recursive    : yes
        samePathOnly : yes

      machine.fs.create folderOptions, (err, folder) =>
        if err
          @emit 'WorkspaceCreateFailed'
          return KD.showError "Couldn't create your new workspace"

        filePath   = "#{workspace.rootPath}/README.md"
        readMeFile = FSHelper.createFileInstance { path: filePath, machine }

        readMeFile.save IDE.contents.workspace, (err) =>
          if err
            @emit 'WorkspaceCreateFailed'
            return KD.showError "Couldn't create your new workspace"

          for nodeData in @machineTree.indexedNodes when nodeData.uid is machine.uid
            parentId = nodeData.id

          view    = @addWorkspaceView
          data    =
            title : "#{workspace.name} <span class='ws-settings-icon'></span>"
            type  : 'workspace'
            href  : "/IDE/#{machine.slug or machine.label}/#{workspace.slug}"
            data  : workspace
            id    : workspace._id
            machineLabel : machineLabel
            parentId: parentId

          if view
            list  = view.getDelegate()
            list.removeItem view  if view
          else
            for key, node of @machineTree.nodes when node.type is 'title'
              list = node.getDelegate()

          KD.userWorkspaces.push workspace
          @sortWorkspaces KD.userWorkspaces

          index = 1 + KD.userWorkspaces
            .filter (w) -> w.machineUId is machine.uid
            .map    (w) -> w.slug
            .indexOf workspace.slug

          @machineTree.addNode data, index

          router.handleRoute data.href
          @emit 'WorkspaceCreated', workspace


  updateMachineTree: (callback = noop) ->


    #   @mapWorkspaceWithChannel data, node  if data.type is 'workspace'

    # @emit 'MachinesListed'


  getDummyWorkspace: (machine) ->
