fix(feedback): Fix a case where duplicate items can be rendered in the list #95623
+9
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The robots made a comment: #95398 (review)
It points out that we're not de-duplicating result items inside an infinite list when we go to render things.
How could we get duplicate items? If the pagination params are based on offsets (which ours mostly are) then:
id:1
,id:2
, ...id:10
) in the first pageid:11
,id:12
and so onBut "start" depends on the sort order, and usually we're showing the most recent stuff first.
id: 89
,id:88
,id:87
, etc.id:79
, id:78`, etc.id:90
then everything else shifts down one.id: 80
,id:79
, etc.The end result is that
id:80
is double-fetched. This is what we need to filter out of the data.