Page MenuHomePhabricator

Make Conpherence threads update in real time, very roughly
ClosedPublic

Authored by epriestley on Jun 11 2014, 8:29 PM.
Tags
None
Referenced Files
F18733154: D9486.id.diff
Tue, Sep 30, 9:49 PM
F18717360: D9486.diff
Mon, Sep 29, 1:34 PM
F18472745: D9486.diff
Sep 2 2025, 8:48 PM
F18439019: D9486.id22708.diff
Aug 31 2025, 2:10 PM
F18403539: D9486.id.diff
Aug 29 2025, 9:20 PM
F18377864: D9486.diff
Aug 28 2025, 1:35 PM
F18107826: D9486.id22707.diff
Aug 11 2025, 3:23 AM
F18089454: D9486.id22708.diff
Aug 6 2025, 11:30 AM
Subscribers

Details

Summary

Ref T4083. This needs some work (mostly in the Conpherence JS itself), but is sort of functional. In particular:

  • On thread pages, add the thread as a pageObject.
  • After updating a thread, send a new "message" event to the server.
  • Share a little more event posting code.
  • In the browser, use event dispatch to respond to events.
  • Add a listener for the new event type.
  • Update conpherence threads (this part is really yucky).
Test Plan

With multiple browser windows / browsers open, posted a message to a thread, and saw it update everywhere.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Make Conpherence threads update in real time, very roughly.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: joshuaspence.
src/applications/conpherence/controller/ConpherenceViewController.php
100

This works differentally from regular notifications I think... Is that intentional? Regular notifications are based on subscriptions rather than pageObjects.

src/applications/notification/client/PhabricatorNotificationClient.php
36

It might be useful to log stuff here... even if we want to ignore the exception.

src/applications/conpherence/controller/ConpherenceViewController.php
100

The normal "This object has been updated, click to reload." special notifications are based on pageObjects. This is more similar to those -- for now, I only want a user to receive these updates if they have the thread open in a browser window.

(Eventually we could send them to all thread participants and make the UI fancier, but this is rough as-is without trying to get crazy.)

So, it's intentional that the thread PHID being open in a browser window (not the user's participation in a thread) is used to figure out whether you get a notification or not.

src/applications/notification/client/PhabricatorNotificationClient.php
36

I'll fix this.

  • Slightly simpler logic for posting updates.
  • Log exceptions.
  • Remove a stray JX.log().
This revision is now accepted and ready to land.Jun 11 2014, 8:46 PM
epriestley updated this revision to Diff 22710.

Closed by commit rP4bc561f17bc8 (authored by @epriestley).