 
   selectNextStory: ->
     if atom.project.getPaths().length > 0
-      new SelectStoryStartListView(
-        @projectData.project,
-        @state.atomTrackerViewState
-      ).reveal()
+      if @projectData
+        new SelectStoryStartListView(
+          @projectData.project,
+          @state.atomTrackerViewState
+        ).reveal()
+      else
+        atom.notifications.addWarning NO_TRACKER, {icon: 'graph'}
+    else
+      atom.notifications.addWarning NO_PROJECT, {icon: 'graph'}
+
+  createNewStory: ->
+    if atom.project.getPaths().length > 0
+      new CreateStoryView(@state.atomTrackerViewState)
     else
       atom.notifications.addWarning NO_PROJECT, {icon: 'graph'}
 
   finishCurrentStory: ->
     if atom.project.getPaths().length > 0
-      new SelectStoryFinishListView(
-        @projectData.project,
-        @state.atomTrackerViewState
-      ).reveal()
+      if @projectData
+        new SelectStoryFinishListView(
+          @projectData.project,
+          @state.atomTrackerViewState
+        ).reveal()
+      else
+        atom.notifications.addWarning NO_TRACKER, {icon: 'graph'}
     else
       atom.notifications.addWarning NO_PROJECT, {icon: 'graph'}
 

StatusBarView = require './views/status-bar-view'

NO_PROJECT = 'Atom Tracker requires an active Atom project'

module.exports = AtomTracker =


      atom.notifications.addWarning NO_PROJECT, {icon: 'graph'}

  readProjectConfig: ->
    if atom.project.getPaths().length > 0
      FileUtils.readCsonFile FileUtils.rootFilepath(), (results) =>
        @projectData = results
        tile = @statusBarTile?.getItem()
        tile.updateContent results
        tile.display atom.config.get 'atom-tracker.showStatusBar'
    else
      atom.notifications.addWarning NO_PROJECT, {icon: 'graph'}

  deactivate: ->
    @subscriptions.dispose()
