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
F19083443: D21650.id51543.diff
Tue, Dec 2, 12:36 PM
F18993623: D21650.id51519.diff
Wed, Nov 19, 8:13 AM
F18936643: D21650.id51519.diff
Nov 10 2025, 8:56 PM
F18783433: D21650.diff
Oct 13 2025, 6:39 AM
F18772486: D21650.diff
Oct 9 2025, 2:48 AM
F18737128: D21650.id51543.diff
Oct 1 2025, 9:08 AM
F18734412: D21650.id.diff
Sep 30 2025, 10:53 PM
F18673844: D21650.id51543.diff
Sep 25 2025, 12:17 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