Commit graph

12021 commits

Author SHA1 Message Date
llama
a73f1507ba
use KeyboardEvent.key instead of code (#4114) 2025-06-25 14:08:25 +03:00
Damien Elmes
b250a2f724 Add terminal support for *nix 2025-06-22 21:52:44 +07:00
Damien Elmes
d2f818fad2 macOS launcher improvements
- do mpv initial run in parallel
- improve messages, show dots regularly
2025-06-22 21:03:02 +07:00
Damien Elmes
eb6c977e08 Add menu to launcher, and improve terminal display on Windows 2025-06-22 20:25:15 +07:00
Damien Elmes
782645d92e Bump beta version 2025-06-21 19:17:48 +07:00
Damien Elmes
246fa75a35 Create release wheel as part of normal build
Avoids the need for a separate publish
2025-06-21 19:17:48 +07:00
Damien Elmes
cfd448565a Fix sync-server separate compile
https://forums.ankiweb.net/t/anki-25-06-beta/62271/96
2025-06-21 19:17:48 +07:00
user1823
5cc3a2276b
Fix repeated ticks in reviews graph (#4108)
Regressed in #4086
2025-06-21 19:17:18 +07:00
user1823
c28306eb94
Save dr and decay in card even if item is None (#4106)
* 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
2025-06-21 19:16:54 +07:00
Jarrett Ye
88538d8bad
Fix/set due date on intraday learning card (#4101)
- Introduced `next_day_start` parameter to `set_due_date` for improved due date handling.
- Updated logic to account for Unix epoch timestamps when calculating due dates.
2025-06-21 19:15:30 +07:00
llama
cc395f7c44
Upgrade to nom 8.0.0 (#4105)
* bump nom to 8.0.0

* update cloze.rs

* update template.rs

* update imageocclusion.rs

* update search/parser.rs

* update card_rendering/parser.rs

* replace use of fold_many0 with many0

in nom 8, `many0` doesn't accumulate when used within `recognize`
2025-06-21 19:15:19 +07:00
Jarrett Ye
a4c95f5fbd
include decay in ComputeMemoryStateResponse (#4102)
* include decay in ComputeMemoryStateResponse

* Add decay attribute to ComputedMemoryState and update Collection methods

* Refactor decay calculation into a helper function for improved readability and maintainability in memory state management

* format & clippy
2025-06-20 20:59:35 +03:00
Damien Elmes
b781dfabf5 Add helpers to run Qt 6.7 and 6.9
Removed the 6.8 one, as that's our default
2025-06-20 21:55:38 +07:00
Damien Elmes
718f39fdf3 Temporarily force-enable prereleases
Some users are struggling to read or understand the steps to enable
it.
2025-06-20 19:05:30 +07:00
Damien Elmes
b2dc5a0263 Bump version 2025-06-20 16:52:25 +07:00
Damien Elmes
d542ae9065 Fix check action on Windows ARM
- Update nextest (not required)
- Build nextest without self-update, which pulls in ring
- Disable running of tests in rsbridge, as it has no tests, and
requires host arch's python.lib to execute
- A double \ in CARGO_TARGET_DIR was breaking update_* tests
2025-06-20 16:52:25 +07:00
Damien Elmes
cd71931506 Launcher tweaks
- Handle beta/rc tags in .version when launching Anki
- Update pyproject.toml/.python_version if distributed version newer
- Support prerelease marker to opt in to betas
- Check for updates when using uv sync
- Avoid system Python by default, as it can cause breakages
(e.g. ARM Python installed on Windows)
2025-06-20 16:13:50 +07:00
Damien Elmes
4abc0eb8b8 Use same version for anki-release; publish to main index 2025-06-20 16:13:50 +07:00
Damien Elmes
a60a955c61 Handle beta/rc tags, bump beta, add exact version pin to aqt 2025-06-20 16:13:50 +07:00
Damien Elmes
a41c60c016 Trigger uv sync if user approves update 2025-06-20 16:13:50 +07:00
Damien Elmes
8e20973c52 Drop remaining qt5 code 2025-06-20 16:13:50 +07:00
Damien Elmes
cd411927cc Split libankihelper into a separate module
It's rarely updated, and the old approach resulted in a 'proper' aqt
build only being done on a Mac.
2025-06-20 16:13:49 +07:00
Damien Elmes
344cac1ef4 Update translations 2025-06-19 14:42:08 +07:00
Damien Elmes
f98f620116 Avoid committing release deps
These will only get bumped on a new publish, and keeping the file
around leads to spurious security alerts.
2025-06-19 14:14:57 +07:00
Damien Elmes
04996c77f3
Migrate build system to uv (#4074)
* Migrate build system to uv

Closes #3787, and is a step towards #3081 and #4022

This change breaks our PyOxidizer bundling process. While we probably
could update it to work with the new venvs & lockfile, my intention
is to use this as a base to try out a uv-based packager/installer.

Some notes about the changes:

- Use uv for python download + venv installation
- Drop python/requirements* in favour of pyproject files / uv.lock
- Bumped to latest Python 3.9 version. The move to 3.13 should be
a fairly trivial change when we're ready.
- Dropped the old write_wheel.py in favour of uv/hatchling. This has
the unfortunate side-effect of dropping leading zeros in our wheels,
which we could try hack around in the future.
- Switch to Qt 6.7 for the dev repo, as it's the first PyQt version
with a Linux/ARM WebEngine wheel.
- Unified our macOS deployment target with minimum required for ARM.
- Dropped unused fluent python files
- Dropped unused python license generation
- Dropped helpers to run under Qt 5, as our wheels were already
requiring Qt 6 to install.

* Build action to create universal uv binary

* Drop some PyOxidizer-related files

* Use Windows ARM64 cargo/node binaries during build

We can't provide ARM64 wheels to users yet due to #4079, but we can
at least speed up the build.

The rustls -> native-tls change on Windows is because ring requires
clang to compile for ARM64, and I figured it's best to keep our Windows
deps consistent. We already built the wheels with native-tls.

* Make libankihelper a universal library

We were shipping a single arch library in a purelib, leading to
breakages when running on a different platform.

* Use Python wheel for mpv/lame on Windows/Mac

This is convenient, but suboptimal on a Mac at the moment. The first
run of mpv will take a number of seconds for security checks to run,
and our mpv code ends up timing out, repeating the process each time.
Our installer stub will need to invoke mpv once first to get it validated.

We could address this by distributing the audio with the installer/stub,
or perhaps by putting the binaries in a .pkg file that's notarized+stapled
and then included in the wheel.

* Add some helper scripts to build a fully-locked wheel

* Initial macOS launcher prototype

* Add a hidden env var to preload our libs and audio helpers on macOS

* qt/bundle -> qt/launcher

- remove more of the old bundling code
- handle app icon

* Fat binary, notarization & dmg

* Publish wheels on testpypi for testing

* Use our Python pin for the launcher too

* Python cleanups

* Extend launcher to other platforms + more

- Switch to Qt 6.8 for repo default, as 6.7 depends on an older
libwebp/tiff which is unavailable on newer installs
- Drop tools/mac-x86, as we no longer need to test against Qt 5
- Add flags to cross compile wheels on Mac and Linux
- Bump glibc target to 2_36, building on Debian Stable
- Increase mpv timeout on macOS to allow for initial gatekeeper checks
- Ship both arm64 and amd64 uv on Linux, with a bash stub to pick
the appropriate arch.

* Fix pylint on Linux

* Fix failure to run from /usr/local/bin

* Remove remaining pyoxidizer refs, and clean up duplicate release folder

* Rust dep updates

- Rust 1.87 for now (1.88 due out in around a week)
- Nom looks involved, so I left it for now
- prost-reflect depends on a new prost version that got yanked

* Python 3.13 + dep updates

Updated protoc binaries + add helper in order to try fix build breakage.
Ended up being due to an AI-generated update to pip-system-certs that
was not reviewed carefully enough:
https://gitlab.com/alelec/pip-system-certs/-/issues/36

The updated mypy/black needed some tweaks to our files.

* Windows compilation fixes

* Automatically run Anki after installing on Windows

* Touch pyproject.toml upon install, so we check for updates

* Update Python deps

- urllib3 for CVE
- pip-system-certs got fixed
- markdown/pytest also updated
2025-06-19 14:03:16 +07:00
user1823
bbf533b172
Update the default value of FSRS-6 decay in forgetting curve (#4096)
Changed in 037345fd57
2025-06-19 13:25:30 +07:00
user1823
ba0d590c16
Clear desired retention and decay when changing decks (#4095)
These values are preset-specific and entries from previous deck may cause issues.
2025-06-19 13:23:49 +07:00
Damien Elmes
a63e4ef1c8 Revert "Ignore TaskManager's on_done callback if collection unloaded (#4076)"
This reverts commit ccc42227d8.

Closes #4094
2025-06-19 13:17:30 +07:00
Damien Elmes
c5eb00cb42 Experiment with Claude
*grumbles about lack of support for a dot prefix*
2025-06-19 13:17:30 +07:00
user1823
44f3bbbbc9
Limit study time to hours in reviews graph (#4086)
* Add maxUnit argument to naturalUnit

* Limit study time to hours in reviews graph

Relevant discussions:
- https://forums.ankiweb.net/t/reviews-graph-units-of-total-time-studied-suggestion/61237
- https://forums.ankiweb.net/t/why-does-anki-display-study-time-in-months/37722
- https://forums.ankiweb.net/t/poll-use-hours-in-total-time-stats/62076
- https://github.com/ankitects/anki/pull/3901#issuecomment-2973161601

* Use the new approach for native stability in Card Info

* Use a simpler approach
2025-06-18 14:34:58 +07:00
Damien Elmes
4040a3c1f9 Fix stale 'now' in timing info
Closes #4089
2025-06-18 12:18:38 +07:00
llama
669312d5eb
Fix unescaped deck names potentially missing from overview (#4084)
* html-escape deck name in overview

* move escaping past hook
2025-06-18 11:35:02 +07:00
Lukas Sommer
b4cee124c0
Comments for translators (#4075)
* Update deck-config.ftl

* Update deck-config.ftl

* Update comment

* Udpate comments
2025-06-18 11:34:29 +07:00
llama
5cb191d624
Fix IO text labels' fill attr being saved even if default colour (#4083)
* move exporting of fill attr to subclasses

* set text colour for new labels
2025-06-16 13:07:05 +03:00
Jarrett Ye
615bbf95a1
update to fsrs-rs 4.0.0 (#4080)
* update to fsrs-rs 4.0.0

* fix ci

* update test
2025-06-14 12:48:33 +07:00
Luc Mcgrady
11cc9287ff
Fix/Missing cardID special field (#4078) 2025-06-13 10:47:16 +07:00
sorata
b1f3783a6a
use abbr. for days of week (#4077) 2025-06-13 10:46:17 +07:00
Abdo
ccc42227d8
Ignore TaskManager's on_done callback if collection unloaded (#4076)
* Ignore TaskManager's on_done callback if collection unloaded

* Check col.db
2025-06-13 10:45:41 +07:00
Luc Mcgrady
6004616672
Feat/Health check tooltip (#4068)
* Feat/Health check tooltip

* Update ftl/core/deck-config.ftl

* split deckConfigHealthCheckTooltip

* wording change

* separate "(slow)"

* Add title to health check messages
2025-06-13 10:42:47 +07:00
Damien Elmes
e728e8bcb1 Recreate pyenv if it was created with uv
Temporary fix for #4074 breaking normal builds
2025-06-12 12:20:02 +07:00
Damien Elmes
22f4a83222 Bump requests for CVE 2025-06-11 13:35:03 +07:00
Luc Mcgrady
83131cb48e
Feat/Message at 100% progress for optimize (#4069) 2025-06-11 13:31:17 +07:00
sorata
fe750dba9f
style hr element (#4067) 2025-06-11 13:02:08 +07:00
Sunong2008
ccc9d9027a
Delay retention workload info display after FSRS optimization alerts (#4066)
* Update FsrsOptions.svelte

* Update CONTRIBUTORS

* Make it full width too, so it doesn't resize when transitioning past 90

* Make sure the Warning appears after the alert

* Update FsrsOptions.svelte

* Update FsrsOptions.svelte

* Update FsrsOptions.svelte
2025-06-11 13:01:47 +07:00
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
c1fc45928d Bump version 2025-06-06 14:05:33 +07:00
Damien Elmes
e66bbc62ec Update translations 2025-06-06 13:20:08 +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