Page MenuHomePhabricator

Fix an issue where inlines could be duplicated in the client list

Authored by epriestley on Mar 18 2021, 6:33 PM.
Referenced Files
F11656257: D21642.diff
Sun, Apr 2, 4:49 AM
Unknown Object (File)
Feb 23 2023, 9:49 PM
Unknown Object (File)
Feb 19 2023, 10:30 AM
Unknown Object (File)
Feb 13 2023, 4:49 AM
Unknown Object (File)
Feb 12 2023, 8:26 AM
Unknown Object (File)
Feb 8 2023, 10:14 PM
Unknown Object (File)
Feb 4 2023, 1:57 PM
Unknown Object (File)
Jan 10 2023, 3:16 PM



Ref T13559. D21261 added caching here, but the logic in rebuilding inlines wasn't quite correct, and could lead to us double-appending.

Instead, when rebuilding, unconditionally discard the old list.

Test Plan
  • Added inline comments to a file in Differential.
  • Marked some done.
  • Scrolled so the inline comment header was visible, saw "X / Y Comments" button in header.
  • Clicked "Show 20 more lines" on the changeset with inlines (or toggle "View Unified" / "View Side-by-Side", or other interactions likely work too).
    • Before: saw "X / Y" change improperly (because inlines in that file were double-counted).
    • After: saw stable count.
  • Grepped for "differential-inline-comment-refresh", got no hits, concluded this event has no listeners.

Diff Detail

rP Phabricator
Lint Passed
No Test Coverage
Build Status
Buildable 25315
Build 34947: Run Core Tests
Build 34946: arc lint + arc unit

Unit TestsFailed

205 msPhabricatorCelerityTestCase::testCelerityMaps
Assertion failed, expected 'true' (at PhabricatorCelerityTestCase.php:32): When this test fails, it means the Celerity resource map is out of date. Run `bin/celerity map` to rebuild it. ACTUAL VALUE
0 msAlmanacNamesTestCase::testServiceOrDeviceNames
30 assertions passed.
0 msAlmanacServiceTypeTestCase::testGetAllServiceTypes
1 assertion passed.
0 msAphrontHTTPHeaderParserTestCase::testHeaderParser
18 assertions passed.
0 msAphrontHTTPSinkTestCase::testHTTPHeaderNames
2 assertions passed.
View Full Test Results (1 Failed · 424 Passed · 2 Skipped)