Page MenuHomePhabricator

Conpherence - change message rendering logic to eradicate possibility of duplicates
ClosedPublic

Authored by btrahan on May 12 2015, 11:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 1:50 AM
Unknown Object (File)
Thu, Apr 4, 10:42 PM
Unknown Object (File)
Sat, Mar 30, 1:05 PM
Unknown Object (File)
Mar 23 2024, 5:28 AM
Unknown Object (File)
Mar 22 2024, 12:39 PM
Unknown Object (File)
Mar 17 2024, 4:11 PM
Unknown Object (File)
Mar 17 2024, 4:07 PM
Unknown Object (File)
Feb 11 2024, 5:31 AM
Subscribers

Details

Summary

Fixes T6713. Before this diff, we would update the DOM when various requests came back, but the logic to erase race conditions proved too tricky for me to get right. Instead, change the algorithm up and keep a set of transaction ids around per thread. When its time to update the transactions, sort the list of ids and just render the whole darn set again.

To make this work, this ends up adding transacton ids to fake transactons like "show older" and date markers. This is able to work by using a float sort and giving these transactions ids that are .5 from being an integer and in the right place numerically.

Test Plan

for durable column, clicked show older and it worked. sent a message and it worked. for main view, clicked show older and it worked. sent a message and it worked.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

btrahan retitled this revision from to Conpherence - change message rendering logic to eradicate possibility of duplicates.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
119

omg

This revision is now accepted and ready to land.May 12 2015, 11:48 PM
btrahan edited edge metadata.
  • refactor sort function to reduce likelihood of future developers taking the lord's name in vain reviewing the code
  • and rebase
  • and celerity map
This revision was automatically updated to reflect the committed changes.