Commit graph

2174 commits

Author SHA1 Message Date
Jarrett Ye
ce6497cd2b
Fix/remove the lower limit of interval when set due date (#4063)
* Fix/remove the lower limit of interval when set due date

* don't affect SM-2

* Apply patch from user1823

* Fix build

* More suggestions from user1823
2025-06-08 15:36:32 +07:00
sorata
e5d34fbb18
Update default styles (#4060)
* add margin for hr

* add line height to default styles

* update my email

* change margin to 1em
2025-06-08 11:24:46 +07:00
Damien Elmes
2427743751 Formatting fix
I have checks running on push, but must have confused the build system
by modifying the file at the wrong time.
2025-06-06 13:19:47 +07:00
Damien Elmes
933d63545a Stop collapsing reschedule entries
Closes #3316
2025-06-06 13:13:48 +07:00
Luc Mcgrady
55ecbc1125
Feat/Health check (#4047)
* Message on low log loss

* make console.log permanent

* Added: Health check option

* disable button

* change health check conditions

* i18n

* ./check

* Apply suggestions from code review

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

* delete shadowed fsrs

* Update ts/routes/deck-options/FsrsOptions.svelte

Co-authored-by: llama <gh@siid.sh>

* Update ftl/core/deck-config.ftl

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

* anon's suggestions

* snake_case

* capital slow

* make global

* on by default

* Adjusted loss values

* Show message on pass

* ./check

* ComputeParamsRequest

* update coefficients

* update thresholds

* fix thresholds

* Apply suggestions from code review

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
Co-authored-by: llama <gh@siid.sh>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2025-06-06 12:43:33 +07:00
Jarrett Ye
8add993fca
improve the accuracy of the expected workload calculation (#4056)
* improve the accuracy of the expected workload calculation

* ./ninja fix:minilints

* implement smoothing & a separate struct for return value

* set TERMINATION_PROB to 0.001
2025-06-04 18:20:12 +07:00
llama
174b199164
Add IO mask colour fill tool (#4048)
* add fill tool

* add fill tool logic

* open colour picker on fill tool activation

* refactor/add fill attr to io clozes

* fill masks in editor

* fill text and inactive masks in reviewer

* fix lint

* remove debug option
2025-06-04 11:45:34 +07:00
Luc Mcgrady
bbac90d97d
Fix/Invalid parameter counts saveable (#4052)
* Add frontend check for parameters

* Fix backend

* ./check

* Fix: Wrong type
2025-06-03 16:27:04 +07:00
Jarrett Ye
2de0c79ba5
Feat/evaluate FSRS with time series split (#3962) 2025-06-03 15:26:33 +07:00
Luc Mcgrady
a99beb71fe
Feat/Card ID special field (#4046)
* Feat/Card ID special field

* remove clone
2025-06-02 16:35:13 +07:00
Luc Mcgrady
f29bcb743b
Feat/Desired retention warning improvements (#3995)
* Feat/90% desired retention warning

* Update ftl/core/deck-config.ftl

* show on newly enabled

* Show warning on focus

* Never hide warning

* Display relative change

* Add: Separate warning for too long and short

* Revert unchanged text changes

* interval -> workload

* Remove dead code

* fsrs-rs/@L-M-Sherlock's workload calculation

* Added: delay

* CONSTANT_CASE

* Fix: optimized state

* Removed "Processing"

* Remove dead code

* 1 digit precision

* bump fsrs-rs

* typo

* Apply suggestions from code review

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Improve rounding

* improve comment

* rounding <1%

* decrease rounding precision

* bump ts-fsrs

* use actual cost values

* ./check

* typo

* include relearning

* change factor wording

* simplify sql

* ./check

* Apply suggestions from code review

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

* Fix: missing search_cids

* @dae's style patch

* Fix: Doesn't update on arrow keys change

* force two lines

* center two lines

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-05-27 13:07:21 +10:00
Jarrett Ye
1e6d12b830
Set Due Date: Set interval to actual elapsed days when FSRS is enabled (#4035) 2025-05-26 23:33:39 +10:00
Jarrett Ye
dfee38898d
calculate accurate retrievability in card info (#4034) 2025-05-26 23:25:27 +10:00
llama
d667abffd1
Fix searching for non-blank adjacent wildcard fields (#4009)
* modify collect_ranges to take param on whether to join ranges

* update tests

* update existing call

* fix searching for non-empty wildcard fields
2025-05-19 13:15:23 +10:00
Damien Elmes
48a0640a07 Revert "feat(scheduler): add from_queue flag to CardAnswer (#3976)"
This reverts commit 1f95d030bb.

Buggy: https://github.com/ankitects/anki/pull/3983
2025-05-19 10:26:10 +10:00
user1823
8f2c708751
Include reset entries in dataset exported for research (#3998)
https://github.com/open-spaced-repetition/fsrs4anki-helper/pull/566#issuecomment-2875432135
2025-05-15 16:31:18 +10:00
GithubAnon0000
f727934a42
CHANGE collection size too large error to add MB values and info about compressed vs. uncompressed. (#3981)
* CHANGE collection size too large error to add MB values and info about compressed vs. uncompressed

* Round f64 to 2 decimals

* Remove line breaks from ftl/core

* Remove string 'uncompressed' from code

* Add string 'uncompressed' to ftl/core

* Remove if statement change introduced to test changes locally

* Run ./check
2025-05-15 15:08:41 +10:00
llama
573f59fab1
Allow rotating IO masks (#3987)
* Revert "Disable rotation globally"

This reverts commit 22736238c1.

* alt. impl for hiding rotation marker when selecting/ungrouping

* (de)serialise angles

* rotate masks in reviewer

* update bounds checking

* floats.ts -> lib.ts

* add convenience fns

* store mask angles (deg) in steps of 10000

* update CONTRIBUTORS
2025-05-10 16:21:33 +10:00
Luc Mcgrady
e06852a0ed
Fix/SQL retrievability underflow (#3980)
* Fix/Saturating sub called before u32 conversion

* more
2025-05-05 18:49:12 +10:00
Matt Brubeck
bcb28f0a85
Use first >= 1d interval for starting memory state (#3959)
When a filtered revlog history begins with one or more < 1d intervals
(for example, because it starts in the middle of a sequence of
relearning steps), use the first >= 1d interval to calculate the initial
memory state.

Bug report thread:

https://forums.ankiweb.net/t/fsrs-stability-when-first-non-ignored-revlog-has-a-relearning-interval/59894
2025-05-05 15:49:06 +10:00
Yaoliang Chen
1f95d030bb
feat(scheduler): add from_queue flag to CardAnswer (#3976)
Co-authored-by: Yaoliang <yaoliang.ch@gmail.com>
2025-05-03 12:21:48 +03:00
Jarrett Ye
bd67e9fe1b
Fix/stability doesn't increase after pressing good (#3975) 2025-05-03 12:04:35 +03:00
Jonathan Schoreels
963fcf7c60
Check if self.card.reps>0 before substracing 1 (#3966)
* Check if self.card.reps>0 before substracing 1

* Fix formatting

* Use a more rust-y way to avoid the Panic for underflow, especially wé're talking seed value

Co-Authored-By: jake <jake@sharnoth.com>

---------

Co-authored-by: jake <jake@sharnoth.com>
2025-04-30 21:53:36 +10:00
Matt Brubeck
ef37952ba0
Remove dead code in reviews_for_fsrs (#3958)
* Clarify logic in reviews_for_fsrs

Prior to this change, the second check of `first_of_last_learn_entries`
was dead code because the first check would always break out of the loop
before it could succeed.  Re-order the code for clarity and add a
comment to explain the logic.

* Update CONTRIBUTORS
2025-04-30 21:28:30 +10:00
Jarrett Ye
07033435a6
Fix/remove incorrect invalid input check (#3963) 2025-04-29 02:10:19 +03:00
Luc Mcgrady
ad073ab10c
Feat/CMRR uses simulate config (#3947)
* Added: simulate_request_to_config

* Use SimulateConfig for CMRR

* ./check

* Fix: ComputingRetention

* Use actual cards for optimal_retention
2025-04-27 21:02:37 +10:00
Damien Elmes
1e2f11a271 Latest FSRS 2025-04-27 19:48:43 +10:00
Jarrett Ye
90f2e06b17
Fix/missing-simulator-decay-for-FSRS-5 (#3956) 2025-04-27 17:20:13 +10:00
Jarrett Ye
6d0e52e8a0
Fix/incorrect fallback of decay (#3954) 2025-04-27 17:19:59 +10:00
Luc Mcgrady
2406830ff9
Fix/no memory state revlogs in reverse order on card stats screen. (#3951) 2025-04-26 12:09:40 +10:00
user1823
9872645d5a
Update sorting by R for FSRS 6 (#3949)
* Update sorting by R for FSRS 6

* Update sqlite.rs
2025-04-26 12:05:38 +10:00
Jarrett Ye
a5778f3377
Fix/FSRS-6 doesn't give <1d intervals & use log loss instead of RMSE(bins) (#3948)
* Fix/FSRS-6 doesn't give <1d intervals

https://forums.ankiweb.net/t/anki-25-05-beta-1/59710/8?u=l.m.sherlock

* use log loss instead of rmse to determine use which parameters
2025-04-26 12:05:13 +10:00
RREEMMII
0321c26e73
Fix docs of note_fields_check to match changes made in PR #3912 (#3944)
Co-authored-by: Rémi Deloye <remi.deloye@telecom-paris.fr>
2025-04-26 11:55:40 +10:00
Jarrett Ye
e096c462fa
Feat/FSRS-6 (#3929)
* 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
2025-04-25 16:44:34 +10:00
llama
1e6c8b2006
Fix fields with \n being ignored when searching all fields w/o regex (#3943)
* add singleline flag to regex when searching all fields

* update test
2025-04-24 20:01:10 +10:00
Luc Mcgrady
e861364092
Fix/Calculate missing memory states on simulate (#3940)
* Fix: Recalculate memory states on simulate

* Fix: Wrong cards included

* Save states to cards

* ./check

* Update rslib/src/scheduler/fsrs/simulator.rs
2025-04-24 19:32:31 +10:00
Arthur Milchior
7bebcad864
Some documentation and reduce copy/paste (#3917)
* NF: document that cloze number are kept as they are in the field

I needed to know because {{c1 generate card 0 for example. And storing
the card ordinal would have been another consistent choice.

* NF: introduce method that return the cloze number in fields

This slightly reduce code duplication.

* Apply suggestions from code review
2025-04-24 19:02:11 +10:00
Arthur Milchior
efaaae8ce4
Cloze button get disabled outside of cloze field (#3879)
* 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.
2025-04-24 18:37:41 +10:00
Damien Elmes
dd0abfc200 Don't check collection size on sync to third-party server
Closes #3936
2025-04-23 17:03:04 +10:00
Luc Mcgrady
781a23c6c4
Feat/Ignored before card count (#3910)
* GetIgnoredBeforeCount

* get_card_count_with_ignore_before

* Included / total

* Respect search

* Get frontend hooked up

* Fix: Malformed sql and search

* Variable names

* Added: Alert colours

* i18n

* ./check

* Remove console.log

* Fix: Tooltip showing for default value

* Update ftl/core/deck-config.ftl

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

* Fix: Multiple backend calls

* Message: (Approximately)

* Fix: Bouncing info message

* Added: Change delay

* Added: ignore_before_updated

* ./check

* Fix typing, camelCase and improve wording

* Temporarily enable the check on startup

---------

Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-04-15 20:21:54 +10:00
RREEMMII
1fa99c97e4
Add a warning when there is a cloze in "back extra" and "text" is empty (#3912)
* Add a warning when there is a cloze in "back extra" and "text" is empty

Fix #3909

* Disallow non-blank first field card

* Fix Rust ninja check
2025-04-13 14:40:35 +10:00
user1823
e546c6d11f
Improve natural unit conversion for a time b/w 360 to 365 days (#3901)
* Improve natural unit conversion for a time b/w 360 to 365 days

Previously, 363 days would be converted to 12.1 months, which is quite confusing because
- a user would think that if the value is more than 12 months, why it isn't displayed in years
- the value is actually less than a year, which is counterintuitive as 12.1 m suggests a value more than a year.

* precise

* Update time.ts to match timespan.rs

* Add another test

* Use average duration of a month instead

* Update time.ts

* Update test_schedv3.py

* Update time.test.ts
2025-04-13 14:26:34 +10:00
user1823
0f9216c127
Replace some means in Stats with medians (#3900)
* Display median interval in Stats instead of mean

Median is better suited than mean for reporting skewed data.

* Display median ease in Stats instead of mean

* Update difficulty.ts

* Update ease.ts

* Update statistics.ftl

* Format eases.rs

* Remove unused import

* Change Median back to Average in UI

* Revert "Change Median back to Average in UI"

This reverts commit e0c1e3f8e4.

* Preserve the old translations for now (dae)
2025-04-11 19:29:23 +10:00
llama
ccab18b7ba
Modify card rendering output to specify if rendered card is empty (#3890)
* 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)
2025-03-31 17:51:28 +07:00
llama
aa5684638b
Improve performance of card rendering parser (#3886)
* refactor parser

* update test

* add tests

* refactor CardNodes

* Increase nested cloze limit to underlying protobuf limit (dae)
2025-03-31 17:38:46 +07:00
Kris Cherven
52781aaab8
Fix superfluous message when a deck is dragged to its parent (#3859)
* Move the solution to the Rust layer

* CONTRIBUTORS fix (1)

* CONTRIBUTORS fix (2)

* Fix CI issues

* Simplify reparenting solution

* Fix reparenting message with tags

* Revert "Fix reparenting message with tags"

This reverts commit 199958c1c5.

* tags: Return None in reparented_name when the name is unchanged
2025-03-31 16:47:56 +07:00
Yuki
acdf486b29
Refactor: Make Load Balancer Optional Throughout Codebase (#3860)
* Refactoring: load balancer

* Update about.py

* Refactoring: load balancer

* Update about.py

* Clean the code

* Remove config check from get_scheduling_states

* Backend method for the load balancer

* Refactor backend method for the load balancer
2025-03-26 23:19:28 +10:00
llama
45bb56808a
Fix deck day limits incorrectly being carried over when importing (#3878)
* re-export DayLimit

* add and use DeckContext::maybe_correct_day_limits

* update existing test

* add test

* small tweaks

* refactor

* refactor test
2025-03-25 00:45:09 +07:00
llama
886c5795d4
Fix panic when clearing today limits on the day collection was made (#3877)
* fix panic on clearing today limits on the day collection was made

* avoid possible overflow

* clear future today limits
2025-03-25 00:24:11 +07:00
Jarrett Ye
a4e0a0824b
Fix/out of index (#3872) 2025-03-25 00:04:25 +07:00