ankitects / ankitects/anki

Custom study OK button should be disabled if we know there are no cards

Open
#3,669 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.5k
Forks
3.2k
Avg merge
2d 8h
Merged PRs (30d)
72

Description

how to reproduce:
* Have an empty deck
* open the custom study
* select review ahead

Expected result:
* Okay should be disabled

Actual result
* You can tap okay and get the result "No cards matched the criteria you provided"

I understand that this knowing if the criteria is matched is asynchronous. In some case, I guess it can be slow to know whether "ok" would do anything or not. I assume however that in a lot of case, it'd be quick to either see whether "ok" would lead to more reviews or not.

Because, right now, I find it slightly absurd that Anki (and ankidroid) requires me to tap on "ok" to be able to learn something that it could have told me earlier.

My suggestion would be:
* when the criteria change, start checking whether "ok" would lead to reviewing more cards
* if after .2 seconds (or some other standard delay), no answer is found, enable "ok" button, (maybe with a spinner instead of "ok")
* when the answer is found, enable or disable (and remove the spinner)

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with an empty deck by opening Custom Study and selecting Review Ahead. Trace the custom-study flow and its asynchronous card-matching result; done means the OK button is disabled when no cards match, while delayed checks have a clear loading or fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.