Skip to content

[FEAT-114] Challenges: replay mistakes in a Review tab, with a chosen cooling-off and a due-count badge - #145

Merged
jmunar merged 5 commits into
mainfrom
feat-114-challenges-replay-errors
Oct 23, 2026
Merged

jmunar merged 5 commits into
mainfrom
feat-114-challenges-replay-errors

Conversation

@jmunar

@jmunar jmunar commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Review tab in Challenges: problems you got wrong come back, per dataset and oldest first, once a cooling-off you pick on the page (Now, 1, 3 or 7 days; default 3) has passed since their last attempt.
  • Two right answers in a row, each after its own wait, clear a mistake; a wrong answer resets the count, and right answers in practice count too.
  • Replays are flagged (challenges_attempts.is_review) and never move the staircase, the graded draw's ability or the practice stats.
  • Nothing about mistakes is stored: one CTE over the attempt history defines due, waiting and cleared. The migration adds is_review, challenges_review_current (the mistake being replayed) and challenges_settings (the cooling-off).
  • Due-count badge on the Review tab, counting only visible datasets and swapped out of band after every answer or setting change. This is a small core change: an optional NavItem.badge plus layout::nav_badge and .nav-badge in core.css.
  • Other entry points: a "Review mistakes (N)" link on picker cards, a mistakes line per dataset on Stats, and a review_mistakes command-bar action.
  • Design doc in docs/ideas-05-challenges-replay-mistakes.md; requirements, architecture and the crate README are updated.
  • Bumps ctutils 0.4.2 → 0.4.5 (RUSTSEC-2026-0385, published today) so cargo audit passes.

Test plan

  • make check passes, with 30 new integration tests in crates/myapps-challenges/tests/challenges/review.rs. They cover:
    • each cooling-off value and the settings form, including a 400 for other values
    • clearing after two rights, and the reset after a wrong answer
    • practice answers counting toward clearing, and a cleared mistake reopening
    • Not now, stale forms and double taps, retired problems
    • the badge, including hidden datasets and the out-of-band swap
    • the picker link, the stats line, escaping, Spanish strings, plain-form redirects, and the CSS classes the markup relies on
    • the command bar action
  • A unit test covers nav_badge, which is hidden at 0 and capped at 99+.
  • A Playwright walkthrough at 390 px and 1280 px found no console errors, no failed requests and no XSS.
  • New screenshot: docs/screenshots/challenges-review.png.
  • Manual check: get a problem wrong in practice, set the cooling-off to Now on Review, replay it right twice, and watch the badge count down.

🤖 Generated with Claude Code

jmunar and others added 5 commits October 23, 2026 19:19
Problems you got wrong come back after a cooling-off you choose (now, 1, 3
or 7 days) until two right answers in a row clear them. The queue is derived
from challenges_attempts; replays are flagged is_review and never move the
staircase, the graded ability or the practice stats. The Review tab carries
a due-count badge (new NavItem badge in core), swapped out of band after
each answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
More review tests (Spanish, plain posts, unknown datasets, badge on every
swap, the CSS contract), a Review landing snap, and regenerated screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmunar
jmunar merged commit d716658 into main Oct 23, 2026
2 checks passed
@jmunar
jmunar deleted the feat-114-challenges-replay-errors branch October 23, 2026 17:28
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.

1 participant