Notification count doesn't auto-update on reading

The notification counter, next to the bell and in the page title, updates itself in real-time when a new notification arrives, which is a cool feature.

But after that, if I mark the notifications read in a different tab, it doesn’t auto-reset in all the other tabs and keeps showing the “(N)” in their titles until I manually reload them. If I have a few tabs open, maybe editing something in one of them so I can’t just reload it, it gets a little annoying.

So, it would be nice if the counter could go down just like it goes up, using the Aphlict connection.

Reproduction Instructions

  1. Make sure Aphlict is configured.
  2. Open more than 1 tab of Phabricator.
  3. Send yourself a notification, e.g. with bin/aphlict notify --user my_user_name --message "Test notification".
  4. All tabs show “(1)” in their titles.
  5. Click on the bell -> “Mark All Read”.
  6. The current tab reloads and doesn’t have the counter in the title or next to the bell anymore. Other tabs still do, and if you click the bell in one of them, the notification is still marked new.

Phabricator/Arcanist Version

Library Version Date Branchpoint
phabricator local fork from ff6f24db2b Fri, Mar 6
arcanist 729100955129 Jan 31 2020 21a1828ea06c
phutil 034cf7cc3994 Jan 31 2020 cc2a3dbf5903