       'atom-tracker:next-story': => @selectNextStory()
     @subscriptions.add atom.commands.add 'atom-workspace',
       'atom-tracker:finish-story': => @finishCurrentStory()
+      'atom-tracker:next-story': => @selectNextStory()
+    @subscriptions.add atom.commands.add 'atom-workspace',
+      'atom-tracker:create-story': => @createNewStory()
     # Monitor configuration changes
     atom.config.onDidChange 'atom-tracker.showStatusBar',
       ({newValue, oldValue}) =>

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

NO_PROJECT = 'Atom Tracker requires an active Atom project'

module.exports = AtomTracker =



  selectNextStory: ->
    if atom.project.getPaths().length > 0
      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
      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'}

