Page MenuHomePhabricator

Recover inline comments which are "adjusted" off the end of a diff
ClosedPublic

Authored by epriestley on Aug 5 2020, 7:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 12:41 PM
Unknown Object (File)
Thu, Mar 21, 5:22 AM
Unknown Object (File)
Feb 15 2024, 10:12 PM
Unknown Object (File)
Dec 23 2023, 8:55 PM
Unknown Object (File)
Dec 23 2023, 7:32 PM
Unknown Object (File)
Dec 2 2023, 8:19 AM
Unknown Object (File)
Dec 1 2023, 8:53 AM
Unknown Object (File)
Nov 30 2023, 3:38 AM
Subscribers
None

Details

Summary

See PHI1834. Currently, the inline adjustment engine can sometime "adjust" an inline off the end of a diff. If it does, we lay it out on an invalid display line here and never render it.

Instead, make sure that layout never puts a comment on an invalid line, so the UI is robust against questionable decisions by the adjustment engine: no adjustment should be able to accidentally discard an inline.

Test Plan
  • Created a two diff revision, where Diffs 1 and 2 have "alphabet.txt" with A-Z on one line each. The file is unchanged across diffs; some other file is changed.
  • Added a comment to lines P-Z of Diff 1.
  • Before: comment is adjusted out of range on Diff 2 and not shown in the UI.
  • After: comment is still adjusted out of range internally, but now corrected into the display range and shown.

Diff Detail

Repository
rP Phabricator
Branch
newline1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 24823
Build 34247: Run Core Tests
Build 34246: arc lint + arc unit