Replace notes polling with ActionCable
What does this MR do and why?
Updates notes in real time using websockets instead of polling.
The websocket is used to signal a note change and then we request the same endpoint used for polling to get the updated notes. This is done so minimal changes are needed.
This will eventually be changed to use GraphQL subscriptions, but I did this since we can get most of the benefits with just small code changes.
How to set up and validate locally
- Enable the
action_cable_notes
feature flag - Open an issue / MR / epic in two windows / browsers
- Add / update a note in one window
The updates should show up immediately on the other window. You can also verify in the network inspector that we are no longer polling on the notes
endpoint.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Heinrich Lee Yu