Add translation history tracking for Translation Tab#490
Merged
mircealungu merged 4 commits intomasterfrom Feb 17, 2026
Merged
Conversation
- Add translation_search table to track user searches - Create TranslationSearch model with log_search() and get_history() - Modify /get_multiple_translations to save Meaning records and log searches - Add /translation_history endpoint for retrieving search history Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 tasks
|
ArchLens - No architecturally relevant changes to the existing views |
- Remove db_session.commit() from log_search method (follows codebase pattern) - Add try/except around history logging to prevent request failures - Document the commit responsibility in docstring Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Mark test user email as verified in LoggedInClient fixture - Fix test_student_does_not_have_access_to_cohort: expect 403 (Forbidden) not 401 (Unauthorized) - student is authenticated but not authorized Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove redundant columns (search_word, languages) - derive from meaning - Only log searches that found translations (meaning_id NOT NULL) - Cleaner schema: just user_id, meaning_id, search_time Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
translation_searchtable to track user searches in Translation TabTranslationSearchmodel withlog_search()andget_history()methods/get_multiple_translationsto save Meaning records and log searches/translation_historyendpoint for retrieving search historyTest plan
translation_searchtable has entries/translation_historyendpoint, verify it returns recent searches🤖 Generated with Claude Code