     localStorage.getItem('singularityLogColor')
 
   toggleView: ->
-    @setState
-      splitView: !@state.splitView
+    splitView = !@state.splitView
+    @setState
+      splitView: splitView
+    viewString = @getViewString(splitView)
+    history.replaceState @state, '', location.href.replace(location.search, "?taskIds=#{@state.viewingInstances.join(',')}&view=#{viewString}&grep=#{@state.search}")
+
+  getViewString: (splitView) ->
+    if splitView then 'split' else 'unified'
 
   toggleHelp: ->
     vex.open

    if 0 < viewing.length <= 6
      @setState
        viewingInstances: viewing
      history.replaceState @state, '', location.href.replace(location.search, "?taskIds=#{viewing.join(',')}&grep=#{@state.search}")
      if viewing.length is 1
        document.title = "Tail of #{@props.path.replace('$TASK_ID', viewing[0])}"
      else

    viewing = _.pluck(selectFuncion(_.sortBy(@state.activeTasks, (task) => task.taskId.instanceNo)), 'id')
    @setState
      viewingInstances: viewing
    history.replaceState @state, '', location.href.replace(location.search, "?taskIds=#{viewing.join(',')}&view=#{@getViewString(@state.splitView)}&grep=#{@state.search}")

  setSearch: (search) ->
    @setState
      search: search
    history.replaceState @state, '', location.href.replace(location.search, "?taskIds=#{@state.viewingInstances.join(',')}&view=#{@getViewString(@state.splitView)}&grep=#{search}")

  scrollAllTop: ->
    for tail of @refs
