HabitRPG / habitica

A habit tracker app which treats your goals like a Role Playing Game.
https://habitica.com
Other
11.98k stars 4.09k forks source link

Order of tasks are shuffled #318

Closed lunaire closed 11 years ago

lunaire commented 11 years ago

This has happened seemingly everytime the server crashes or I get disconnected (i.e. today for the upgrade). The order of daily and todos are shuffled in a seemingly random fashion. Quite annoying since I had them ordered in order of importance.

Also, now I cannot re-order the tasks; it gets reset to this current order after I refresh the page.

[Intel/ windows 7 system, chrome browser]

lefnire commented 11 years ago

Confirmed. Fixing

On Wed, Feb 6, 2013 at 6:10 PM, lunaire notifications@github.com wrote:

This has happened seemingly everytime the server crashes or I get disconnected (i.e. today for the upgrade). The order of daily and todos are shuffled in a seemingly random fashion. Quite annoying since I had them ordered in order of importance.

Also, now I cannot re-order the tasks; it gets reset to this current order after I refresh the page.

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318.

StanLindsey commented 11 years ago

I get this too, sadface.

horusofoz commented 11 years ago

Here too :(

wc8 commented 11 years ago

Mine got rearranged up and is insisting on the new order of things. That is to say, after refresh, it reverts to the wrong order.

lefnire commented 11 years ago

I've found the issue, but I'm not sure how to fix it. Here's the backstory:

Derby uses refLists to maintain order of object lists. So you have user.tasks stored willy-nilly, then you have user.idLists.habits which filters tasks by type (habit), and maintains sort order. Well, a while back people were just losing their tasks wholesale. Turns out they weren't losing anything from user.tasks, they were just losing user.idLists.*. My hack to that can be found here, which looks at user.tasks and puts it back into the refLists if they went missing for some reason - it only happened to some people, not everyone. Now, however, it's happening to everyone. So every refresh causes the idLists to go missing, and this hack puts all the taks back into place - in the order tasks were added to the user object. In other words, this hack can no longer be employed and we need to find the root of corrupt user.idLists.*

I'm babbling in case devs (@SlappyBag) are listening :) And thinking out loud.

StanLindsey commented 11 years ago

As I mentioned on gTalk instead of having two objects; one the tasks themselves and one for the task lists. Could you put the an extra variable in the actual task itself with its position. Then it could be uploaded/downloaded as one whole object instead of two and if the tasks display you'd know that variable was coming down the pipes. Then you'd just need the JS to display them in the order of that variable?

lefnire commented 11 years ago

fixed 5ea0dfe713efabed95e4ea4dc51ddfa5fc02d674

lefnire commented 11 years ago

I was lucky enough to have read @SLaks' commit message for this just today, I never would have figured this one out on my own https://github.com/SLaks/racer/commit/87921075fd65e55ad1e283700a1962a3c8010983

lefnire commented 11 years ago

some people are still finding this to be an issue, re-opening

ghost commented 11 years ago

Happened to me just now...

StanLindsey commented 11 years ago

_< I blame the date pickers.

lefnire commented 11 years ago

naw, we're reverted back to a commit before due-dates. It's actually been an issue for the last few days still. I blame refLists. Also, I'm keeping a keen eye on https://github.com/SLaks/racer - this guy's been fixing up refLists and model queries like woa

StanLindsey commented 11 years ago

I was making a funny =(

Many projects seem to be having problems withth derby refLists if I recal

SLaks commented 11 years ago

If you can reproduce this, can you try to determine whether the IDs are wrong (in which case the problem would probably be in listenerQueryMutator or types/find.js) or whether the refList is broken?

mattrozak commented 11 years ago

i went to assign a due date on a todo. As soon as I clicked on the date textbox, all habits, dailies, todos, and rewards vanished. After I refreshed, everything was still there but was shuffled.

Whenever my tasks do get shuffled, it's usually preceded by everything vanishing momentarily/until a refresh.

kwilson328 commented 11 years ago

Haven't touched due dates yet, but experiencing the same event order as @mattrozak, vanishing -> refresh -> shuffling

Chrome v24.0.1312.57 OSX 10.7.5

lefnire commented 11 years ago

possible clue https://github.com/codeparty/racer-db-mongo/issues/6#issuecomment-13816218

@SLaks I'll give your suggestions a try moment I can, thanks!

ericwilmoth commented 11 years ago

very much looking forward to the solution...

l--l commented 11 years ago

Even if the order of tasks is not shuffled, most days I can't even drag and drop my tasks to arrange them in the order I want. This function seems to be working only intermittently. Any idea when this might be stable?

Chrome 25.0.1364.99 Mac OS 10.8.2

horusofoz commented 11 years ago

Today this is not happening for me. Can anyone else confirm if it appears resolved?

horusofoz commented 11 years ago

Closed in error.

ghost commented 11 years ago

It is still happening to me

horusofoz commented 11 years ago

@Neohuman Can you clear your browser cache, close, reopen and test again?

ghost commented 11 years ago

I did that and the problem still persists

On Sat, Feb 23, 2013 at 9:08 PM, horusofoz notifications@github.com wrote:

@Neohuman https://github.com/Neohuman Can you clear your browser cache, close, reopen and test again?

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14002582.

lefnire commented 11 years ago

Nothings fixed here, i'll chime in when we have a fix. Looking into bounty for fixing this On Feb 23, 2013 10:09 PM, "Wesley Pennock" notifications@github.com wrote:

I did that and the problem still persists

On Sat, Feb 23, 2013 at 9:08 PM, horusofoz notifications@github.com wrote:

@Neohuman https://github.com/Neohuman Can you clear your browser cache, close, reopen and test again?

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14002582>.

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14002606.

horusofoz commented 11 years ago

I experienced 14 hours today without my tasks being reshuffled after being able to order them without a hitch. Then tonight I accessed the app from my phone and after a glitch with select a habit plus and refreshing the page I saw a reshuffle had occurred. I can't think of why but the trigger in this instance appears to be accessing the app from my phone. Note: Android/Chrome.

EDIT: Returning to the web app I was having trouble dragging tasks. I closed all mobile instances, refreshed the page and voila, able to drag/order tasks. Refresh page and tasks retain order.

ericwilmoth commented 11 years ago

Glad to see this is one of the current items. Looking forward to being able to get back to RPG once this is fixed.

horusofoz commented 11 years ago

I tested on my phone again today and above behaviour did not repeat. Must have been a coincidence. Disregard.

Pandoro commented 11 years ago

For me the shuffling was caused by actively reordering and refreshing the site a lot of times in a row. Right now... I don't really feel like reproducing this ;) But it might be some hint on where to look for the bug when trying to reproduce it.

horusofoz commented 11 years ago

Thank @Pandoro. This could render my previous info relevant as I was Constantly switching between my PC and mobile for the app. Sounds like the contant refreshing could be a commonality at least between our own instances. Horusofoz "Live to learn. Learn to live." J.W.S.

On 28 February 2013 21:44, Pandoro notifications@github.com wrote:

For me the shuffling was caused by actively reordering and refreshing the site a lot of times in a row. Right now... I don't really feel like reproducing this ;) But it might be some hint on where to look for the bug when trying to reproduce it.

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14228468 .

lefnire commented 11 years ago

for anyone that this is definitely a problem for still, shoot me your user id if you could

ericwilmoth commented 11 years ago

Does it matter if we publicly post them, or should it be a P.M? I've been avoiding using RPG till there was a clear fix for this...so short of reordering things and seeing if it fails again i can only assume it's still a problem...unless there was an attempted fix I'm unaware of?

lefnire commented 11 years ago

email it to me directly: link (though, since api-tokens were enacted it is safe to show UUIDs publicly)

lefnire commented 11 years ago

I haven't fixed anything directly, but I've been merging in SLaks' Racer fork commits periodically, many of which deal directly with refLists (refLists definitely being the issue with this ticket). So I check in here from time to time to see if any recent Racer fixes solved the problem..

ericwilmoth commented 11 years ago

Thanks--i just sent my id to you. Given your last comment, does that mean I should give it a shot and see what happens, or wait till you've had a chance to play with it further?

ericwilmoth commented 11 years ago

incidentally, i just tried moving a couple items, the page hiccuped...i refreshed, and the changes i made were discombobulated again, so it's definitely still happening.

horusofoz commented 11 years ago

If it helps, I'm not experiencing any shuffling issues or trouble reordering tasks, however I found I can move tasks around with out issue but still can't move rewards. Same behaviour as before where it selects text rather than move around the item.

lefnire commented 11 years ago

You can't move items, those aren't sortable. reward-rewards?

On Tuesday, March 5, 2013, horusofoz wrote:

If it helps, I'm not experiencing any shuffling issues or trouble reordering tasks, however I found I can move tasks around with out issue but still can't move rewards. Same behaviour as before where it selects text rather than move around the item.

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14437768 .

Pandoro commented 11 years ago

@lefnire, no I can confirm this, sometimes I can drag and drop custom rewards, sometimes it will just select them. This seems to be related to the duplicate reward bug though.

On Tue, Mar 5, 2013 at 2:07 PM, Tyler Renelle notifications@github.comwrote:

You can't move items, those aren't sortable. reward-rewards?

On Tuesday, March 5, 2013, horusofoz wrote:

If it helps, I'm not experiencing any shuffling issues or trouble reordering tasks, however I found I can move tasks around with out issue but still can't move rewards. Same behaviour as before where it selects text rather than move around the item.

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14437768> .

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14438949 .

lefnire commented 11 years ago

Roger that, I'll work on rewards today then

On Tuesday, March 5, 2013, Pandoro wrote:

@lefnire, no I can confirm this, sometimes I can drag and drop custom rewards, sometimes it will just select them. This seems to be related to the duplicate reward bug though.

On Tue, Mar 5, 2013 at 2:07 PM, Tyler Renelle <notifications@github.com<javascript:_e({}, 'cvml', 'notifications@github.com');>>wrote:

You can't move items, those aren't sortable. reward-rewards?

On Tuesday, March 5, 2013, horusofoz wrote:

If it helps, I'm not experiencing any shuffling issues or trouble reordering tasks, however I found I can move tasks around with out issue but still can't move rewards. Same behaviour as before where it selects text rather than move around the item.

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14437768> .

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14438949> .

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14439582 .

lunaire commented 11 years ago

Just a few extra info: I'm the one that opened this issue, and this issue is fixed for me. No more shuffling of tasks or rewards.

I am currently unable to move tasks/rewards manually on one of my computers(it only selects the text when I click & drag), but I think this is a separate issue.

On Tue, Mar 5, 2013 at 8:32 AM, Tyler Renelle notifications@github.comwrote:

Roger that, I'll work on rewards today then

On Tuesday, March 5, 2013, Pandoro wrote:

@lefnire, no I can confirm this, sometimes I can drag and drop custom rewards, sometimes it will just select them. This seems to be related to the duplicate reward bug though.

On Tue, Mar 5, 2013 at 2:07 PM, Tyler Renelle <notifications@github.com<javascript:_e({}, 'cvml', 'notifications@github.com');>>wrote:

You can't move items, those aren't sortable. reward-rewards?

On Tuesday, March 5, 2013, horusofoz wrote:

If it helps, I'm not experiencing any shuffling issues or trouble reordering tasks, however I found I can move tasks around with out issue but still can't move rewards. Same behaviour as before where it selects text rather than move around the item.

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14437768> .

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14438949> .

— Reply to this email directly or view it on GitHub< https://github.com/lefnire/habitrpg/issues/318#issuecomment-14439582> .

— Reply to this email directly or view it on GitHubhttps://github.com/lefnire/habitrpg/issues/318#issuecomment-14439928 .

BenMilford commented 11 years ago

Just to add to the mix, I've been able to order items without shuffling since yesterday.

derekantrican commented 11 years ago

While this is still open, I'd like to mention another bug. (It seemed better to post it here because this thread is mostly related and I didn't think it was necessary to open a new one. But if I should open a new thread, let me know).

Basically: I can't rearrange rewards.

lefnire commented 11 years ago

reward re-arrange should be fixed now (note you can't rearrange store items)

horusofoz commented 11 years ago

Confirmed now able to rearrange custom rewards

ericwilmoth commented 11 years ago

I've been back in the saddle for a few days now and everything seems to be staying sorted, so far as I can tell, it's fixed. Thanks!

lefnire commented 11 years ago

cross our fingers!

Pandoro commented 11 years ago

Hate to say it, but this just happened for me. Was refreshing as some of the stuff did not check correctly and after several refreshs, eventually everything got messed up :x

It is not so critical, as it is a side case, but I think it is still a problem ;x

lefnire commented 11 years ago

we're exploring moving away from refLists, I'll chime in here if that happens

SLaks commented 11 years ago

Note that I'm in the middle of some very heavy performance work on refLists (see https://github.com/SLaks/racer/commits/refList-perf), which affects the behavior of nested refLists and may help here.

I'd like to take a look at this issue and see if I can figure out what's going on here, but I won't have any time for that for at least a week or two.