Actions that mark to-do as complete do not reflect in the UI

Summary

When performing an action over an item that created a to-do (ie. a message that @s a user), such as responding with a comment or an emoji the UI does not reflect the new status of the to-do in the top right corner button.

image

Steps to reproduce

  1. Go to a to-do item and open the related link, respond to the comment by adding a new comment or an emoji.
  2. Notice the top button is still highlighted as if the todo still exists
  3. Reload the page to confirm that the button now shows no to-do

Tasks

  1. Add a GraphQL subscription
  2. Add a backend trigger when an action completes a ToDo
  3. Frontend consumes subscription

Example Project

What is the current bug behavior?

The button does not go to inactive state to reflect the todo is completed

What is the expected correct behavior?

The button should go to inactive state to reflect there is no to-do left (unless there's multiple todos on that issue).

Relevant logs and/or screenshots

image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by André Luís