Page MenuHomePhabricator

Conpherence - make sure real time updates still work if you switch threads
ClosedPublic

Authored by btrahan on May 7 2015, 7:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 2:14 AM
Unknown Object (File)
Sat, Apr 6, 11:38 PM
Unknown Object (File)
Mar 28 2024, 6:35 AM
Unknown Object (File)
Mar 22 2024, 10:10 PM
Unknown Object (File)
Mar 22 2024, 10:10 PM
Unknown Object (File)
Mar 22 2024, 10:10 PM
Unknown Object (File)
Mar 10 2024, 12:21 PM
Unknown Object (File)
Mar 6 2024, 5:23 PM
Subscribers

Details

Summary

Fixes T8118. Turns out this also was broken in the main view if e.g. you went to just /conpherence/. The fix is to make sure the threadmanager js class explicitly manages subscriptions as the loaded thread changes.

Test Plan
  • from /conpherence/ was able to receive messages in real time.
  • from /conpherence/ changed threads and still received messages in real time
  • from durable column switched threads and received messages in real time

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Conpherence - make sure real time updates still work if you switch threads.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
285–287

whoops, should be PHID not ID

epriestley edited edge metadata.
epriestley added inline comments.
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
282–304

Maybe simpler like this?

var old_subs = client.getSubscriptions();
var new_subs = [];
for (var ii = 0; ii < old_subs.length; ii++) {
  if (old_subs[ii] == this._loadedThreadPHID) {
    new_subs.push(r.threadPHID);
  } else {
    new_subs.push(old_subs[ii]);
  }
}
This revision is now accepted and ready to land.May 7 2015, 7:40 PM
btrahan edited edge metadata.
  • ID => PHID
  • require aphlict package in thread manager
  • celerity map update
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
281–303

I'll see if I can make it better, but the subscriptions don't necessarily have this._loadedThreadPHID in them. e.g. the /conpherence/ case

This revision was automatically updated to reflect the committed changes.