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

Clear memory states during bulk action if item is None #3717

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

user1823
Copy link
Contributor

Prevents issues like https://forums.ankiweb.net/t/suggestion-copy-card-debug-info-button/54206/10 and #3634

If item is None, the previous code uses the card state to infer memory states, which leads to a vicious cycle that keeps changing the memory states at every reschedule if desired retention and historical retention are not the same.

@L-M-Sherlock, WDYT?

@user1823
Copy link
Contributor Author

user1823 commented Jan 11, 2025

I just noticed that the FSRS Helper add-on uses compute_memory_state for updating the memory states while Anki uses update_memory_state for bulk actions. So, my patch won't work when rescheduling cards using the add-on (by selecting cards in the browser and hitting Update memory states & reschedule). Any suggestions for that?

Basically, the goal is that the card should get memory state when item is None only during reviewing. In all other conditions, the memory state should not be calculated if item is None.

@L-M-Sherlock
Copy link
Contributor

Does the problem mentioned in https://forums.ankiweb.net/t/suggestion-copy-card-debug-info-button/54206/10 still exist after #3634? @Luc-Mcgrady, could you help me confirm it?

@Luc-Mcgrady
Copy link
Contributor

Luc-Mcgrady commented Jan 12, 2025

I'm not sure what fixed it, but it seems fixed now even on the main branch? Could have been fixed even earlier since I noticed revlogs don't update on reschedule.

Main branch + this branch:
image

Last release:
image

@user1823
Copy link
Contributor Author

What happens if you

  • use different values for desired retention and historical retention,
  • set the ignore cards reviewed before to a future date,
  • make a minor modification to the parameters,
  • enable Reschedule cards on change, and then
  • save the deck options?

With and without this change

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

Successfully merging this pull request may close these issues.

3 participants