Anki is a smart spaced repetition flashcard program
Find a file
Jarrett Ye 62e01fe03a
Fix Cards with Missing Last Review Time During Database Check (#4237)
* Fix Cards with Missing Last Review Time During Database Check

* clippy

* Apply suggestions from code review

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Add is_reset method to RevlogEntry and update scheduling logic

This commit introduces the `is_reset` method to the `RevlogEntry` struct, which identifies entries representing reset operations. Additionally, the scheduling logic in `memory_state.rs` and `params.rs` has been updated to utilize this new method, ensuring that reset entries are handled correctly during review scheduling.

* Implement is_cramming method in RevlogEntry and update scheduling logic

This commit adds the `is_cramming` method to the `RevlogEntry` struct, which identifies entries representing cramming operations. The scheduling logic in `params.rs` has been updated to utilize this new method, improving the clarity and maintainability of the code.

* Refactor rating logic in RevlogEntry and update related scheduling functions

This commit introduces a new `has_rating` method in the `RevlogEntry` struct to encapsulate the logic for checking if an entry has a rating. The scheduling logic in `params.rs` and the calculation of normal answer counts in `card.rs` have been updated to use this new method, enhancing code clarity and maintainability.

* update revlog test helper function to assign button_chosen correctly

* Refactor card property fixing logic to use CardFixStats struct

* Add one-way sync trigger for last review time updates in dbcheck

* Update documentation for is_reset method in RevlogEntry to clarify ease_factor condition

* Apply suggestions from code review

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>

* Minor wording tweak

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-08-06 19:49:30 +10:00
.buildkite Auto-expand bundle progress in Buildkite on Linux 2025-01-26 19:37:34 +11:00
.cargo Statically link MSVC runtime, removing the need to install the redistributable (#4166) 2025-07-05 15:03:14 +03:00
.config Drop workspace-hack in favor of workspace deps 2023-06-23 17:41:31 +10:00
.cursor/rules Make URL schemes dialog more ergonomic (#4002) 2025-05-15 16:17:33 +10:00
.github/ISSUE_TEMPLATE Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.vscode.dist Switch to Ruff (#4119) 2025-06-29 14:38:35 +07:00
build Exclude VIRTUAL_ENV from environ as well 2025-07-15 17:03:51 +07:00
cargo Feat/expected_workload_with_existing_cards implementation (#4243) 2025-08-06 18:01:06 +10:00
docs Switch to Ruff (#4119) 2025-06-29 14:38:35 +07:00
ftl Fix Cards with Missing Last Review Time During Database Check (#4237) 2025-08-06 19:49:30 +10:00
proto Fix/use real step count to simulate (#4240) 2025-08-04 16:01:26 +10:00
pylib Fix show_exception's messagebox always formatting as plaintext (#4246) 2025-08-06 19:07:32 +10:00
python Switch to Ruff (#4119) 2025-06-29 14:38:35 +07:00
qt Fix show_exception's messagebox always formatting as plaintext (#4246) 2025-08-06 19:07:32 +10:00
rslib Fix Cards with Missing Last Review Time During Database Check (#4237) 2025-08-06 19:49:30 +10:00
tools Update to Qt 6.9.1 2025-07-08 01:14:40 +07:00
ts Limit time studied today to minutes (#4242) 2025-08-06 19:30:44 +10:00
.deny.toml Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
.dockerignore Add distroless Dockerfile and implement internal health check (#3366) 2024-08-29 17:05:33 +07:00
.dprint.json Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
.eslintrc.cjs Include error message text on page 2024-06-24 15:35:47 +07:00
.gitattributes try again to improve GitHub's language stats 2021-01-20 13:20:45 +10:00
.gitignore Support hidden local Claude config 2025-06-29 22:16:59 +07:00
.gitmodules Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
.mypy.ini Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
.prettierrc Switch back to Prettier for Svelte formatting 2025-01-13 15:53:55 +11:00
.python-version Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
.ruff.toml Switch to Ruff (#4119) 2025-06-29 14:38:35 +07:00
.rustfmt-empty.toml Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
.rustfmt.toml Move ascii_percent_encoding into a separate repo 2023-04-12 08:45:23 +10:00
.version Bump version 2025-07-28 21:54:44 +10:00
.yarnrc.yml Yarn 4 (#3772) 2025-01-26 14:40:17 +11:00
Cargo.lock Feat/expected_workload_with_existing_cards implementation (#4243) 2025-08-06 18:01:06 +10:00
Cargo.toml Feat/expected_workload_with_existing_cards implementation (#4243) 2025-08-06 18:01:06 +10:00
check Add a shortcut to auto-format before running checks 2023-07-02 09:59:05 +10:00
CLAUDE.md Support hidden local Claude config 2025-06-29 22:16:59 +07:00
CONTRIBUTORS Statistics "Reviews" graph, make the color of "New" and "Learning" cards consistent with the color of card count (#4245) 2025-08-06 18:07:10 +10:00
LICENSE Drop Pauker and SuperMemo importers from legacy importer 2025-06-27 16:10:12 +07:00
ninja Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
package.json Update svelte/vite/esbuild for CWEs 2025-07-01 18:01:48 +07:00
pkgkey.asc add public key for release signing 2018-09-18 10:40:45 +10:00
pyproject.toml Switch to Ruff (#4119) 2025-06-29 14:38:35 +07:00
README.md Add a trademark symbol to the readme and about screens 2025-07-01 11:40:03 +07:00
run Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
run.bat Migrate build system to uv (#4074) 2025-06-19 14:03:16 +07:00
rust-toolchain.toml Update to Rust 1.88 2025-06-29 11:50:49 +07:00
SECURITY.md add SECURITY.md 2021-09-22 22:55:19 +10:00
uv.lock Tweak protobuf requirements 2025-07-16 14:15:25 +07:00
yarn Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
yarn.bat Switch to SvelteKit (#3077) 2024-03-31 09:16:31 +01:00
yarn.lock Bump form-data from 4.0.1 to 4.0.4 (#4219) 2025-07-24 18:51:12 +07:00

Anki®

Build status

This repo contains the source code for the computer version of Anki.

About

Anki is a spaced repetition program. Please see the website to learn more.

Getting Started

Anki Betas

If you'd like to try development builds of Anki but don't feel comfortable building the code, please see Anki betas

Developing

For more information on building and developing, please see Development.

Contributing

Want to contribute to Anki? Check out the Contribution Guidelines.

Anki Contributors

CONTRIBUTORS

License

Anki's license: LICENSE