* Feat/FSRS-6
* update comment
* add decay to Card
* ./ninja fix:minilints
* pass check
* fix NaN in evaluation
* remove console
* decay should fallback to 0.5 when it's None.
* Update SimulatorModal.svelte
* Update a few comments
* Update FSRS decay defaults to use constants for better maintainability and clarity
* Update rslib/src/storage/card/data.rs
* NF: replace `disabled` by `enabled`
This allows to remove the negations and, in my opinion, make the code
easier to understand and edit.
* Cloze button get disabled outside of cloze field
More specifically, if the user focus in a field that is not a cloze
field, the button are still there but appear as disabled. The shortcut
instead of adding the cloze context shows an alert explaining why this
can't be done.
While this message is already displayed when the user tries to add a
note with cloze in non-cloze field, I suspect it will save time to
stop the user as soon as possible from making mistake. This should
make very clear what is authorized and what is not.
It'll also be a reminder of whether the current field is a cloze or
not.
In order to do this, I added a back-end method (that I expect we may
reuse in ankidroid) to get the index of the fields used in cloze. This
set is sent to the note editor, which propagates it where needed.
In mathjax, the cloze symbol is removed when the selected field is not
a cloze field.
* modify render_card to return whether card was empty
* plumbing
* add flag to proto message
* plumbing: pass flag along to PartiallyRenderedCard
* add tests
* Use a custom return type for clarity (dae)
* Feat/grade now
* pass ci
* fix from_queue
* Refactor card answering to support from_queue flag
- Add `from_queue` field to `CardAnswer` struct and proto message
- Modify `answer_card_inner` to handle queue updates based on `from_queue`
- Remove `grade_card` method and consolidate card answering logic
- Update related test cases to set `from_queue` flag
* fix current_changes() called when no op set
* Optimize queue updates for batch card processing
- Refactor `grade_now` to collect processed card IDs first
- Add new `update_queues_for_processed_cards` method for efficient batch queue updates
- Improve queue management by removing entries and updating counts in a single pass
- Remove individual queue update method in favor of batch processing
* pass ci
* keep the same style
* remove ineffective code
* remove unused imports
* Added: Leech suspend to simulator
* Added: leech threshold spin box
* Update git rev
* Added: Save to preset options
* ./check
* Added: "Advanced settings" dropdown
* Removed: Indent
* Added: Easy days
* Added: Sticky header
* Removed: Easy Day updating without saving
* un-nest disclosure
* bump fsrs
* Update a VSCode setting to match recent releases
* Move Easy Days above the Advanced settings
I think it's a bit more logical to have Advanced come last.
* Ensure graph fits inside screen height
* Bump fsrs version
* Feat/support load balance and easy days in FSRS simulator
* format
* consider LoadBalancerEnabled
* use fsrs::PostSchedulingFn
* add load balance and easy days to compute_optimal_retention
* move simulator to a pop-over
* fix incorrect simulationNumber when error 500
* Feat: Save to Preset Options
* update tabs when update newPerDay & reviewsPerDay
* don't reset deckSize & daysToSimulate when save options
* fix missing easy days
* plan to support review priority
* Fix graph line rendering with non-scaling stroke
* simplify review priority function with helper wrapper
* fallback to default ReviewPriority for Added & ReverseAdded
* Update ts/routes/deck-options/SimulatorModal.svelte
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Wrap review priority function in Arc for thread-safe sharing
* more granularity for R sorting
* Add graph smoothing option to FSRS simulator
* Improve graph resize handling in FSRS simulator
* simplify review priority calculation
* Add review order selection to FSRS simulator modal
* Refactor review priority function using macro for conciseness
* Add copyright and license header to SimulatorModal.svelte
* cargo clippy
* ./ninja fix:eslint
* update fsrs-rs
* Update FSRS dependencies and refactor load balancing functions
- Update fsrs-rs dependency to latest commit
- Modify retention and simulator modules to use Arc instead of Box
- Update function signatures and imports in simulator module
- Simplify review card order handling with direct enum usage
* resolve reviewed changes
* replace .unwrap() with ?
* move simulating into SimulatorModal
* add (crate) to interval_to_weekday
* Update FsrsOptions.svelte
* format
---------
Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
* Fix/re-optimize FSRS if short-term param is weird
* Reset progress when another run is required (dae)
* only count the same-day steps
* Fix flicker when optimizing again (dae)
* Feat/support new cards ignore review limit in simulator
* ./ninja fix:minilints & ./ninja format
* use published crate
* make newCardsIgnoreReviewLimit reactive
* format
---------
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* NF: Modify CONTRIBUTORS
Just so that I stop getting the warning
* NF: Create `deckOptionsReady`
* NF: rename _close to require_close
The method will have to be used outside of this class, so can't be private
* NF: simplify slightly some code
* NF: remove bridge command from deck options
* Remove unused import
* Remove superfluous comment with a typo
* Add gradient color for forgetting curve
* Add desiredRetention prop for CardInfo
* update CONTRIBUTORS
* Formatting
* Tweak range of gradient
* Tweak: salmon -> tomato
* Get desired retention of the card from backend
* Add a reference line for desired retention
* Fix: Corrected the steel blue's height & Hide desired retention line when yMin is higher than desiredRetentionY
* Add y axis title
* Show desired retention in the tooltip
* I18n: improve translation and vertical text display
* Revert rotatation&writing-mode of vertical title
* Tweak font-size of y axis title
* Fix: delete old desired retention line when changing duration
* Update ftl/core/card-stats.ftl
---------
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
* Update to FSRS-rs v1.3.2
* add fsrs_short_term_with_steps_enabled to config
* ./ninja fix:minilints
* fix defaults_for_testing
* if current parameters are invalid, skip comparison
fix#3498
* fix redundant_field_names
* cargo clippy --fix
* Update to FSRS-rs v1.3.3
* Update to FSRS-rs v1.3.4
* Avoid an extra config lookup on each card answer (dae)
* Feat/export dataset for research
* add comment
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
* target_path is required
* format
* improve efficiency to look up parent_id
* move `use` down
* add get_revlogs API
* fix tooltipText of ReviewsGraph
the style of true-retention shouldn't affect the style of tooltipText of ReviewsGraph
* More verbose wording (dae)
* Feat/Easy Days
* format
* add easy_days_percentages to deck_config
* configure Easy Days via table
* remove unused code
* add translatable strings & add default of easy days
* don't check easy_days_percentages when deserialize
* pass test::all_reserved_fields_are_removed
* consider next_day_at when interval_to_weekday
* remove y-axis-title created in last simulation
* EstimatedTotalKnowledge should be integer
* Reorder deck option sections (dae)
- Move FSRS to bottom left, to move it closer to the top, and so
the left and right columns appear roughly balanced when FSRS is
enabled.
- Move Easy Days above Advanced
* Don't crash if wrong number of days (dae)
* Use lower field number (dae)
Repeated fields are more compactly stored in the first 15 fields.
* typeanswer: fix cleanup
Fix: Add prepare_expected back in for the 'nothing typed' & 'correctly typed' cases. This also makes expected_original redundant again.
Style: %s/provided/typed/g
Style: rename one ch → c
Testcase: whitespace_is_trimmed: added a check for the "correctly typed" path and renamed it to tags_removed (there's no whitespace?)
Testcase: empty_input_shows_as_code: changed to also check that tags get trimmed
* [type:nc] – ignores combining characters
Adds a comparison variant to [type] which ignores when combining characters of the expected field are missing from the provided input. It still shows these characters in the 'expected' line for reference.
It's useful for languages with e.g. diacritics that are required for reference (such as in dictionaries), but rarely actually learned or used in everyday writing. Among these languages: Arabic, Hebrew, Persian, Urdu.
The bool 'combining' controls it as new final parameter of both relevant compare_answer functions. On the Python side, it's set to true by default.
Use on the note templates: [type:nc:field] (only the front needs to include :nc)
This also removes the need to have both variants of words/sentences present as separate fields, to show them redundantly, etc.
* typeanswer: simplify by using nfkd throughout
Requires adjusting two testcases, but both render exactly the same in Anki itself.
On NFC vs. NKFD: https://stackoverflow.com/a/77432079
* typeanswer: 'simplify' by removing normalize_typed (requiring a bool parameter)
I'd prefer to keep this extra method.
* typeanswer: micro-optimize vectors
Should get rid of most relocations, at the expense of over-allocating.
On Vec's (String's) behavior: https://stackoverflow.com/a/72787776
* Mark `combining` as private
typeCorrect is not marked as private either, but we can at least do
the right thing for newly-added code.
* Revert "typeanswer: micro-optimize vectors"
This reverts commit 9fbacbfd19.
* Revert "typeanswer: 'simplify' by removing normalize_typed (requiring a bool parameter)"
This reverts commit df2dd3394e.
* Empty cards is undoable
If there was a reason for this operation not to be undoable, I can't easily guess it. My main hyposhesis was that the number of deleted card may be too big. But I realized that deleting a deck is undoable and may delete as many note.
As you may know, I realized that only the undoable operations triggered notification in AnkiDroid that we may have to update the UI. And while I just wanted to trigger more notifications, some reviewers thought it would be nicer if the operation were returning a OpChanges. So here it's done. If you would please consider merging it.
I decided to introduce a new string because the closest strings I could find currently are "Empty cards..." and the trailing commas don't seem nice in "undo". And the title, which we may not be able to reuse in all language
* Don't count cards that have already been removed (dae)
* start of load balancer
* add configuration options; option to load balance per deck
* formatting
* clippy
* add myself to contributors
* cleanup
* cargo fmt
* copyright header on load_balancer.rs
* remove extra space
* more formatting
* python formatting
* ignore this being None
only doing this cause python has awful lambdas and can't
loop in a meaningful way without doing this
* only calculate notes on each day if we are trying to avoid siblings
* don't fuzz intervals if the load balancer is enabled
* force generator to eval so this actually happens
* load balance instead of fuzzing, rather than in addition to
* use builtin fuzz_bounds rather than reinvent something new
* print some debug info on how its load balancing
* clippy
* more accurately load balance only when we want to fuzz
* incorrectly doublechecking the presence of the load balancer
* more printfs for debugging
* avoid siblings -> disperse siblings
* load balance learning graduating intervals
* load balancer: respect min/max intervals; graduating easy should be at least +1 good
* filter out after-days under minimum interval
* this is an inclusive check
* switch load balancer to caching instead of on the fly calculation
* handle case where load balancer would balance outside of its bounds
* disable lb when unselecting it in preferences
* call load_balancer in StateContext::with_review_fuzz instead of next to
* rebuild load balancer when card queue is rebuilt
* remove now-unused configuration options
* add note option to notetype to enable/disable sibling dispersion
* add options to exclude decks from load balancing
* theres a lint checking that the link actually exists so I guess I'll add the anchor back in later?
* how did I even update this
* move load balancer to cardqueue
* remove per-deck balancing options
* improve determining whether to disperse siblings when load balancing
* don't recalculate notes on days every time
* remove debug code
* remove all configuration; load balancer enabled by default; disperse siblings if bury_reviews is set
* didn't fully remove caring about decks from load balancer sql query
* load balancer should only count cards in the same preset
* fuzz interval if its outside of load balancer's range
* also check minimum when bailing out of load balancer
* cleanup; make tests happy
* experimental weight-based load balance fuzzing
* take into account interval when weighting as it seems to help
* if theres no cards the interval weight is just 1.0
* make load balancer disableable through debug console
* remove debug prints
* typo
* remove debugging print
* explain a bit how load balancer works
* properly balance per preset
* use inclusive range rather than +1
* -1 type cast
* move type hint somewhere less ugly; fix comment typo
* Reuse existing deck list from parent function (dae)
Minor optimisation
* Add AnkiHub section to preferences screen
* Add short intro for AnkiWeb and AnkiHub to syncing section
* Add AnkiHub login screen
* Implement login methods in backend
* Set minimum dialog width
* Add missing colon
* Respect the ANKIHUB_APP_URL env var
This is used by the add-on.
* Simplify login error reporting
* Fix from_prefs_screen not passed to subcall
* Add missing ankihub_pb2 import
* Install AnkiHub add-on after sign-in
* Avoid .exec()
* Update ftl/core/sync.ftl
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
* Split translation string
* Support login by username/email
* Fix entered username/email not being passed back to on_done
* Remove unused import
* Move to 'Third-party services' section
* Tweak login dialog's heading
* Remove 'third-party' from intro text
* Tweak copy
* Prefix profile keys
* Tweak strings
* Remove description from login dialog
* Remove signup links
* Clear credentials in ankihub_logout()
* Call .adjustSize()
* Title Case
* Add padding to third-party services, and fix tab order from other PR
* Feat/FSRS-5
* adapt the SimulatorConfig of FSRS-5
* update parameters from FSRS-4.5
* udpate to FSRS-rs v1.1.0
* ./ninja fix:minilints
* pass ci
* update cargo-deny to 0.14.24
* udpate to FSRS-rs v1.1.1
* update to fsrs-rs v1.1.2
* Add a preference to toggle LaTeX generation
* Fix test
* Remove LaTeX security restrictions
* Show existing LaTeX images regardless of preference
* Lift config check out of loop (dae)
* Shift option to review settings; display warning when disabled (dae)
* Feature Question Action Show Reminder (#3064)
Added a option in the deck config that allow the user to choose in
Autoupdate mode between showing a reminder or revealing the card.
Also added my name to the contributors
* Update ftl/core/deck-config.ftl