musically-ut / lovely-forks

💚 🍴 Show notable forks of GitHub repositories under their names.
Mozilla Public License 2.0
603 stars 40 forks source link

Fix `also forked` disappearing #80

Closed Jorgen1040 closed 1 year ago

Jorgen1040 commented 2 years ago

Recently noticed that the "also forked" message has been disappearing when switching between different repo views (Issues, Pull requests, etc).

It seems GitHub has changed the way they load/render the page since the fix I implemented in #69 now pretty much does the opposite (detects it when it doesn't exist, thus doesn't add it). So just removing it fixes the issue. Hopefully it doesn't reintroduce the old bug, but I haven't been able to reproduce it yet, fingers crossed.

Jorgen1040 commented 2 years ago

Right after making this PR I found a bug again, working on a fix now.

Jorgen1040 commented 2 years ago

I'm unable to replicate the bug after testing it all the ways I can come up with. (FYI, the bug I found was that the "also forked to" message duplicated.)

I'll open this up again and you can test it yourself and see if you're able to get the same bug.

musically-ut commented 2 years ago

Thanks! 🙏

I'll merge it locally and run with it for a couple of days and see if I see anything odd.

Jorgen1040 commented 2 years ago

I finally figured out how to reproduce the bug: If you click on a commit, like for example the commit in this PR, and then use the back button in the browser it will generate a duplicate. If you keep going back from the commit it'll keep duplicating the "also forked to" message. See attached GIF to make it easier to understand. chrome_FkpiKRzZbn

Working on a fix now.

musically-ut commented 2 years ago

Whoa! Those are some serious debugging chops right there!