Sync practice tests and question structures with backend API - #7
Conversation
- Update database schema to use multi-entry indexes for `studysetIds` and `termIds` in the `practiceTests` table. - Implement Dexie migration (version 16) to transform existing practice test data. - Adopt `TermAtp` structure within questions to store snapshots of terms (id, term, def). - Update `recordPracticeTest` to automatically calculate results and populate mapping IDs. - Implement `updatePracticeTest` and `getPracticeTestsByTermId`. - Update tests to match new API signatures and data structures.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR updates the
idb-api-layerto match recent changes in the backend GraphQL API.Key changes include:
studysetIdsandtermIds). This allows for efficient reverse lookups.TermAtp): Questions now use a slimTermAtpstructure instead of fullTermobjects. This stores the term and definition text at the time the test was taken, preserving historical accuracy even if terms are edited later.recordPracticeTestandupdatePracticeTestnow automatically calculatequestionsCorrectandquestionsTotalfrom the provided questions, simplifying the API and aligning it with the backend.updatePracticeTestandgetPracticeTestsByTermId.Verified with full test suite passing.
PR created automatically by Jules for task 14544066344165874618 started by @ehanahamed