* Enable nc: to only search in a specific field
* Add FieldSearchMode enum to replace boolean fields
* Avoid magic numbers in enum
* Use standard naming so Prost can remove redundant text
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Increase randomness in random sorting of new cards
Currently, the new cards appear roughly in the same order on consecutive days (if they are skipped by burying). This change aims to increase randomness by spreading out the salt across the hash space.
* Fix errors
* Make simulator fill missing values of DR and decay too
If a card has missing memory states, it will likely have missing DR and decay too. So, it makes sense to simultaneously update them as well.
* Fix error
* Avoid causing sync conflicts when filling in missing memory in sim
https://github.com/ankitects/anki/pull/4269#issuecomment-3201450124
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* 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>
* Feat/use current_retrievability_seconds in SQL
* replace `days_since_last_review` with `seconds_since_last_review`
* Update is_due_in_days logic to include original or current due date check
* backend part
* split memorised and cost
* slapdash frontend
* extract some simulator logic
* Add zoomed version of graph
* ./check
* Fix: Tooltip
* Fix: Simulator/workload transition
* remove "time"
* Update ts/routes/graphs/simulator.ts
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* Added: Mode toggle
* Disable Dr in workload mode
* keep button order consistant between modes
* dont clear points on mode swap
* add review count graph
* Revert "dont clear points on mode swap"
This reverts commit fc89efb1d9.
* "Help me pick" button
* unrelated title case change
* Add translation strings
* fix: missing translation string
* Fix: Layout shift
* Add: Experimental
* Fix Time / Memorized
* per day values
* set review limit to 9999 on open
* keep default at currently set value
* Do DR calculation in parallel (dae)
Approx 5x faster on my machine
---------
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Feat/per-deck desired retention
* Refactor desired retention logic in Collection implementation
Updated the logic for retrieving deck-specific desired retention in both `memory_state.rs` and `mod.rs` to handle cases where the deck's normal state may not be available. This change ensures that the default configuration is used when necessary, improving the robustness of the retention handling.
* Refactor desired retention handling in FsrsOptions.svelte
Updated the logic for effective desired retention to use the configuration default instead of the deck-specific value. This change improves consistency in the retention value used throughout the component, ensuring that the correct value is bound to the UI elements.
* refactor the logic for obtaining deck-specific desired retention by using method chaining
* support deck-specific desired retention when rescheduling
* Refactor desired retention logic to use a dedicated method for improved clarity and maintainability.
- include stdout/stderr when utf8_output() fails
- don't swallow the error returned by handle_Version_install_or_update
- skip codesigning when NODMG set
Closes#4224
* Fix/FSRS simulator fallback to memory_state_from_sm2 for after setting “Ignore cards reviewed before”
* add comment to fsrs_item_for_memory_state
* Add historical retention field to FSRS review request and update related logic
- Added `historical_retention` field to `SimulateFsrsReviewRequest` in `scheduler.proto`.
- Updated `simulator.rs` to use `req.historical_retention` instead of the removed `desired_retention`.
- Modified `FsrsOptions.svelte` to include `historicalRetention` in the options passed to the component.
* Update rslib/src/scheduler/fsrs/memory_state.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* Update rslib/src/scheduler/fsrs/simulator.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* pass ci
* Update rslib/src/scheduler/fsrs/simulator.rs
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
* format
* Update rslib/src/scheduler/fsrs/simulator.rs
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* format
* Fix condition in is_included_card function to check CardType instead of CardQueue
---------
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Only get_deck_config when load balancer is enabled
* Refactor load balancer card addition logic to use pre-fetched deckconfig_id
* Refactor get_scheduling_states to use context for deck configuration
* add deck name field to metadata protobuf msg
* fallback to creating new deck specified in `#deck:...`
* update tests
* create deck if it doesn't exist
* plumbing
* allow creating deck via `#deck:...`
* apply suggestion for protobuf
* Add `last_review_time` to card data
* cargo clippy
* Calculate days elapsed since last review time in add_extract_fsrs_relative_retrievability
* expose last_review_time to Card in Python
* Fix last_review_time assignment in Card class to use last_review_time_secs
* format
* Update last_review_time assignment to exclude filtered preview state in Card class
* Feat/Add legacy evaluate config bool
* Minor tweaks based on PR suggestions (dae)
New enabling command:
from anki.config import Config
mw.col.set_config_bool(Config.Bool.FSRS_LEGACY_EVALUATE, True)
- Launcher can now be accessed via Tools>Upgrade/Downgrade
- Anki closes automatically on update
- When launcher not available, show update link like in the past
- It appears that access to the modern console host requires an app
to be built with the windows console subsystem, so we introduce an
extra anki-console.exe binary to relaunch ourselves with. Solves
https://forums.ankiweb.net/t/new-online-installer-launcher/62745/50
- Windows now requires you to close the terminal like on a Mac,
as I couldn't figure out how to have it automatically close. Suggestions
welcome!
- Reduce the amount of duplicate/near-duplicate code in the various
platform files, and improve readability
- Add a helper to install the current code into the launcher env
- Fix cargo test failing to build on ARM64 Windows
Extracted repeated logic for clearing FSRS-related fields into a new Card::clear_fsrs_data() method. Updated set_deck and FSRS disabling code paths to use this method for improved code reuse and maintainability.
* Document the purpose of storing dr and decay in card
* Format
* Fix type mismatch errors
* Update memory_state.rs
* Save dr and decay in card even if item is None
* Format
* Fix mismatched types
* Update memory_state.rs