Commit Graph

2351 Commits

Author SHA1 Message Date
Fernando Lins
110cb8f3b1 fix(sass): replace global map-get/map-merge with sass:map namespace in _functions.scss (#4955)
## Summary

Closes #4954.

`_functions.scss` already had `@use "sass:map"` at the top but was still
calling the deprecated global functions `map-get` and `map-merge`.
Replaced all occurrences with their namespaced equivalents `map.get` and
`map.merge`.

This eliminates the `[global-builtin]` deprecation warnings visible in
every Check (Linux) CI run, which will become hard errors in Dart Sass
3.0.

## Test plan

- [x] `just lint` passes
- [x] `just test-ts` passes with no deprecation warnings

## Before / after behavior (optional)

### at main branch
<img width="1325" height="906" alt="Image"
src="https://github.com/user-attachments/assets/6a35ac2d-418a-4ded-baf6-f959b06b8d48"
/>

### at this branch
<img width="1156" height="921" alt="image"
src="https://github.com/user-attachments/assets/276a15ce-b319-4ee5-9ae2-122cd4d4d45e"
/>
2026-06-05 09:25:14 -03:00
Fernando Lins
067d04f4ab chore(sass): remove unused Bootstrap imports from _button-mixins.scss (#4953)
<!--
Title (for the Pull Request title field at the top):
Use a short prefix so the change type is obvious. You do not need to
repeat it in the body below.

Examples:
- fix: — bugfix
- feat: — feature
- refactor: — internal change without user-facing feature
- docs: — documentation only
- chore: — tooling, CI, deps, build housekeeping
- test: — tests only
-->

## Linked issue

Closes #4951

## Summary / motivation

Removes two dead `@import` statements from `_button-mixins.scss`.

Bootstrap's functions and variables were imported but never used, since
all mixins rely exclusively on CSS custom properties (`var(--)`) and
local mixin parameters.

This eliminates ~35 Dart Sass deprecation warnings (`[import]`,
`[color-functions]`) that appeared during `just test-ts --coverage`.

## Test plan

- [x] `just lint` passes
- [x] `just test-ts` passes with no deprecation warnings

## Before / after behavior (optional)

### current behavior (at main branch)

<img width="1424" height="979" alt="image"
src="https://github.com/user-attachments/assets/89fafb5e-e811-48ca-b7e0-dbae36f63d7a"
/>

### Expected behavior (at this branch)

<img width="1489" height="870" alt="image"
src="https://github.com/user-attachments/assets/3eca3296-d31b-4e02-ad5f-e9287e59ee3d"
/>
2026-06-05 09:24:36 -03:00
Fernando Lins
da64f03307 chore(deps): consolidated security updates (Dependabot batch) (#4934)
## Summary

Consolidates 8 open Dependabot PRs into a single security-focused batch.

### Addressed advisories

- GHSA: tar (Cargo)
[#296](https://github.com/ankitects/anki/security/dependabot/296)
- @tootallnate/once
[#295](https://github.com/ankitects/anki/security/dependabot/295)
- ws [#293](https://github.com/ankitects/anki/security/dependabot/293)
- openssl
[#292](https://github.com/ankitects/anki/security/dependabot/292)
- idna [#291](https://github.com/ankitects/anki/security/dependabot/291)
- devalue
[#287](https://github.com/ankitects/anki/security/dependabot/287)/[#239](https://github.com/ankitects/anki/security/dependabot/239)/[#217](https://github.com/ankitects/anki/security/dependabot/217)/[#216](https://github.com/ankitects/anki/security/dependabot/216)
- postcss
[#275](https://github.com/ankitects/anki/security/dependabot/275)
- svelte
[#286](https://github.com/ankitects/anki/security/dependabot/286)/[#288](https://github.com/ankitects/anki/security/dependabot/288)/[#289](https://github.com/ankitects/anki/security/dependabot/289)
- lodash-es
[#258](https://github.com/ankitects/anki/security/dependabot/258)/[#259](https://github.com/ankitects/anki/security/dependabot/259)
- @sveltejs/kit
[#294](https://github.com/ankitects/anki/security/dependabot/294)

### Sources

Merged from PRs: #4914, #4887, #4867, #4866, #4865, #4846, #4744, #4892.

### Not addressed — rand (Cargo)
[#268](https://github.com/ankitects/anki/security/dependabot/268)

PR #4741 (rand 0.9.4 → 0.10.1) was excluded because `fsrs 5.2.0` still
depends on `rand 0.9.4`. The rand 0.10 API changes (`Rng` → `RngExt`)
cause a compile error at the `PostSchedulingFn` boundary. This will be
unblocked when fsrs is upgraded.

### Not addressed (transitive — follow-up)

- urllib3
[#284](https://github.com/ankitects/anki/security/dependabot/284)/[#283](https://github.com/ankitects/anki/security/dependabot/283)
- GitPython
[#282](https://github.com/ankitects/anki/security/dependabot/282)
- ip-address
[#276](https://github.com/ankitects/anki/security/dependabot/276)
- pytest
[#266](https://github.com/ankitects/anki/security/dependabot/266)
- Pygments
[#256](https://github.com/ankitects/anki/security/dependabot/256)
- brace-expansion
[#255](https://github.com/ankitects/anki/security/dependabot/255)/[#158](https://github.com/ankitects/anki/security/dependabot/158)
- picomatch
[#253](https://github.com/ankitects/anki/security/dependabot/253)/[#252](https://github.com/ankitects/anki/security/dependabot/252)
- tar (npm)
[#238](https://github.com/ankitects/anki/security/dependabot/238)/[#235](https://github.com/ankitects/anki/security/dependabot/235)/[#209](https://github.com/ankitects/anki/security/dependabot/209)
- immutable
[#231](https://github.com/ankitects/anki/security/dependabot/231)
- minimatch
[#227](https://github.com/ankitects/anki/security/dependabot/227)/[#226](https://github.com/ankitects/anki/security/dependabot/226)/[#221](https://github.com/ankitects/anki/security/dependabot/221)
- fabric
[#211](https://github.com/ankitects/anki/security/dependabot/211)

These need manual `yarn.lock` resolutions / `uv.lock` overrides.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-03 15:10:39 -03:00
Fernando Lins
a140d39329 chore(e2e): add Playwright end-to-end test infrastructure (#4864)
## Linked issue

Closes #4863

## Summary / motivation

Adds Playwright as the e2e test framework so contributors can write
browser-based tests against a real headless Anki instance. There was no
automated way to exercise mediasrv pages, SvelteKit routes, or the
`/_anki/` RPC surface from a browser, this PR establishes that harness.

Key pieces:
- `qt/tests/launch_anki_for_e2e.py` — spawns a throwaway Anki instance
(temp `ANKI_BASE`, `QT_QPA_PLATFORM=offscreen`). Pre-seeds `prefs21.db`
so Anki skips the language picker and profile chooser and goes straight
  to serving mediasrv.
- `playwright.config.ts` — points `webServer` at the launcher; polls
  `/favicon.ico` as the readiness probe.
- `ts/tests/e2e/` — `fixtures.ts` base and a sanity spec that verifies
  mediasrv is reachable and a SvelteKit page hydrates.
- `justfile` — `just test-e2e` recipe; Chromium installed to
  `out/playwright-browsers/`.
- CI — e2e step in `check-linux`; failed-run artifacts uploaded for 7
days.
- `docs/e2e-testing.md` — contributor guide covering setup, managed vs
  reuse-server modes, and writing new tests.

## How to test

Build the project once, then run the e2e suite in managed mode (no
separate `./run` needed — the launcher is started automatically):

```shell
just build
just test-e2e
```

## Before / after behavior (optional)
Before: no browser-level test harness existed.
After: `just test-e2e` drives a real headless Anki instance via
Playwright.

## Risk / compatibility / migration
No production code changed. New dev-only files and CI step only.
Chromium is installed to `out/playwright-browsers/` (gitignored) and
does not affect the regular build.

---------

Co-authored-by: Abdo <abdo@abdnh.net>
2026-05-22 15:59:42 -03:00
Fernando Lins
f9a5b36c82 feat: add TS test coverage (#4843)
## Linked issue

Closes #4840

## Summary / motivation

Adds Vitest V8 coverage for TypeScript/Svelte tests via
`@vitest/coverage-v8`.
Introduces `just test-ts --coverage` and `just test-ts --coverage
--html`,
and wires TypeScript into the `just test --coverage` umbrella —
completing
coverage support across all three stacks (Python, Rust, TypeScript).

The threshold is set to 5% — intentionally low because the Vitest test
count is small relative to the TypeScript/Svelte source surface. It is
meant to be raised as more tests are added.

## How to test

```sh
# Existing behavior unchanged
just test-ts

# Terminal summary + enforces 5% line coverage threshold
just test-ts --coverage

# Terminal summary + HTML report under out/coverage/typescript/
just test-ts --coverage --html

# Full umbrella — all three stacks
just test --coverage
just test --coverage --html
```

### Checklist

- [x] I ran `./ninja check` or an equivalent relevant check locally.

### Details

- `@vitest/coverage-v8` pinned at `3.2.4` in `package.json`.
- Reports are written to `out/coverage/typescript/` via
`--coverage.reportsDirectory=../out/coverage/typescript` (relative to
the `ts/` working directory where vitest runs).
- V8 provider is preferred over Istanbul: faster and requires no Babel
transform for TypeScript projects.
- Coverage measures only code reachable through Vitest's module graph —
Svelte component rendering is not covered.
- The `yarn` justfile variable is added for platform-aware yarn
invocation (Windows vs Unix).

## Before / after behavior

Before: no `just test-ts`, no TypeScript coverage.
After: `just test-ts` runs Vitest via ninja; `just test-ts --coverage`
runs with V8 instrumentation.
`just test --coverage` now spans all three stacks.

---------

Co-authored-by: Abdo <abdo@abdnh.net>
2026-05-18 11:54:16 -03:00
Luc Mcgrady
0900370fc4 fix: add fallback value for startMemorized (#4796)
<!--
Title (for the Pull Request title field at the top):
Use a short prefix so the change type is obvious. You do not need to
repeat it in the body below.

Examples:
- fix: — bugfix
- feat: — feature
- refactor: — internal change without user-facing feature
- docs: — documentation only
- chore: — tooling, CI, deps, build housekeeping
- test: — tests only
-->

## Linked issue (required)

<!-- Fixes #123 / Closes #123 / Refs #123 -->
fixes https://github.com/ankitects/anki/issues/4795

## Summary / motivation (required)

An error appeared in the console of the deck options. with this change
it doesn't.
<!-- What this PR does and why. For larger changes, add enough context
for reviewers. -->

## Steps to reproduce (required, use N/A if not applicable)

<!-- Steps to reproduce: how to trigger the bug in the broken state (the
"before").
 - Mainly for bugfixes;
    - For bugs: numbered steps before the fix. For non-bugs: write N/A.
 - use N/A for features, refactors, docs, chore, etc.
-->

1. open the deck options
2. check the console either by using the Anki command line or by using
[this addon](https://ankiweb.net/shared/info/31746032)

## How to test (required)

<!--- How to test: how you verified the change (checks, unit tests,
manual steps, edge cases — the "after" or general validation). --->
The console should be clear on the deck options page

### Checklist (minimum)

- [X] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

<!-- Commands, manual steps, edge cases, and what you observed -->

## Before / after behavior (optional)

<!-- For bugfixes: behavior before vs after. For other types: N/A or a
short note. -->

## Risk / compatibility / migration (optional)

<!-- Breaking changes, rollout notes, or N/A for small / low-risk PRs
-->

## UI evidence (required for visual changes; otherwise N/A)

<!-- Screenshot or short video -->

## Scope

- [X] This PR is focused on one change (no unrelated edits).
2026-05-12 13:51:47 +03:00
Luc Mcgrady
d036c2ade4 feat: expose setParameterUnlockClickTimeoutMs (#4810)
<!--
Title (for the Pull Request title field at the top):
Use a short prefix so the change type is obvious. You do not need to
repeat it in the body below.

Examples:
- fix: — bugfix
- feat: — feature
- refactor: — internal change without user-facing feature
- docs: — documentation only
- chore: — tooling, CI, deps, build housekeeping
- test: — tests only
-->

## Linked issue (required)

closes https://github.com/ankitects/anki/issues/4809
<!-- Fixes #123 / Closes #123 / Refs #123 -->

## Summary / motivation (required)

<!-- What this PR does and why. For larger changes, add enough context
for reviewers. -->
This exposes a JS api to set the speed at which you click to unlock the
FSRS parameters (See #4372)

## Steps to reproduce (required, use N/A if not applicable)

<!-- Steps to reproduce: how to trigger the bug in the broken state (the
"before").
 - Mainly for bugfixes;
    - For bugs: numbered steps before the fix. For non-bugs: write N/A.
 - use N/A for features, refactors, docs, chore, etc.
-->

N/A

## How to test (required)

<!--- How to test: how you verified the change (checks, unit tests,
manual steps, edge cases — the "after" or general validation). --->
Open the console in the deck options and run
`anki.setParameterUnlockClickTimeoutMs(0)`. If you set it to 0 then it
will be impossible to unlock. if you set it to something very high it
will be very easy.

### Checklist (minimum)

- [X] I ran `./ninja check` or an equivalent relevant check locally.
- [ ] I added or updated tests when the change is non-trivial or
behavior changed.

### Details

<!-- Commands, manual steps, edge cases, and what you observed -->

## Before / after behavior (optional)

<!-- For bugfixes: behavior before vs after. For other types: N/A or a
short note. -->

## Risk / compatibility / migration (optional)

<!-- Breaking changes, rollout notes, or N/A for small / low-risk PRs
-->

## UI evidence (required for visual changes; otherwise N/A)

<!-- Screenshot or short video -->

## Scope

- [X] This PR is focused on one change (no unrelated edits).
2026-05-12 13:18:42 +03:00
Fernando Lins
7d8dc01722 chore: add release-age controls for uv and Yarn dependencies (#4761)
## Linked issue

Issue related #4747 

## Summary/motivation 

Add `[tool.uv]` `exclude-newer` + `required-version`, regenerate
`uv.lock`; bump bundled uv binaries in `python.rs`; bump **Yarn** and
`npmMinimalAgeGate`; remove --no-config from pyenv uv sync --locked so
it matches the lockfile.

## How to test 

- [ ] ./ninja check
- [ ] yarn install
2026-04-30 13:38:42 -03:00
barisayyildiz
cfc6dc015e Fix FSRS desired retention not updating on deck preset change (#4469) (#4610)
## Fix FSRS desired retention not updating on deck preset change (#4469)
### Description
This PR fixes issue #4469, where the "Desired Retention" (DR) setting in
the deck options UI failed to update and could be accidentally
overwritten when switching between configuration presets.

**The Cause:**
Previously, an `onPresetChange` method was being bound in
`DeckOptionsPage.svelte` and passed down to `FsrsOptionsOuter.svelte`.
However, this method was not actually implemented within
`FsrsOptionsOuter.svelte`

**Changes Made:**
* Removed the unimplemented `onPresetChange` prop binding from
`FsrsOptionsOuter.svelte`.
* Implemented the `onPresetChange` logic directly inside
`FsrsOptions.svelte` so that the component internally handles updating
its own FSRS values (including Desired Retention) whenever a new preset
is selected.

**Testing:**
* Additionally, I have tested this change in the simulator component and
didn't observe any side effects.

I would like to get your feedback on this.

Fixes #4469
2026-04-29 17:56:01 +03:00
Brandon (Carl) Song
39ef88b396 Deck Options screen change (#4558)
I'm opening this pr to undo my changes from #4501 and setting the word
break property as well as looking for suggestions on the Easy Days
section, and any other additional sections that may need improvement
(such as placement of buttons or text).


https://github.com/user-attachments/assets/38e65f48-2399-4bd3-9800-375ef4947625

I've tried out adjusting the font size but discovered that a potential
issue could be due to the content's width of the box model being small
which causes the words to be divided. However, if I set the font size's
viewport width to 1vw, the headers fit but at a smaller font.
<img width="200" height="auto" alt="image"
src="https://github.com/user-attachments/assets/303206f2-9dea-4d94-9962-3a70f6f93071"
/>

Perhaps this pr can be closed if setting word break ultimately isn't a
viable option.
2026-04-21 14:17:15 +03:00
Luc Mcgrady
922953acf4 Feat/Different method for ratio graph in Help Me Decide. (#4452)
Forum link:

-
https://forums.ankiweb.net/t/replace-cmrr-with-workload-vs-dr-graph-more/63234/27?u=a_blokee

@snorpdorp notified me that the logic behind the ratio graph is flawed
as it doesn't properly account for the number of cards that are
memorized to begin with.

I have implemented his (and @1DWalker's) proposed solution

<img width="1267" height="657" alt="image"
src="https://github.com/user-attachments/assets/41eded79-8f76-41dd-b98f-0bf1a968ab9b"
/>

Now the graph is inverted so that the higher the value, the more
efficient it is, in @snorpdorp's own words:

> The previous equation was flawed in that it displayed the total
knowledge at the end of the simulation, not the relative gain in
knowledge from the amount of studying done during the simulation
timeframe. The new (correct) equation is (relative gain in knowledge as
a result of studying during the simulation) / (time spent studying
during simulation) -
https://discord.com/channels/368267295601983490/1443273721878937650/1444447278344437833
2026-04-03 19:59:18 +03:00
Moamen Abdelsattar
2bfb120758 Fix issue of Arabic image occlusion editor (#4594)
Fix issue #4182

Tested using AnkiWebView Inspector addon.

[inset-inline-start
compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/inset-inline-start#browser_compatibility)
[margin-inline-start
compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/margin-inline-start#browser_compatibility)

These CSS properties depend on logical direction of the document. No
need to make separate rules for RTL languages.

I will delay adding myself to CONTRIBUTORS until I get a notification
that the maintainers are willing to merge (I already have 2 open PRs,
delayed merging leads to conflicts in CONTRIBUTORS).
2026-04-03 16:59:20 +03:00
Yuuki
e412ea76d0 fix html editor collapses after toggling sticky fields (#4566)
Problem:
When the HTML editor is active on a field in the Add Cards dialog,
toggling the pin/sticky on any field and then adding a note (Ctrl+Enter)
causes all active HTML editor fields to collapse unexpectedly.
The editor saves the UI state inside a session object. When the sticky
field is toggled, `update_notetype_legacy()` is called and the
notetype's modTime is changed. When we add the new card we call the
`loadNote()` function that does the following:
1. `saveSession()` saves the current state with the modTime.
2. `setNotetypeMeta() `sees the new modTime and detect a mismatch,
deleting the entire session.
3. `setPlainTexts()` finds no saved sessions and returns the defaults.

Solution:
My solution revolves around changing how we check if the session is
changed or not.
I removed the modTime comparison in `setNotetypeMeta()`. The check not
only causes the fallback of the html after toggling the sticky but also
when changing fields names or font changes.
I added a field count check inside `setPlainTexts()` so now the saved
session is discarded only if the number of fields changes.

So now the modTime is used for the syncing in the backend but not for
the frontend UI.
I also thought about maybe a solution while still using the modTime as
updating the saved modTime in `saveSession()` instead of removing the
check, but this would cause a call from the backend instead of using the
cached value, adding complexity to the code.

Fix: #4468
2026-04-02 21:10:11 +03:00
Abdo
e2886017bd Ignore Fluent message errors in TypeScript (#4494)
Closes #4490

The italian and Catalan translations for the
importing-note-updated-as-file-had-newer string contain a variable
reference (probably from an older version of the string). We can avoid
throwing an exception in such cases by passing the `errors` argument to
`FluentBundle.formatpattern()`:
https://projectfluent.org/fluent.js/classes/_fluent_bundle.FluentBundle.html#formatpattern
2026-03-31 17:41:28 +03:00
Junia Mannervik
bcfcdfee3d Fixed overlapping ranges when all history is selected (#4430)
* Fixed overlapping ranges when all history is selected and days calcolation to prevent overlapping labels

* fix statistics calendar and review grapgh range labeling

* update graph so that  the tooltip day label uses integer day boundaries

* fix(import): support variable field count with notetype column (#4421)

* update graph so that  the tooltip day label uses integer day boundaries
and removed earlier fix which didnt work

* Fixed overlapping ranges when all history is selected and days calcolation to prevent overlapping labels

* fix statistics calendar and review graph range labeling and removed earlier changes

* reverted changes in time.ts

* reverted changes in calendar.ts

* oldest bin width modified to match other bins in reviews.ts

* modified youngest bar in reviews to include today aswell

* Fix reviews graph: correct Year range to 365 days

* fixed formating for ninja testing

* bin labels and totals correct for year, review

* fixed structure for ninja checks

* reverted changes made to unrelated files

* reviewed code and simplified functions in review.ts

* changed xMax, so today is included in month and 3months

* removed a whitespace

* reverted unneccessary changes to xMax

* simplified code in time.ts and review.rs and pass bin boundaries directly to time.ts

* fixed labels for bins, and made sure year is 365 days

* fixed even bin sizes (0-4 days and 360-364 days) for year review graph

* ninja check fix, let -> const and removed empty line

* added comments to review.ts

* bin merging logic removed, since totals are correctly calculated anyways

* corrections from ninja check

* Update ts/routes/graphs/reviews.ts

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

* Update ts/routes/graphs/reviews.ts

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

* adjusted last bin labeling with xmin

* suggested changes to minimize difference from main

* small review changes

---------

Co-authored-by: junlu592 <junlu592@liu.student.se>
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2026-02-11 16:23:18 +03:00
user1823
db811351e5 Fix/Make descending R a pure R sort (#4400)
* Feat/Add pure R-based review sorting orders

https://forums.ankiweb.net/t/follow-up-make-descending-retrievability-a-pure-r-sort/67082

* cleanup

* fix

* Update test
2026-02-11 16:54:37 +07:00
Luc Mcgrady
c12fe7c507 Feat/Quantiles for FSRS percentage stats (#4425)
* Added: Difficulty zoom

* Fix: quantiles, Extract: PercentageRange component
(I accidentally staged the second commit before comiting the first)

* Add to retrievability graph

* Fix: Typo

* Fix: Half the percentiles

* Remove 50% option

* Fix: Add minimum bin width

* Revert "Remove 50% option"

This reverts commit 372d15578f.

* Remove magic number

* Fix: tickSize not updated

* unfix sqlite.rs

* remove console.log
2026-02-11 16:37:55 +07:00
Luc Mcgrady
bc646fadb4 Feat/Disable parameter editing until right clicked 3 times (#4372)
* Feat/Disable parameter editing until right clicked 3 times

* wording

* use left click

* Change placeholder to text

* use diabled agaain

* Add warning box

* FSRS

* Added: Timeout ms

* a11y

* Fix: typo

* Fix: Text selection issue
2026-02-11 15:12:30 +07:00
Damien Elmes
6fd0e68265 Bump devalue for latest CVE 2026-02-11 14:30:22 +07:00
Damien Elmes
ef76aad3e7 Do JS license output from top-level script 2026-02-11 14:26:53 +07:00
Luc Mcgrady
70c8ce4cb3 Fix rounded corners on FSRS Simulator modal (#4535)
Co-authored-by: Brett Schwartz <brettschwartz871@gmail.com>
2026-02-09 21:10:50 +03:00
SelfishPig
101908ca90 Swallow decoding errors when preloading (#4534)
* Swallow decoding errors when preloading

* Noop fix
2026-02-09 21:09:23 +03:00
Brandon (Carl) Song
b8884bac72 Changed overflow-x from hidden to auto for AnkiDroid (#4501)
* Enabled horizontal scrolling in deck options

* Modified CONTRIBUTORS file
2026-01-19 18:04:13 +03:00
Lee Doughty
0e1b62afd6 fix: apply nightMode class to editor in dark mode (#4473) 2026-01-17 16:21:48 +03:00
SelfishPig
8f2144534b Start decoding images immediately (#4471)
* Start decoding images immediately

* Start decoding images immediately (revised)

* New contributor
2025-12-20 20:27:13 +03:00
llama
26751f2207 fix(io): remove incorrect error toast shown when saving twice (#4458) 2025-12-15 19:09:51 +03:00
Lee Doughty
2d4de33cf3 Ensure trailing spaces are placed outside cloze deletions (#4446) 2025-12-01 21:54:46 +03:00
Lee Doughty
321e23acb2 Replace custom UUID function with crypto.randomUUID (#4384) 2025-10-13 09:37:30 +03:00
Dan
0986af4f81 fix(Occlusion): remember toggle translucency setting (#4366)
* remember translucency

Adding myself to contributors

Added braces surrounding if statement to comply with ninja checks

* ninja fix format
2025-09-30 20:18:26 +03:00
Hanni614
ee664b8fbb Stats - Retention rate help box links to Deck Options manual page #4198 (#4329)
* stats: link retention help box to "Desired retention" section

* docs: use HTTPS for fsrs and desiredRetention links

* Add Hanna Nilsén to CONTRIBUTORS

* Apply suggestion from @user1823

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

---------

Co-authored-by: Hanna Nilsén <hannanilsen@macbookair.students.netlogon.liu.se>
Co-authored-by: user1823 <92206575+user1823@users.noreply.github.com>
2025-09-27 14:46:11 +10:00
llama
c56e6e55ec feat: show saved custom colours as options in fill tool colour picker on mobile (#4348)
* add GetCustomColours rpc method

* save colours as rgb instead of argb

* show saved custom colours as possible options in colour picker

this is primarily for mobile clients, as qt currently ignores this

* save custom colours on colour picker change (for desktop)
2025-09-25 06:34:27 +03:00
llama
80cff16250 fix: persist colour picker's custom palette in profile (#4326)
* add SaveCustomColours rpc method

* restore custom colour palette on editor init

* save custom colour palette on colour picker open and input

there doesn't seem to be an event fired when the picker is
cancelled/closed, so it's still possible for work to be lost

* save colours on `change` instead of `input`

`input` is supposed to be fired on every adjustment to the picker
whereas `change` is only fired when the picker is accepted, but qt
seems to treat both as the latter, so this is currently a no-op

* Store colors in the collection

One minor tweak to the logic while I was there: an invalid color no
longer invalidates all the rest.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-09-17 16:46:53 +10:00
Abdo
75d9026be5 Decode images asynchronously (#4320) 2025-09-17 09:06:42 +03:00
Luc Mcgrady
dda730dfa2 Fix/Invalid memory states in simulator after parameters changed (#4317)
* Fix/Invalid memory states after optimization for simulator

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

* typo

* ./check
2025-09-04 14:35:00 +10:00
GithubAnon0000
c93e11f343 FIX gap above bury (#4298) 2025-09-01 15:09:42 +10:00
Luc Mcgrady
3521da3ad6 Chore/Remove CMRR from fsrs help modal (#4290)
* Remove cmrr from fsrs help sections

* move other strings
2025-09-01 14:58:20 +10:00
Damien Elmes
d23764b59e Bump devalue for latest CVE 2025-09-01 13:41:00 +10:00
Lee Doughty
2fee6f959b Replace deprecated $app/stores with $app/state in SvelteKit frontend (#4282)
* Migrate frontend from /stores to /state

* Update CONTRIBUTORS
2025-08-26 21:28:49 +03:00
Luc Mcgrady
562cef1f22 Fix #4253 (#4259)
* Reapply "Fix/Retention help button bounds (#4253)" (#4258)

This reverts commit fb2e2bd37a.

* move div up slots instead of using condition

* Avoid tabbing

---------

Co-authored-by: Abdo <abdo@abdnh.net>
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2025-08-20 01:19:25 +10:00
Luc Mcgrady
f3b4284afb Fix/System locale for simulator percentages (#4260)
Co-authored-by: Ross Brown <rbrownwsws@googlemail.com>
2025-08-11 06:44:11 +03:00
Damien Elmes
fb2e2bd37a Revert "Fix/Retention help button bounds (#4253)" (#4258)
This reverts commit 5462d99255.
2025-08-09 16:46:25 +10:00
Luc Mcgrady
f4266f0142 Feat/Neaten dr graph x-axis (#4251)
* Remove "Plotted on x axis"

* Add: X tick format

* fix formatx

* Fix: Regular simualtor x axis
2025-08-08 20:30:10 +10:00
Luc Mcgrady
5462d99255 Fix/Retention help button bounds (#4253)
* Move onTitleClick

* rename variable

* Fix: Tabbing issues
2025-08-08 10:56:50 +03:00
Luc Mcgrady
2d60471f36 Use space-around for tabbed values (#4252)
* space-around

* have your cake and eat it
2025-08-07 06:36:53 +03:00
user1823
5c6e2188e2 Limit time studied today to minutes (#4242)
* Limit time studied today to minutes

* Update timespan.rs

* Update today.rs

* Update timespan.rs

* Update today.rs

* Update today.rs

* Update time.ts

* Update time.ts

* Update timespan.rs

* Update timespan.rs

* Update timespan.rs

* Update today.rs
2025-08-06 19:30:44 +10:00
llama
aae9f53e79 set min height for simulator graph (#4248) 2025-08-06 18:22:43 +10:00
Thomas Rixen
a77ffbf4a5 Statistics "Reviews" graph, make the color of "New" and "Learning" cards consistent with the color of card count (#4245)
* Statistics Reviews graph, make the color of New and Learning cards consistent with the color of card count

* removing bleu warning

* contributors
2025-08-06 18:07:10 +10:00
Jarrett Ye
2b55882cce Fix/use real step count to simulate (#4240)
* Fix/use real step count to simulate

* Update licenses.json
2025-08-04 16:01:26 +10:00
Luc Mcgrady
0d0c42c6d9 "Workload" variable typo (#4239) 2025-08-04 16:00:27 +10:00
Luc Mcgrady
b76918a217 Feat/Show health check and already optimal at the same time (#4238) 2025-08-04 16:00:02 +10:00