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

[BUG]: Start of Next Day Not Working #15553

Open
4 tasks done
brishtibheja opened this issue Feb 17, 2024 · 16 comments · May be fixed by #16528
Open
4 tasks done

[BUG]: Start of Next Day Not Working #15553

brishtibheja opened this issue Feb 17, 2024 · 16 comments · May be fixed by #16528
Labels
Bug Help Wanted Requesting Pull Requests from volunteers Needs Triage
Milestone

Comments

@brishtibheja
Copy link

brishtibheja commented Feb 17, 2024

Checked for duplicates?

  • This issue is not a duplicate

What are the steps to reproduce this bug?

  1. Wait until the day change
  2. After the day has changed, go to Settings>>Reviewing>>Start of Next Day
  3. Move the slider such as next day's cards get postponed

Expected behaviour

Undo and New Card Limit should work normally. Number of new cards displayed in the deck should decrease as the cards move to learning phase.

Actual behaviour

Undo doesn't work for reviews. I have tried undoing deck change and that works fine. I am moved to the previous deck. But undoing previous reviews do not work.

New card limit doesn't work properly. I could go past the limit.

Number of new cards displayed in the deck doesn't decrease.

Debug info

AnkiDroid Version = 2.17beta2 (2412d48c21a51aa13774618c051adbffec5f3d66)

Backend Version = 0.1.34-anki23.12.1 (23.12.1 1a1d4d5419c6b57ef3baf99c9d2d9cf85d36ae0a)

Android Version = 13 (SDK 33)

ProductFlavor = full

Manufacturer = Xiaomi

Model = 23076RN4BI

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 13; 23076RN4BI Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.164 Mobile Safari/537.36

ACRA UUID = dce906d5-19f7-4514-a0e4-0071f4f7b489

Crash Reports Enabled = true

(Optional) Anything else you want to share?

No response

Research

  • I am reporting a bug specific to AnkiDroid (Android app)
  • I have checked the manual and the FAQ and could not find a solution to my issue
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
@david-allison
Copy link
Member

How does this differ from Anki Desktop?

@david-allison david-allison added this to the 2.18 release milestone Feb 17, 2024
@brishtibheja
Copy link
Author

I do not use Anki Desktop but I'd expect undo option and new card limit working fine. Instead I get a snackbar saying that it cannot go back (in Japanese).

@brishtibheja
Copy link
Author

It seems the new cards that I did yesterday also counted towards the new card limit of today so I did not got any new cards for today.

@david-allison Is this a back-end issue and I should've actually submitted the issue there?

@david-allison
Copy link
Member

If it's also an issue with Anki Desktop, could you submit the issue on the forums and close this.

We'll get the change once it's resolved upstream

@brishtibheja
Copy link
Author

That is the issue. I don't have a desktop. How would I check?

@david-allison david-allison added the Help Wanted Requesting Pull Requests from volunteers label Feb 18, 2024
@david-allison
Copy link
Member

Oh, I'll leave this open to someone checking this.

I suspect it's our bug

@briankrznarich
Copy link

briankrznarich commented Feb 18, 2024

Just encountered this exact issue myself by total coincidence. I don't think I can reproduce this with my "live" deck until I approach the "next day" cutoff again, where rewinding will activate cards. I'll try to reproduce on the Desktop and report back.

In an attempt to psychologically manipulate myself, I decided to try shifting my "next day" cutoff from 3am to 6pm (18:00). A few days later, I backed it from 6pm to 2pm. I did this shift at 3pm, immediately making my reviews for the upcoming day available. After reviewing for ~50 cards or so, I noticed the "undo/back" button was disabled. I carried on for a while like this, then eventually decided to exit Anki via the task manager to see if that would fix it.

Restarting did fix the "undo" button. but as a side effect I think it also reset my "new card" counter back to the new-cards-per-day value, forgetting about the cards I had done before restarting(the reviews still happened, of course). "Remaining new card count" has always been fragile for me in ankidroid. On crash/kill, everything always comes back, except this(sometimes). I get the feeling it is kept in memory and not often written to the DB, maybe to save a few write cycles? Hmmm... I usually back out to the Deck List, which seems to avoid the issue, but I thought I did that today as well, and still got the new-card reset...

Also of note: when I first moved the cutoff from about 3am to 8pm (20:00), making ~500 due cards no-longer-due, there was a discrepancy between the Deck List and the card-review module. The Deck List correctly reflected only a handful of "again" cards. But when I opened the deck to complete the "again" cards, all 500 of my "due today" cards were still there.

Restarting Anki (via task manager) resolved this. This seemed like such a corner-case that I wasn't going to bother reporting it, but then I saw this issue was already. Maybe this should have its own ticket.

@brishtibheja
Copy link
Author

Well, even I did not expect anyone else to be playing around with that feature. I was just trying to complete my day's due cards and before it was already very late, I decided to move back the start of next day. That's when I encountered the problem. Maybe there are more people encountering this than we expect. Anyways, Do report back on what you encounter in Desktop.

@briankrznarich
Copy link

briankrznarich commented Feb 19, 2024

Since you mention it, I have also done exactly what you describe a bunch of times. "Oh no, I'm not going to finish my cards 'today' and I can't bear to see my 100 cards go to 600 cards before bed. I'll just shift the date cutoff temporarily and get this done, and I'll reset the next-day-cutoff tomorrow."

I too wonder how many other people do this. Maybe a custom study option "Push 'tomorrow' ahead by X hours for 1 day". Although that could encourage some pretty unhealthy sleeping behavior...

Shifting the date cutoff does mess with the statistics, unfortunately. For that reason I have also rolled back the clock on my phone to keep the reviews in the "correct" date window. In some circumstances this can break Ankiweb synchronization and force you to resync your decks, so I have stopped doing this ; ) Sometimes it works, sometimes not, I haven't tried to figure out the trigger, but obviously timestamps are part of the synchronization logic so it makes sense. I don't consider this a bug. A middle-ground is to fiddle with your phone's time zone, which does seem to work I think, though the statistics also get thrown off.

Anyway, will check in again when I have tested on desktop.

@brishtibheja
Copy link
Author

I am actually sleeping after 6 am for a few days😂
I need to finish my backlog of 400 Kanji writing cards.

@briankrznarich
Copy link

briankrznarich commented Feb 19, 2024

Confirmed, not Desktop related. Two issues pointed out here are AnkiDroid specific:

  1. When rolling the next-day cutoff backwards, "back/undo" is disabled. Not present in Anki Desktop. (^Z / edit->undo work as expected)
  2. When pushing the next-day cutoff into the future, the counts on the "Deck List" page update to remove no-longer-scheduled cards, but if you return to doing reviews, those cards are all still present. (This might require you to have been already doing reviews since launching AnkiDroid, before fiddling with the cutoff, so that something is cached in memory). Not present in Anki Desktop, card counts update as expected immediately everywhere.

Restarting Ankidroid (via taskmanager kill) fixes both issues.

Speculating, I'd guess the issues are all related to the card-review module not getting some kind of "discard/hard reset" when the date-cutoff is changed. Something is cached in memory, and it is not interacting well with the effects of the date-cutoff change.

I think I usually edit system settings while on the Deck List page, though I see you can edit them while actively reviewing cards, which might make "hard reset" more tricky. I don't personally have an issue with AnkiDroid kicking you back to the Deck List page if you choose to edit the date cutoff while actively doing reviews. That might make a fix simpler, if not as elegant.

As for Anki Desktop, it cleanly updates the card-counts in-place if you edit the date-cutoff while doing reviews. There is no screen flicker or obvious re-rendering, only the card counts at the bottom of the page change. Anki Desktop's "undo preferences" works flawlessly to undo next-day changes in-place. (But it effectively makes it impossible to undo card reviews once you have changed preferences, since there is only 1 "undo" option available at a time. Maybe not ideal : ).

With regard to "new card" tracking, Anki Desktop appears to unconditionally reset the new-card count any time the date cutoff is changed in either direction. I'd consider this an upstream bug. When putting the cutoff in the past, you have effectively started a "new" day, so it makes sense. But when moving the cutoff into the future after a day of reviews (as @brishtibheja would be doing), there is no logical rationale for resetting the count. You haven't changed days. In fact, this is the worst possible time to queue up a bunch of additional reviews. Whenever I get "surprise" new-card reviews from Ankidroid for reasons like this, I generally work around it by setting the new card count to zero for the day. As I'm probably trying to get to sleep, abandoning a few "new" cards isn't the biggest loss at that point.

@brishtibheja 頑張れ

@briankrznarich
Copy link

briankrznarich commented Feb 19, 2024

This ticket is probably a dup of a closed ticket:

Perhaps already fixed? I think I literally just got an AnkiDroid update this morning, haven't double-checked that.

@brishtibheja
Copy link
Author

I remember seeing this last year. I will have to confirm if the issue with moving start of next day into the future also gets solved.

@briankrznarich
Copy link

I could not reproduce the disabled-undo button. Possibly that single issue was fixed. however everything else I said still holds.

@david-allison do you want me to create a separate ticket for the issue I've identified in here? (number 2 above). I believe this is with the latest update from this morning. Issue It is:

  1. With a rollover of 8pm, finish all cards for the day.
  2. On the Deck Summary screen, at 2pm, with all cards finished, set the rollover to noon. (i.e. "the past")
  3. On the Deck Screen, newly due cards appear (~500 for me)
  4. Tap the deck to start reviewing
  5. You get the "All Cards Are Completed for today" screen, and get bumped back to the Deck Browser. No way to actually review cards. (The card-review module is apparently oblivious to the new-day change).
  6. Must restart AnkiDroid to continue reviews. (Restarting resolves the issue).

I believe I got a similar thing in reverse. Have 500 cards due, with ~5 "again" cards from marking "again" during some reviews. Move the "next day" forward in time. Deck Summary removes the 500 scheduled cards, leaving only the 5 "again" cards as "due". (I think Anki Desktop does it this way too). Tap the deck with 5 "again" cards, card browser opens, 505 cards all still present and due. Again, card-review module apparently oblivious to the setting change. Restarting AnkiDroid resolves.

No similar issues on Anki Desktop. As an aside, I am pretty sure the core Anki design was not written with the idea that people would fiddle with the new-day cutoff to manipulate card scheduling on a regular basis. I know it's supposed to be set-it-for-while-you-are-asleep-and-forget-at : ) But it's a setting that has to be there, and a certain class of users are going to use/abuse it this way (I am included in this group...).

powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past fixed by forcing the backend to reload the deck
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past fixed by forcing the backend to reload the deck
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past
Fixed by forcing the backend to reload the deck
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past
Fixed by forcing the backend to reload the deck
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past
Fixed by forcing the backend to reload the deck
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past
Fixed by forcing the backend to reload the deck
powy-e added a commit to powy-e/Anki-Android that referenced this issue Apr 5, 2024
Start of Next Day wasn't working when changing to the past
Fixed by forcing the backend to reload the deck
@Yuri-K7
Copy link

Yuri-K7 commented Apr 13, 2024

Encountering the issue with 2.17.6, undo button is grayed out after changing "Start of the day", restarting the app fix it though.

@brishtibheja
Copy link
Author

@briankrznarich I was just having a discussion with Expertium, one of the FSRS devs in general of the Anki discord server. Apparently, too much travelling or playing around with this feature can mess up with FSRS. Thought I will warn you. But yes we're not sure how much it will affect FSRS (probabaly not too much in his opinion) but I'll rather not do it when I can. I completed my backlog so I don't need to jump around between days lol.

@mikehardy mikehardy removed this from the 2.18 release milestone May 13, 2024
@mikehardy mikehardy added this to the 2.19 release milestone May 13, 2024
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
@powy-e powy-e linked a pull request Jun 2, 2024 that will close this issue
5 tasks
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 2, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
powy-e added a commit to powy-e/Anki-Android that referenced this issue Jun 7, 2024
Start of Next Day wasn't working when changing to the past
Fixed by using setPreferences instead of config.set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Help Wanted Requesting Pull Requests from volunteers Needs Triage
Projects
None yet
5 participants