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
F14056869: D12819.id30825.diff
Sat, Nov 16, 10:55 PM
F14025447: D12819.id30825.diff
Thu, Nov 7, 5:58 PM
F13990364: D12819.id30809.diff
Tue, Oct 22, 3:03 AM
F13980607: D12819.diff
Oct 19 2024, 11:39 AM
F13980444: D12819.id30825.diff
Oct 19 2024, 10:45 AM
F13970521: D12819.id30809.diff
Oct 17 2024, 8:10 AM
F13968248: D12819.diff
Oct 16 2024, 7:34 PM
F13967506: D12819.id.diff
Oct 16 2024, 2:03 PM
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
Branch
betterconph
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 5937
Build 5957: [Placeholder Plan] Wait for 30 Seconds

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.