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
F17899778: D21650.id51543.diff
Tue, Jul 29, 8:45 AM
F17782264: D21650.id.diff
Thu, Jul 24, 8:05 AM
F17758004: D21650.diff
Tue, Jul 22, 4:41 PM
F17756281: D21650.id51543.diff
Tue, Jul 22, 1:53 PM
F17756280: D21650.id51519.diff
Tue, Jul 22, 1:53 PM
F17756047: D21650.id.diff
Tue, Jul 22, 1:33 PM
F17732077: D21650.diff
Sun, Jul 20, 3:52 AM
Unknown Object (File)
Jul 3 2025, 1:59 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
Branch
istate7
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 25327
Build 34969: Run Core Tests
Build 34968: arc lint + arc unit