Commit graph

2082 commits

Author SHA1 Message Date
OuOu2021
cee04bf20c
Apply gradient effect to forgetting curve (#3604)
* 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>
2024-12-09 17:44:05 +11:00
Jarrett Ye
6874440cda Fix/incorrect memory state inference for incomplete review history (#3599)
make ci happy
2024-11-26 21:57:09 +10:00
Jarrett Ye
9a013d8601
Fix/FSRS progress sometime shows 0 reviews (#3591)
* Fix/FSRS progress sometime shows 0 reviews

* wait for progress_thread

* set 200ms timeout
2024-11-24 20:52:12 +10:00
Damien Elmes
01c368654b Remove remaining remnants of unused error; fix CI 2024-11-19 15:26:02 +10:00
Jarrett Ye
e992d6d462
Fix/inconsistent retrievability calculations between normal/filtered decks and display/sorting (#3582) 2024-11-18 01:24:04 +10:00
user1823
db1280e6ae
Exclude new cards from Future Due stats (#3576)
* Exclude new cards from Future Due stats

https://github.com/ankitects/anki/pull/3530#issuecomment-2439924619

Before 7ea573b004, they were excluded anyway.

* Update future_due.rs

* Update comment

* Minor simplification
2024-11-18 01:19:27 +10:00
RumovZ
b933796a51
Fix setting tags column to first unmapped column (#3568)
Closes #3561.
2024-11-18 00:39:13 +10:00
Abdo
03c50c8332
Do not show warning if Browser Appearance has no field references (#3566) 2024-11-18 00:38:21 +10:00
sorata
d3f2f45805
update links (#3562) 2024-11-18 00:37:21 +10:00
user1823
15b48cf894
Correct a comment (#3570)
Because of the `entry.button_chosen == 0` part, it also filters out reschedule entries. Frankly, we don't need the `(entry.review_kind == RevlogReviewKind::Rescheduled)` part, but I didn't remove it yet.

Co-authored-by: Abdo <abdo@abdnh.net>
2024-11-17 13:08:01 +03:00
Abdo
748aa0f07a
Bump AnkiHub API version (#3564) 2024-11-09 04:05:26 +03:00
Damien Elmes
ba1f5f46c6 Flag server messages so AnkiDroid can handle them separately 2024-11-08 22:54:15 +10:00
Damien Elmes
b646f09c68
Add descending retrievability (#3559)
* "relative overdueness" -> "retrievability ascending"

* Add 'retrievability descending'
2024-11-08 22:53:13 +10:00
Damien Elmes
1f96489755 Fix invalid preset search matching cards in filtered decks
https://forums.ankiweb.net/t/anki-24-10-release-candidate/51191/64
2024-11-07 16:52:50 +10:00
Jake Probst
487b38b06c
include backlog cards in today in future due graph (#3379)
* include backlog cards in today in future due graph

when backlog option is not checked

* Don't add the backlog to today when backlog disabled

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2024-11-07 09:06:07 +10:00
Abdo
7629a1b76f
Fix flaky tests (#3541)
* Fix flaky state_application() test

* Try to fix flaky unicode_normalization() test
2024-11-05 18:23:50 +10:00
Jarrett Ye
0ce907fe5b
Fix/buried new cards shouldn't be counted in daily load (#3530)
* Fix/buried new cards shouldn't be counted in daily load

* exclude new cards by its type

* ./ninja format
2024-10-28 14:10:10 +10:00
Damien Elmes
1fb4430913 Fix due date showing incorrectly in filtered deck
Regressed in #3471

Closes #3515
2024-10-26 20:13:24 +10:00
a.r
0513940305
template_filters: make {{type:}} forwards compatible (#3525)
Make Anki treat {{type:unknown:field}} field replacements as {{type:field}} instead of {{field}}.

The previous behavior was seriously inconvenient for several reasons, including:

* Updated client aren't all released at the same time, causing an unavoidable mismatch period. Now it causes the least friction.
* Devs couldn't readily test new in-dev variants without breaking/inconveniencing their own mobile experience.
* Some users will have (potentially perpetually) outdated Anki clients and likely complain, wasting both dev & deck creator time.

This way users always get to type and especially: The front side will always render as intended.
2024-10-26 19:58:52 +10:00
Jarrett Ye
9a44881121
export revlogs where the rating is between 1 and 4 for research (#3524) 2024-10-26 19:38:17 +10:00
Jarrett Ye
5caeac530e
Update to FSRS-rs v1.3.5 (FSRS-5 model update) && keep three decimals for stability (#3520)
* Update to FSRS-rs v1.3.5 (FSRS-5 model update)

* keep three decimals for stability

fix https://forums.ankiweb.net/t/fsrs-5-1d-scheduling-and-learning-steps/50242/122?u=l.m.sherlock
2024-10-26 19:36:27 +10:00
Jarrett Ye
939cc5a268
Fix/skip suspended cards in graphs context retrievability (#3518)
* skip suspended cards in GraphsContext retrievability

* avoid i32 overflow

* avoid u32 overflow
2024-10-26 19:09:20 +10:00
user1823
7500beaba3
Fix calculation of daily load (#3516)
* Fix calculation of daily load

* Daily load in reviews/day
2024-10-26 19:05:01 +10:00
Damien Elmes
6adbd922f7 Rename remaining 'weights' references to 'params' 2024-10-21 18:13:23 +10:00
Damien Elmes
c45fa518d2 Use separate field to store FSRS params
Will allow the user to keep using old params with older clients
2024-10-21 18:13:23 +10:00
Jarrett Ye
26ae51fafd
Create a new kind of revlog entry for reschedule cards on change (#3508)
* create a new kind of revlog entry for Reschedule cards on change

* add comments

* exclude the rescheduled case in reviews graph
2024-10-21 16:47:01 +10:00
Damien Elmes
30e734b925 Bump Rust deps
Primarily for prost, which had incompatible changes
2024-10-21 15:34:04 +10:00
Jarrett Ye
b0eb2a2b97
Feat/Estimated Total Knowledge By Note & Daily Load (#3507)
* Feat/Estimated Total Knowledge By Note & Daily Load

* Update rslib/src/stats/graphs/retrievability.rs

* Update rslib/src/stats/graphs/future_due.rs
2024-10-21 15:19:42 +10:00
Jarrett Ye
6ff309e08f
Feat/option to enable FSRS short-term scheduler when (re)learning steps run out && speed up features based on simulation (#3505)
* 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)
2024-10-21 15:09:07 +10:00
Jarrett Ye
b09326cddd
Feat/export dataset for research (#3511)
* 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
2024-10-18 18:57:06 +10:00
Han Yeong-woo
25070c505a
Fully switch to File::set_times() from utime crate (#3503)
* Fully switch to File::set_times() from utime crate

* Switch to open_file()

Future me will end up wondering why we're explicitly declaring read=true

* Fix failing on windows

* Minor tidy-up (dae)

* Fix comment typo
2024-10-16 02:35:37 +10:00
Jarrett Ye
f804abf758
Fix/only let FSRS take over short-term schedule when steps are empty (#3496) 2024-10-16 01:16:47 +10:00
Damien Elmes
f3ca4646fc
Revert "Fully switch to File::set_times() from utime crate (#3501)" (#3502)
This reverts commit 723b5e9bcc.
2024-10-16 00:35:26 +10:00
Han Yeong-woo
723b5e9bcc
Fully switch to File::set_times() from utime crate (#3501)
* Fully switch to File::set_times() from utime crate
 
* Switch to open_file() (dae)

Future me will end up wondering why we're explicitly declaring read=true
2024-10-16 00:31:17 +10:00
Damien Elmes
b75fd94c96 Update Rust deps
- Primarily for the latest RUSTSEC on pyo3
- utime has been pinned, as they've introduced a deprecation warning
without a solution being available for folder mtimes
2024-10-15 23:00:45 +10:00
Damien Elmes
743017b471 Partially switch to File::set_times() from utime crate 2024-10-15 23:00:38 +10:00
Damien Elmes
111cefe8f1 Revert "When updating all FSRS parameters at once, exclude suspended cards"
https://forums.ankiweb.net/t/memory-state-of-suspended-cards/50460/6

This reverts commit 656cfe0b9c.
2024-10-12 22:09:05 +10:00
Jarrett Ye
f00211df35
add get_revlogs API && fix the style of tooltipText of ReviewsGraph (#3490)
* 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)
2024-10-12 14:49:14 +10:00
a.r
8af63f81eb
typeanswer: NFC fix & cleanup (#3482)
* typeanswer: cleanup

* DiffNonCombining's new() used String where plain Vec is appropriate
* get rid of normalize_typed for DiffTrait again by pulling code into DiffNonCombining's new()
* two DiffNonCombining testcases

* typeanswer: return to NFC & typos
2024-10-11 20:33:08 +10:00
Taylor Obyen
7439c657f0
Add card position column and always show position in card info (#3471)
* Expose original position to columns and card info

* Fix contributors

* Change routine name and return, fix SQL file, utilize coalesce inline

* Handle cards without original position

* Remove unecessary conversion
2024-10-11 20:14:07 +10:00
Jarrett Ye
a982720a42
Feat/Easy Days (#3442)
* 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.
2024-10-11 19:47:44 +10:00
Damien Elmes
479aee0883 Fix updated template links
I forgot to update the PR before merging.
2024-10-10 20:52:14 +10:00
sorata
d98fc142f1
Change links in error messages (#3468)
* Update template.rs

* Update template.rs

* ./check (dae)
2024-10-10 20:47:11 +10:00
Jarrett Ye
598233299e
Let FSRS control short term schedule (#3375)
* graduate card when user press hard and has 0 learning steps

* fix error: useless conversion to the same type

* do the same thing to again

* fix expected `Option<u32>`, found integer

* ./ninja format

* let FSRS control short term schedule

* Update to FSRS-rs v1.3.0

* ./ninja check:clippy

* Update to FSRS-rs v1.3.1

* Pin FSRS version (dae)

https://github.com/ankidroid/Anki-Android-Backend/pull/417

* Remove redundant parens (dae)
2024-10-06 12:20:18 +10:00
a.r
cfd1eba7ec
typeanswer: hoist strip_expected (#3464)
(renamed from prepare_expected)

Single use makes it likelier to get inlined, too.
2024-10-02 18:28:18 +10:00
Ben Nguyen
cc45db0e22
Fix Mnemosyne importer chokes on due dates >= 2038 (#3459)
* Fix integer overflow

* Update CONTRIBUTORS
2024-10-02 18:20:44 +10:00
Jarrett Ye
159681d9f2
Fix/Reschedule doesn't work on cards in filtered deck (#3441)
* Fix/Reschedule doesn't work on cards in filtered deck

* Update docstring (dae)
2024-10-02 18:09:25 +10:00
Jarrett Ye
59969f62f5
polish graphs of simulator, true retention table and forgetting curve (#3448)
* polish graphs of simulator and forgetting curve

* True Retention: decrease precision of percentages

* apply uniform sampling rate to forgetting curve

* don't display time, only date when maxDays >= 365

* don't floor the totalDaysSinceLastReview

* correct cramming condition

* improve code-style

* polish ticks & tooltip of simulator

* remove unused import

* fix minor error of daysSinceFirstLearn

* filter out revlog entries from before the reset

https://forums.ankiweb.net/t/anki-24-10-beta/49989/63?u=l.m.sherlock

* use Math.ceil for windowSize

* fill currentColor for legend text

* remove mix-blend-mode: multiply

* tune the position of legend
2024-10-01 00:22:30 +10:00
Jarrett Ye
db5c472e20
Fix/keep the same-day reviews for training & optimized parameters should be consistent if the inputs are consistents (#3450)
* keep the same-day reviews in feature

* Update to FSRS-rs v1.2.3

* format

* don't remove short-term reviews if not training

* Update to FSRS-rs v1.2.4
2024-09-30 23:43:26 +10:00
a.r
d9969a9f4f
lazy_static → once_cell → stabilized versions (#3447)
* Anki: Replace lazy_static with once_cell

Unify to once_cell, lazy_static's replacement. The latter in unmaintained.

* Anki: Replace once_cell with stabilized LazyCell / LazyLock as far as possible

Since 1.80: https://github.com/rust-lang/rust/issues/109736 and https://github.com/rust-lang/rust/pull/98165

Non-Thread-Safe Lazy → std::cell::LazyCell https://doc.rust-lang.org/nightly/std/cell/struct.LazyCell.html

Thread-safe SyncLazy → std::sync::LazyLock https://doc.rust-lang.org/nightly/std/sync/struct.LazyLock.html

The compiler accepted LazyCell only in minilints.

The final use in rslib/src/log.rs couldn't be replaced since get_or_try_init has not yet been standardized: https://github.com/rust-lang/rust/issues/109737

* Declare correct MSRV (dae)

Some of our deps require newer Rust versions, so this was misleading.

Updating the MSRV also allows us to use .inspect() on Option now
2024-09-30 23:35:06 +10:00