Page MenuHomePhabricator

Make workboard real-time updates mostly work
ClosedPublic

Authored by epriestley on Jul 17 2019, 8:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 4:26 AM
Unknown Object (File)
Thu, Apr 11, 4:26 AM
Unknown Object (File)
Thu, Apr 11, 4:26 AM
Unknown Object (File)
Wed, Apr 10, 6:29 PM
Unknown Object (File)
Sat, Mar 30, 8:26 AM
Unknown Object (File)
Sat, Mar 30, 8:25 AM
Unknown Object (File)
Sat, Mar 30, 8:25 AM
Unknown Object (File)
Mar 14 2024, 5:32 PM
Subscribers
None

Details

Summary

Depends on D20654. Ref T4900. When a task is edited, emit a "workboards" event for all boards it appears on (in a future change, this should also include all boards it previously appeared on, and all parents of both sets of boards -- but I'm just getting things working for now).

When we receive a "workboards" event, check if the visible board should be updated.

Aphlict has a complicated intra-window leader/follower election system which could let us process this update event exactly once no matter how many windows a user has open with the same workboard. I'm not trying to do any of this since it seems fairly rare. It makes sense for events like "you have new notifications" where we don't want to generate 100 Ajax calls if the user has 100 windows open, but very few users seem likely to have 100 copies of the same workboard open.

Test Plan
  • Ran bin/aphlict debug.
  • Opened workboard A in two windows, X and Y.
  • Edited and moved tasks in window X.
  • Saw "workboards" messages in the Aphlict log.
  • Saw window Y update in nearly-real-time (locally, this is fast enough that it feels instantaneous).

Then:

  • Stopped the Aphlcit server.
  • Edited a task.
  • Started the Aphlict server.
  • Saw window Y update after a few moments (i.e., update in response to a reconnect).

Diff Detail

Repository
rP Phabricator
Branch
refresh16
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/applications/maniphest/editor/ManiphestTransactionEditor.php:864XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 23141
Build 31779: Run Core Tests
Build 31778: arc lint + arc unit