Page MenuHomePhabricator

Fix an issue when undoing mutiple inline comment deletions
ClosedPublic

Authored by epriestley on Mar 25 2021, 9:03 PM.
Tags
None
Referenced Files
F14495662: D21650.diff
Fri, Jan 3, 9:25 AM
F14492747: D21650.id.diff
Thu, Jan 2, 9:59 PM
Unknown Object (File)
Fri, Dec 27, 6:37 PM
Unknown Object (File)
Thu, Dec 19, 4:27 PM
Unknown Object (File)
Wed, Dec 11, 4:11 AM
Unknown Object (File)
Nov 27 2024, 7:27 AM
Unknown Object (File)
Nov 26 2024, 8:15 PM
Unknown Object (File)
Nov 22 2024, 5:27 PM
Subscribers
None

Details

Summary

Ref T13559. If you create comments A and B, then delete comments A and B, then undo the deletion of A, the UI undoes the deletion of B instead.

This is becasue the undo rows are shipped down with a static scalar metadata reference. When copied multiple times to create multiple undo rows, they reference the same data object.

Preventing this in the general case is a problem with greater scope. For now, just avoid rendering these rows with any metadata so they don't alias a single data object.

Test Plan
  • Created comments A, B.
  • Deleted comments A, B.
  • Clicked "Undo" on A.
    • Before: Deletion of "B" undone.
    • After: Deletion of "A" undone.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable