           resolve filters
 
 
+  addManaged: (id) ->
+
+    debug 'add managed vm', { id }
+
+    @managed[id] = id
+    @emit 'change'
+
+
+  removeManaged: (id) ->
+
+    debug 'remove managed vm', { id }
+
+    delete @managed[id]
+    @emit 'change'
+
+
+  getManaged: ->
+
+    first = Object.keys(@managed)?.first
+
+    if first then first else null
+
 
   getState: (selector = identity) ->
     return selector {
       selected: @selected
       leavingId: @leavingId
       invitedId: @invitedId
+      managedId: @getManaged()
     }
 
 

      stacks: {}
      drafts: {}


    @bindNotificationHandlers()
    @setStateFromStorage()

debug = require('debug')('sidebar:controller')
kd = require 'kd'
EnvironmentFlux = require 'app/flux/environment'
remote = require 'app/remote'
