@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

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

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8118

Differential Revision: https://secure.phabricator.com/D12758

+44 -22
+23 -22
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => 'ca3f6a60', 11 - 'core.pkg.js' => 'f6b48b53', 11 + 'core.pkg.js' => '5a18f0ab', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => 'bb338e4b', 14 14 'differential.pkg.js' => '895b8d62', ··· 340 340 'rsrc/image/texture/table_header.png' => '5c433037', 341 341 'rsrc/image/texture/table_header_hover.png' => '038ec3b9', 342 342 'rsrc/image/texture/table_header_tall.png' => 'd56b434f', 343 - 'rsrc/js/application/aphlict/Aphlict.js' => '30a6303c', 343 + 'rsrc/js/application/aphlict/Aphlict.js' => '5359e785', 344 344 'rsrc/js/application/aphlict/behavior-aphlict-dropdown.js' => '0323afdd', 345 345 'rsrc/js/application/aphlict/behavior-aphlict-listen.js' => 'b1a59974', 346 346 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761', 347 347 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 348 348 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 349 - 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'f8dace3b', 349 + 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '7a608e21', 350 350 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', 351 351 'rsrc/js/application/conpherence/behavior-durable-column.js' => '657c2b50', 352 352 'rsrc/js/application/conpherence/behavior-menu.js' => '804b0773', ··· 513 513 'conpherence-menu-css' => 'f389e048', 514 514 'conpherence-message-pane-css' => '3150e2a2', 515 515 'conpherence-notification-css' => 'd208f806', 516 - 'conpherence-thread-manager' => 'f8dace3b', 516 + 'conpherence-thread-manager' => '7a608e21', 517 517 'conpherence-transaction-css' => '25138b7f', 518 518 'conpherence-update-css' => '1099a660', 519 519 'conpherence-widget-pane-css' => '2af42ebe', ··· 539 539 'herald-test-css' => '778b008e', 540 540 'homepage-panel-css' => 'e34bf140', 541 541 'inline-comment-summary-css' => 'eb5f8e8c', 542 - 'javelin-aphlict' => '30a6303c', 542 + 'javelin-aphlict' => '5359e785', 543 543 'javelin-behavior' => '61cbc29a', 544 544 'javelin-behavior-aphlict-dropdown' => '0323afdd', 545 545 'javelin-behavior-aphlict-listen' => 'b1a59974', ··· 1022 1022 'javelin-install', 1023 1023 'javelin-event', 1024 1024 ), 1025 - '30a6303c' => array( 1026 - 'javelin-install', 1027 - 'javelin-util', 1028 - 'javelin-websocket', 1029 - 'javelin-leader', 1030 - 'javelin-json', 1031 - ), 1032 1025 '316b8fa1' => array( 1033 1026 'javelin-install', 1034 1027 'javelin-typeahead-source', ··· 1155 1148 'javelin-dom', 1156 1149 'javelin-reactor-dom', 1157 1150 ), 1151 + '5359e785' => array( 1152 + 'javelin-install', 1153 + 'javelin-util', 1154 + 'javelin-websocket', 1155 + 'javelin-leader', 1156 + 'javelin-json', 1157 + ), 1158 1158 '54b612ba' => array( 1159 1159 'javelin-color', 1160 1160 'javelin-install', ··· 1379 1379 '7927a7d3' => array( 1380 1380 'javelin-behavior', 1381 1381 'javelin-quicksand', 1382 + ), 1383 + '7a608e21' => array( 1384 + 'javelin-dom', 1385 + 'javelin-util', 1386 + 'javelin-stratcom', 1387 + 'javelin-install', 1388 + 'javelin-aphlict', 1389 + 'javelin-workflow', 1390 + 'javelin-router', 1391 + 'javelin-behavior-device', 1392 + 'javelin-vector', 1382 1393 ), 1383 1394 '7a68dda3' => array( 1384 1395 'owners-path-editor', ··· 1986 1997 'javelin-mask', 1987 1998 'javelin-util', 1988 1999 'phabricator-busy', 1989 - ), 1990 - 'f8dace3b' => array( 1991 - 'javelin-dom', 1992 - 'javelin-util', 1993 - 'javelin-stratcom', 1994 - 'javelin-install', 1995 - 'javelin-workflow', 1996 - 'javelin-router', 1997 - 'javelin-behavior-device', 1998 - 'javelin-vector', 1999 2000 ), 2000 2001 'f9539603' => array( 2001 2002 'javelin-behavior',
+4
webroot/rsrc/js/application/aphlict/Aphlict.js
··· 49 49 JX.Leader.call(JX.bind(this, this._begin)); 50 50 }, 51 51 52 + getSubscriptions: function() { 53 + return this._subscriptions; 54 + }, 55 + 52 56 setSubscriptions: function(subscriptions) { 53 57 this._subscriptions = subscriptions; 54 58 JX.Leader.broadcast(
+17
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
··· 4 4 * javelin-util 5 5 * javelin-stratcom 6 6 * javelin-install 7 + * javelin-aphlict 7 8 * javelin-workflow 8 9 * javelin-router 9 10 * javelin-behavior-device ··· 277 278 params = this._getParams(params); 278 279 279 280 var handler = JX.bind(this, function(r) { 281 + var client = JX.Aphlict.getInstance(); 282 + if (client) { 283 + var old_subs = client.getSubscriptions(); 284 + var new_subs = []; 285 + for (var ii = 0; ii < old_subs.length; ii++) { 286 + if (old_subs[ii] == this._loadedThreadPHID) { 287 + continue; 288 + } else { 289 + new_subs.push(old_subs[ii]); 290 + } 291 + } 292 + new_subs.push(r.threadPHID); 293 + client.clearSubscriptions(client.getSubscriptions()); 294 + client.setSubscriptions(new_subs); 295 + } 280 296 this._loadedThreadID = r.threadID; 281 297 this._loadedThreadPHID = r.threadPHID; 282 298 this._latestTransactionID = r.latestTransactionID; 283 299 this._canEditLoadedThread = r.canEdit; 300 + 284 301 JX.Stratcom.invoke('notification-panel-update', null, {}); 285 302 286 303 this._didLoadThreadCallback(r);