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
F15509236: D21650.id51519.diff
Wed, Apr 16, 10:45 AM
F15491626: D21650.diff
Sat, Apr 12, 5:36 AM
F15447235: D21650.id51543.diff
Thu, Mar 27, 10:38 PM
F15438840: D21650.id51519.diff
Wed, Mar 26, 3:55 AM
F15434843: D21650.id.diff
Tue, Mar 25, 5:41 AM
F15430546: D21650.diff
Mon, Mar 24, 8:04 AM
F15418561: D21650.diff
Fri, Mar 21, 12:06 AM
Unknown Object (File)
Feb 23 2025, 1:42 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