refined-github icon indicating copy to clipboard operation
refined-github copied to clipboard

Wrong `highest-rated-comment` if there's >1 reactions

Open TonyRL opened this issue 1 year ago • 7 comments

Description

The highest rated comment should be the one from Tennyleaz (42 upvotes) instead of the one from xromansx (12 upvotes).

Screenshot

Screenshot

Screenshot 2

Screenshot 2

How to replicate the issue + URL

Visit: https://github.com/netbirdio/netbird/issues/363

Extension version

24.8.13

Browser(s) used

FireFox v129.0.1

Token ⚠️

  • [X] I set a token in the options page. I understand that some features require a token to work.

TonyRL avatar Aug 14 '24 21:08 TonyRL

It picks the 42 upvotes for me (Safari, v24.7.20)

image

fregante avatar Aug 15 '24 01:08 fregante

It works fine on Chromium-based browsers (v118 and v127). So I guess it's a Firefox specific issue.

TonyRL avatar Aug 15 '24 02:08 TonyRL

Does it happen consistently? Or just sometimes?

fregante avatar Aug 15 '24 02:08 fregante

https://github.com/refined-github/refined-github/blob/9300b6b3f2e73298419abb0e9ee57c61bb6a11e8/source/features/highest-rated-comment.tsx#L121-L126 Works as intended on Firefox.

I haven't found any GitHub issues that can reproduce the same result yet. I've tried disabling all extensions except Refined GitHub and it's still picking up the 12 upvotes one. However, it's picking up the correct one in incognito mode.

TonyRL avatar Aug 15 '24 03:08 TonyRL

I can't repro in Firefox either, Refined GitHub v24.8.13 and the previous v24.8.3

Screenshot 8

The feature waits for the whole page to be loaded too, so this shouldn't be a race condition either. Do you have other extensions?

Does it happen at every load of https://github.com/netbirdio/netbird/issues/363 or just sometimes?

fregante avatar Aug 17 '24 11:08 fregante

Could something like this have been the problem? Are you logged into GitHub when the issue occurs?

GitHub sometimes trims the reactions and I don’t think we support this DOM

IMG_4703

fregante avatar Aug 18 '24 09:08 fregante

Do you have other extensions?

...I've tried disabling all extensions except Refined GitHub and it's still picking up the 12 upvotes one...

Originally posted by TonyRL in https://github.com/refined-github/refined-github/issues/7687#issuecomment-2290473447

Are you logged into GitHub when the issue occurs?

Yes. It's logged in on Firefox. If I log out (or in incognito mode) when visiting that issue, it does pick up the 42 upvotes one.

Does it happen at every load of https://github.com/netbirdio/netbird/issues/363 or just sometimes?

It happens on every load.

TonyRL avatar Aug 18 '24 14:08 TonyRL

Thanks for the report, but seems to be too niche to work on. Likely the new view will fix it or require a rework of the feature anyway.

  • #7856

fregante avatar Nov 08 '24 06:11 fregante