Diffs don't track all changes when edits are made soon after each other

(Greg Schafer) #1

This diff bug is illustrated on try.discourse: http://try.discourse.org/t/testing-diffs-date-changing-content-diff-avatar/686/3?u=grschafer

Look at the 2 edit diffs of the 3rd post and you’ll notice that the following line:

Something that will magically appear without being highlighted in a diff.

appears between the diffs without being highlighted in green. That is, in “2 vs 3” the above line is present in version 2 of the file, but in “1 vs 2” it is missing in version 2 of the file.

This happened because I edited the post to add that sentence, saved the edit, then made a new edit soon after, where I added:

Because I submitted another change immediately after.

The 2nd edit is the only one that shows up in the diff, but the 1st edit didn’t get its own diff – it was overwritten because the 2nd edit happened so soon after the 1st edit. If diffs near each other in time are going to be grouped under 1 diff, they should be added rather than overwritten.

Let me know if you have any questions, because I know this text description is a bit unwieldy.

(Bill Ayakatubby) #2

I believe there’s a five-minute grace period where changes are rolled into the same version.

(Greg Schafer) #3

Yes, I figured that it’s trying to combine diffs in that grace period. The issue is that it is overwriting, rather than adding together diffs that occur in that period. In the try.discourse example in my original post, the “2 vs 3” diff should have the “Something that will…” line highlighted in green, because that addition occurred in the same grace period as the addition of the “Because I submitted…” line.

(Régis Hanol) #4

This topic is now closed. New replies are no longer allowed.

This is a known issue I have yet to fix