Skip to content

Fix anatomy quiz system selection and add i18n + tests#174

Merged
ianfhunter merged 1 commit intomainfrom
codex/fix-quiz-item-retrieval-issue
Feb 4, 2026
Merged

Fix anatomy quiz system selection and add i18n + tests#174
ianfhunter merged 1 commit intomainfrom
codex/fix-quiz-item-retrieval-issue

Conversation

@ianfhunter
Copy link
Owner

Motivation

  • The quiz was only selecting new targets from the currently visible system, causing repeated items when viewing a different system; the UI also contained hardcoded English strings that should use i18n.

Description

  • Decoupled question selection from the visible system by selecting from ALL_PARTS while rendering only the systems that should be visible; added getDisplaySystemIds to compute which systems to show when a target belongs to a different system (src/pages/AnatomyQuiz/anatomyQuizUtils.js).
  • Updated AnatomyQuiz.jsx to use the new display logic and displayParts for the SVG, and to keep selection deterministic via the existing seeded RNG (src/pages/AnatomyQuiz/AnatomyQuiz.jsx).
  • Replaced several hardcoded UI strings with t(...) calls to enable i18n (hints, messages, labels, buttons).
  • Added unit tests for the new display-system logic and imported the utility into the existing test suite (src/pages/AnatomyQuiz/AnatomyQuiz.test.js).

Testing

  • Ran the Anatomy Quiz unit tests with Vitest: npm run test:run -- src/pages/AnatomyQuiz/AnatomyQuiz.test.js, and all tests passed (19 tests, 1 file).
  • No other automated test failures were observed for the modified files.

Codex Task

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ianfhunter ianfhunter merged commit f9296ee into main Feb 4, 2026
5 checks passed
@ianfhunter ianfhunter deleted the codex/fix-quiz-item-retrieval-issue branch February 4, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant