Skip to content

Fix due command undercounting due cards - #199

Open
oddish3 wants to merge 2 commits into
eudoxia0:masterfrom
oddish3:fix/due-command-undercounts
Open

Fix due command undercounting due cards#199
oddish3 wants to merge 2 commits into
eudoxia0:masterfrom
oddish3:fix/due-command-undercounts

Conversation

@oddish3

@oddish3 oddish3 commented Aug 5, 2026

Copy link
Copy Markdown

print_due called Database::due_on, which matches only cards whose due_date is exactly the given date.

This misses never-reviewed cards (due_date is NULL) and overdue cards (due_date before the given date), both of which a drill session would still pull in via all_due.

Switching due to use all_due so it reports what a drill session would actually select.

`print_due` called `Database::due_on`, which matches only cards whose
due_date is exactly the given date. This misses never-reviewed cards
(due_date is NULL) and overdue cards (due_date before the given date),
both of which a drill session would still pull in via `all_due`. Switch
`due` to use `all_due` so it reports what a drill session would actually
select.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread src/cmd/due.rs Outdated
@eudoxia0 eudoxia0 self-assigned this Aug 5, 2026
@eudoxia0

eudoxia0 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Ok so New cards are kind of an edge case.

If I'm doing hashcards due . today, yes, I want cards due today, before today, or new cards.

But if I'm doing hashcards due . tomorrow or some specific date, I don't want new cards, or overdue cards, I want only those who due date is that date, exactly.

@oddish3

oddish3 commented Aug 17, 2026

Copy link
Copy Markdown
Author

Fair point.
Updated due_report to use all_due (overdue + never-reviewed + due-today) only when date == Date::today(), and fall back to the exact due_on match for any other date. Added a regression test for the future-date case alongside the existing one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants