     @get '^/account(.*)',
       (cx) -> VM.loadAccountPage cx, cx.params.splat
     @get '^/gh/:username/:project/tree/:branch',
-      (cx) -> VM.loadProject cx, cx.params.username, cx.params.project, cx.params.branch
+      (cx) ->
+        VM.selected
+          project_name: "#{cx.params.username}/#{cx.params.project}"
+          branch: cx.params.branch
+
+        VM.loadProject cx, cx.params.username, cx.params.project, cx.params.branch
     @get '^/gh/:username/:project/:build_num',
       (cx) -> VM.loadBuild cx, cx.params.username, cx.params.project, cx.params.build_num
     @get('^/gh/:username/:project',
-      (cx) -> VM.loadProject cx, cx.params.username, cx.params.project
+      (cx) ->
+        VM.selected
+          project_name: "#{cx.params.username}/#{cx.params.project}"
+
+        VM.loadProject cx, cx.params.username, cx.params.project
 
     @get '^/logout', (cx) -> VM.logout cx
 

    @projects_have_been_loaded = ko.observable(false)
    @recent_builds_have_been_loaded = ko.observable(false)
    @project_builds_have_been_loaded = ko.observable(false)
    @selected = ko.observable({})

    if window.renderContext.current_user
      @billing = ko.observable(new CI.inner.Billing)

    @before '/.*', (cx) -> VM.maybeRouteErrorPage(cx)
    @get '^/tests/inner', (cx) -> VM.loadJasmineTests(cx)

    @get '^/', (cx) =>
      VM.selected({})
      VM.loadRootPage(cx)

    @get '^/add-projects', (cx) => VM.loadAddProjects cx
    @get '^/gh/:username/:project/edit(.*)',
