         routeToMachineWorkspace machine
       else
         routeToFallback()
-
-
-  # router = kd.getSingleton 'router'
-
-  # if latestWorkspace = getLatestWorkspace()
-  #   {machineLabel, workspaceSlug, channelId} = latestWorkspace
-  # else
-  #   return routeToFallback()
-
-  # if channelId
-  #   for workspace in globals.userWorkspaces when workspace.channelId is channelId
-  #     return router.handleRoute "/IDE/#{channelId}"
-  #   routeToFallback()
-
-  # else if machineLabel and workspaceSlug
-  #   return routeToFallback()  unless machine = getMachine machineLabel
-
-  #   findWorkspace {workspaceSlug, machineLabel}, (workspace) ->
-
-  #     if workspace
-  #     then router.handleRoute "/IDE/#{machineLabel}/#{workspaceSlug}"
-  #     else routeToMachineWorkspace machine
 
 
 loadCollaborativeIDE = (id) ->

      workspaceSlug = latestWorkspace.workspaceSlug

  kd.getSingleton('router').handleRoute "/IDE/#{machine.slug}/#{workspaceSlug}"

  # if latestWorkspace = getLatestWorkspace()
  #   {machineLabel} = latestWorkspace
  #   if machineLabel is machine.label
  #     workspaceSlug = latestWorkspace.workspaceSlug

  # workspaceSlug ?= 'my-workspace'

  # kd.getSingleton('router').handleRoute "/IDE/#{machine.slug}/#{workspaceSlug}"


routeToLatestWorkspace = ->

      return console.error e


module.exports = -> lazyrouter.bind 'ide', (type, info, state, path, ctx) ->

  globals.userMachines = []
