Naramsim / GithubOriginalStreak

Extension to get back current and longest streak. Original version :star: All Browsers :boom:
Mozilla Public License 2.0
232 stars 19 forks source link

Regression when double clicking a year? #49

Closed TDA closed 7 years ago

TDA commented 7 years ago

Hello, for some reason I believe I double-clicked on the year 2016 on my profile page, resulting in this:

screenshot 2016-10-11 23 44 14

Thinking this must be a transient issue, I refreshed the page, resulting in this:

screenshot 2016-10-11 23 44 43

But this streak is not right, as my streak starts on Jun 2, 2015:

screenshot 2016-10-11 23 43 44

I seemed to have broken my GithubStreaks plugin, so i uninstalled and re-installed it, and now I am neither able to click on options nor set the start date :( Please help me out, as I am almost at 500 now 💃

@Naramsim

Naramsim commented 7 years ago

Hi, I've set your start date back as it were. There is currently a bug when you click more than once on year buttons.

Now I don't have enough time to investigate, for a couple of weeks you should live with this bug.

However, the extension works correctly now since i restored your initial date

TDA commented 7 years ago

@Naramsim Thank you so much! really appreciate it!

TDA commented 7 years ago

@Naramsim Seems to have reset to 366 days again, not sure why, didnt even click this time :(

Naramsim commented 7 years ago

Updated your data. Don't know why it reset back to 366

TDA commented 7 years ago

@Naramsim I seem to have found a way to reproduce this. This seems to happen only when I make a push after 9pm PST. Not sure why :( It has reset back to 371 now. T_T

Naramsim commented 7 years ago

Hi @TDA, I think I found a bug that could cause this behavior. Basically, the start date is deleted with a backup if you do not commit for 2 or more days. But the current regex that reads backups does not work.

/^(\d{4}-\d{2}-\d{2})?(?:#(\d{4}-\d{2}-\d{2}))?(?:@([01]))?$/ -> correct one 6b69913f436242ed6ee6a5492bbfabf1c33a7ef9

I've updated the regex in order to read backups(only one char added). I am releasing updates in the stores.

TDA commented 7 years ago

@Naramsim Thank you so much!! You deserve a pat for fixing stuff so fast!! let me know if you have anything I can do! :)

TDA commented 7 years ago

@Naramsim It seems to have reset again. Notice how it says 2 days back even though its still October 20, 10.36PM PST.

screenshot 2016-10-20 22 36 05
TDA commented 7 years ago

@Naramsim But it has reset back to 507 now after I made todays push!! :D :D so this is indeed fixed!!! can be closed 👍

Naramsim commented 7 years ago

Yes, the behavior is this one: If you don't commit for two days the streak is correctly reset back. A backup is done. If at some moment it appears that you have contributed in those days, the backup is restored.

Good to know that it works!

TDA commented 7 years ago

@Naramsim But its not been 2 days :O cuz its still Oct 20th 11.55pm PST

Naramsim commented 7 years ago

Hi @TDA, I forgot to write you back. The stats are drawn by looking at the Github calendar, and in your picture you can see that there are two gray squares, this means that Github think you haven´t contributed for two days.

TDA commented 7 years ago

@Naramsim Yes, but after I make a push and refresh, it shows 0 gray squares. That screenshot and the comment were posted on Oct 20th well before midnight PST. But it shows two gray squares for Oct 20 AND Oct 21, which is in the future. Is this a general github thing? Cuz i dont remember having seen that behavior before.

Naramsim commented 7 years ago

Yes, it is about Github and how it calculates the time. For me everything is ok (UTC+01:00). I only watch the calendar.