cds-snc/notification-planning

Dashboard auto update is broken [bug-bogue]

Closed this issue · 4 comments

Describe the bug

The dashboard auto update feature is broken since the release of bounce rate V1.

Bug Severity

See examples in the documentation

SEV-2 Major

To Reproduce

Steps to reproduce the behaviour:

  1. log in to production or staging
  2. visit your service dashboard
  3. Send a bulk email job through the API
  4. Observe that the total emails sent does not update until you refresh the page

Expected behaviour

As sends occur, the dashboard should auto-update the total emails sent, total sms sent, etc so that the user does not need to refresh the page. You can observe this feature working by taking the following steps:

  1. check out an older version of the admin codebase
  2. set FF_BOUNCE_RATE_V1 = False and API_HOST_NAME=https://api.staging.notification.cdssandbox.xyz in your .env file
  3. start admin, and log in, visit your service dashboard
  4. send a bulk email job via api
  5. the total emails sent will be updated automatically after a few seconds (4 seconds in my test)

Impact

Impact on Notify users:
Worse user experience

Additional context

I discovered this while doing some testing for the bounce rate v1.5 release.

QA Steps

  • Log into Staging, visit your service dashboard, take not of how many emails you have sent this week
  • Open a 2nd browser tab with the same service dashboard
  • send yourself an email using the 2nd tab
  • switch back to the 1st tab, and do not refresh
  • verify that the "email sent" total increases by 1

I've investigated some more and I introduced this bug with the layout change PR: cds-snc/notification-admin@f8b9dbd

Reviewed by Jumana, merged and deployed to Prod. Ready to be QA'd.

QA'd by me, LGTM! Moving to Done.