Skip to content

Add interactive AI chat quizzes - #157

Merged
pirajoke merged 1 commit into
mainfrom
codex/ai-interactive-tests-20260921
Sep 21, 2026
Merged

pirajoke merged 1 commit into
mainfrom
codex/ai-interactive-tests-20260921

Conversation

@pirajoke

Copy link
Copy Markdown
Owner

Outcome

  • routes Lexi's quick-quiz starter and explicit multilingual quiz requests to a native five-question Telegram test
  • alternates word-to-meaning and meaning-to-word answer buttons with immediate feedback
  • adds a per-answer final review and actions to retry, start another test, or continue the AI conversation
  • activates reviewed Mirror v10 guidance so typed practice varies between dialogue, choice, cloze, ordering, correction, and free response without repeating the last task

Safety and persistence

  • reuses the existing durable native block, SRS, XP, stale-callback, and idempotency path
  • no schema change and no AI provider call is required for the deterministic quiz
  • preserves unrelated local research changes

Verification

  • focused affected suite: 151 tests green
  • full suite: 1229 tests green, 3 skipped
  • compileall and git diff --check green

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-21T08:25:30.037376Z b2e00ec PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread bot.py
Comment on lines +7924 to +7925
if user_data.get("block_pack_id") == pack.pack_id:
add(user_data.get("block_all_indices", ()))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment thread bot.py
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":

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@pirajoke
pirajoke merged commit eeb6189 into main Sep 21, 2026
1 check passed
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