Repository navigation
v0.9.5
Date: 2026-04-19
Bug Fixes
- Lazy-load spaCy model -- The spaCy NLP model (
en_core_web_sm) is now loaded on first sentence generation instead of at module import time. This allows the/api/healthendpoint to respond immediately on startup, preventing the bundled launcher from timing out on cold first launches. - Favicon served in bundled mode -- The SPA catch-all route now checks whether a requested file exists in the frontend dist directory before falling back to
index.html. Fixes the missing favicon in bundled browser tabs. - Target words lemma mismatch safety net -- When the LLM uses a derived form (e.g. "analysis" instead of the target "analyze"), the tokenizer may not match it back to the original DB record, causing the word to never advance and be picked indefinitely. Feedback now includes
originalTargets(the raw lemmas frompick_target_words), andapply_feedbackensures every originally-picked word advances unless the user explicitly marked it unknown.
Changed
- Test file split -- Extracted SRS algorithm tests (level progression, cooldown queue, POS matching, pick logic, full simulation, and original_targets safety net) from
test_word_store.pyinto a dedicatedtest_algorithm.py.
Changed Files
backend/src/services/tokenizer.py--spacy.load()moved from module scope to lazy_get_nlp()helper.backend/src/main.py-- SPA fallback checks for real files before servingindex.html;FeedbackRequestmodel gains optionaloriginalTargetsfield;submit_feedbackpasses it through.backend/src/services/word_store.py--apply_feedback()acceptsoriginal_targets: list[str]; safety-net loop ensures unmatched picked words still advance.frontend/src/api/reading.ts--FeedbackRequestinterface gains optionaloriginalTargetsfield.frontend/src/views/HomeView.vue-- Storesresponse.wordsand sends them asoriginalTargetsin feedback.backend/tests/test_algorithm.py-- New file: 15 algorithm-focused tests extracted fromtest_word_store.pyplus 3 neworiginal_targetstests.backend/tests/test_word_store.py-- Trimmed to 33 CRUD / metadata / import tests.