Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streak broken? #88

Closed
ljharb opened this issue Mar 25, 2021 · 30 comments
Closed

Streak broken? #88

ljharb opened this issue Mar 25, 2021 · 30 comments

Comments

@ljharb
Copy link

ljharb commented Mar 25, 2021

As of today or yesterday, "current streak" seems to only be calculating based on the visible squares.

For example, when i go to https://github.com/ljharb?tab=overview&from=2021-03-01&to=2021-03-25, it shows me a current streak of "0 days"; when i go to https://github.com/ljharb, it shows me a current streak of 369 days. Neither is correct.

@Naramsim
Copy link
Owner

Hi @ljharb, the streak is calculated backward starting from the rightest day. In your first example, the rightest day is Dec 31 2021, which isn't yet happened. So I guess it's normal we calculate 0 days for that example.

Regarding your second example, I see your current streak equal to 109 days. Take a look below:

ljharb

On Dec 6 I don't have any contribution. On your calendar do you have contributions for Dec 6? Are those private?

@Naramsim
Copy link
Owner

If you had a full green calendar, then for you, @ljharb, the longest streak would have been calculated starting from 2020-03-22.

Does it seem right?

@Naramsim
Copy link
Owner

Naramsim commented Mar 25, 2021

Anyway, I think that the ability Github implemented about checking past years and thus rendering the calendar, broke the extension in case someone had a very long streak.

@Naramsim
Copy link
Owner

Yeah, I thought about it. So, if you request through the UI a different time period && you had a full streak. Then your full-streak can be broken if in the new rendered calendar there are 'holes'. So to fix this behavior I need to only update our database (a Github gist) when the default view is shown to the user. That is when the query string of the URL doesn't contain any to or from.

I'll try to fix it as soon as possible. But I'm doing so many other things... I hope I can @ljharb

@ljharb
Copy link
Author

ljharb commented Mar 25, 2021

Hmm - I definitely have contributions on that day, a PR review - on mine, the square shows filled in. Github does sometimes blank out days temporarily, i have no idea why.

Similarly, I have contributions on 2020-03-21 (also 2 PR reviews). My streak goes back to 2014.

Perhaps these anomalies are just on github's side.

@ljharb
Copy link
Author

ljharb commented Mar 25, 2021

Thanks!

Contributions in the past can happen any time, but it seems reasonable to assume that anything more than a year old is "frozen", or at least cached aggressively.

@Naramsim
Copy link
Owner

Nono, those anomalies are on Github and they were reflected in our database.

Can you please write your starting date down? If you don't remember I have to dig it up, but it's possible. Anyway, up until Github doesn't show that square green, I can't update your longest streak.

@ljharb
Copy link
Author

ljharb commented Mar 25, 2021

it's 2014-04-16.

@g-harel
Copy link

g-harel commented Mar 27, 2021

May be a separate thing, but I'm also seeing a much shorter streak than before. It's suspiciously stopping almost exactly a year ago on my profile.

@ljharb
Copy link
Author

ljharb commented Mar 29, 2021

Today, a few days later, it's still saying my streak ends almost exactly a year ago. The implication is that it's not counting beyond a year anymore.

@Naramsim
Copy link
Owner

For you @ljharb this is the case. Because you have a hole in the calendar

@ljharb
Copy link
Author

ljharb commented Mar 29, 2021

@Naramsim a hole that moves one day every day? Now it says it goes back to the 29th, and the (incorrect) hole you saw was on the 21st.

@spences10
Copy link

Same here, looks like it's only doing it for the last 366 days?
image

@Naramsim
Copy link
Owner

Naramsim commented Apr 13, 2021

Hi @spences10 Yesterday I released on Chrome and FF a potential fix for the bug. In the meantime, I reverted your old start contribution date to what it was.

I believe that there are still browsers that are using the old version of this extension, and when one loads your profile it could change the starting date back to Apr 2020. I guess we need to wait a bit and see if the error still happens.

@spences10
Copy link

I'm using MS Edge, shall I try uninstall and reinstall?

@spences10
Copy link

spences10 commented Apr 13, 2021

I just installed the Chrome version and it's working now 😊
image

@ljharb
Copy link
Author

ljharb commented Apr 13, 2021

@Naramsim how do i ensure the extension is updated? i'm still seeing 366 days back (i have v1.14.14)

@Naramsim
Copy link
Owner

@ljharb I updated your starting date but as soon as I updated it, it got reverted.

I'll try tomorrow. 1.14.14 is the latest version.

Also, your streak will only display for not logged-in users. I noted that the 'hole' is present if you are logged in and isn't any more present if you log out. Github itself has probably a bug in building the calendar.

@Naramsim
Copy link
Owner

Naramsim commented Apr 13, 2021

I'm using MS Edge, shall I try uninstall and reinstall?

Hi @spences10, in Edge how do you install this extension? Is there a marketplace?

@ljharb
Copy link
Author

ljharb commented Apr 13, 2021

@Naramsim in my specific case, i only ever view my streak as a logged-out user, for the exact reason that i want to see how others see it :-) github definitely has many such bugs at times.

Thanks, I'll try again tomorrow. How can i ensure that I have the newest version of the extension?

@Naramsim
Copy link
Owner

Chrome, in theory, auto-updates everything as soon as possible.

@ljharb
Copy link
Author

ljharb commented Apr 15, 2021

@Naramsim any chance you could try resetting my start date now? :-)

@Naramsim
Copy link
Owner

@ljharb, I rolled out a new version, fixing the issue also for your profile.

I'd wait 1 or 2 days, sorry.

@ljharb
Copy link
Author

ljharb commented Apr 16, 2021

Thanks! I’ll check in 48 hours, and I’ll try not to refresh that page in chrome until then :-)

@Naramsim
Copy link
Owner

Well, the chrome extension is already deployed. .15 is the newer version, you can check if it's installed by going to the 3-dots menu and select more tools -> extensions.

@ljharb
Copy link
Author

ljharb commented Apr 16, 2021

I'm on that version - does that mean it's safe to refresh?

@Naramsim
Copy link
Owner

yes hahah

@ljharb
Copy link
Author

ljharb commented Apr 16, 2021

yayyyyyy thank you!
Screen Shot 2021-04-16 at 12 53 01 PM

@ljharb ljharb closed this as completed Apr 16, 2021
@ljharb
Copy link
Author

ljharb commented Jan 13, 2023

@Naramsim this seems to have happened again - it thinks i have no contributions on 2022.01.08, but github currently shows me having 19.

@Naramsim
Copy link
Owner

yes, we are aware of the issue over here: #89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants