PracticeLive — recognition mode #31

Open
opened 2026-09-26 13:58:38 +00:00 by belvedere · 0 comments
Collaborator

Objective: The core loop: see a word in the target language, recall the meaning, grade
yourself.

Files:

  • Create: lib/first_thousand_words_web/live/practice_live.ex
  • Modify: lib/first_thousand_words_web/router.ex

Steps:

  1. On mount, build the session queue (bounded, e.g. 20 cards) from Study.Queue.
  2. Show the target-language word large; a reveal control shows the source-language meaning,
    part of speech, and the concept gloss.
  3. Grade buttons: Again / Hard / Good / Easy, each with its next-interval preview
    (e.g. "<10m", "4d") — this is the single highest-value UX detail in an SRS.
  4. Submit through ReviewService.submit_review/4; never update card fields from the LiveView.
  5. Update the progress bar after each answer.

Verify: complete a session in the browser; the DB shows one Review per answer and the
card's due_at moved.

AGENTS.md constraints: start the template with <Layouts.app flash={@flash} current_scope={@current_scope} ...>;
use <.icon> for icons; give every interactive element a stable DOM id for tests;
no inline <script> tags.

**Objective:** The core loop: see a word in the target language, recall the meaning, grade yourself. **Files:** - Create: `lib/first_thousand_words_web/live/practice_live.ex` - Modify: `lib/first_thousand_words_web/router.ex` **Steps:** 1. On mount, build the session queue (bounded, e.g. 20 cards) from `Study.Queue`. 2. Show the target-language word **large**; a reveal control shows the source-language meaning, part of speech, and the concept gloss. 3. Grade buttons: Again / Hard / Good / Easy, each with its next-interval preview (e.g. "<10m", "4d") — this is the single highest-value UX detail in an SRS. 4. Submit through `ReviewService.submit_review/4`; never update card fields from the LiveView. 5. Update the progress bar after each answer. **Verify:** complete a session in the browser; the DB shows one `Review` per answer and the card's `due_at` moved. **AGENTS.md constraints:** start the template with `<Layouts.app flash={@flash} current_scope={@current_scope} ...>`; use `<.icon>` for icons; give every interactive element a stable DOM id for tests; no inline `<script>` tags.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#31
No description provided.