Add interactive AI chat quizzes - #157
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2e00eceb7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if user_data.get("block_pack_id") == pack.pack_id: | ||
| add(user_data.get("block_all_indices", ())) |
There was a problem hiding this comment.
Exclude completed quizzes when seeding a new test
When the learner clicks the newly added “New test” button after completing an AI quiz, block_pack_id still matches and block_all_indices still contains the five completed words. These lines fill all five slots before due_word_indices() or pick_block() can contribute, so every new test repeats the identical words and lets repeated attempts inflate their SRS counts and XP. Reuse an active block only while it is genuinely in progress, or exclude the completed AI quiz when handling this action.
Useful? React with 👍 / 👎.
| def format_block_quiz_question(user_data: Mapping[str, Any], idx: int) -> str: | ||
| """Render one quiz prompt without exposing its answer.""" | ||
| locale = learning_card_locale(user_data) | ||
| if block_quiz_direction(user_data) == "target": |
There was a problem hiding this comment.
Suppress answer audio for reverse-recall questions
Whenever TTS succeeds, each odd-position reverse question displays only the meaning here but block_send_question_msg() subsequently calls send_pronunciation(..., idx, ...) unconditionally. That audio speaks the correct target word twice—and the audio fallback can display it as the title—before the learner chooses an answer, invalidating half of the quiz and recording assisted answers as genuine SRS results. Delay or omit pronunciation until after answering when block_quiz_direction() is target.
Useful? React with 👍 / 👎.
Outcome
Safety and persistence
Verification