Todos `Mark all as done` too aggressive

Clicking Mark all as done redirects the user to /dashboard/todos/destroy_all, which calls TodoService#mark_todos_as_done(todos) where todos is a newly queried collection of todos.

http://gitlab.com/gitlab-org/gitlab-ce/blob/4a81867df14801c302f72096de8ee5327cfb4a39/app/controllers/dashboard/todos_controller.rb#L4

This means I can mark todos as done that I haven't yet seen because the todos page does not update in realtime.

Demo:

  1. Have 0 todos
  2. Click Add todo on an issuable
  3. Visit todos page, it should show the 1 todo
  4. In another tab, click Add todo on a different issuable
  5. In the original tab, without refreshing, click the Mark all as done
  6. See that all todos are marked as done, including the one you never saw on the original tab
Assignee Loading
Time tracking Loading