Skip to content

Comments

Add translation history tracking for Translation Tab#490

Merged
mircealungu merged 4 commits intomasterfrom
feature/translation-history
Feb 17, 2026
Merged

Add translation history tracking for Translation Tab#490
mircealungu merged 4 commits intomasterfrom
feature/translation-history

Conversation

@mircealungu
Copy link
Member

Summary

  • Add translation_search table to track user searches in Translation Tab
  • Create TranslationSearch model with log_search() and get_history() methods
  • Modify /get_multiple_translations to save Meaning records and log searches
  • Add /translation_history endpoint for retrieving search history

Test plan

  • Run migration on database
  • Search in Translation Tab, verify translation_search table has entries
  • Call /translation_history endpoint, verify it returns recent searches

🤖 Generated with Claude Code

- 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>
@github-actions
Copy link

ArchLens - No architecturally relevant changes to the existing views

mircealungu and others added 3 commits February 17, 2026 19:24
- 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>
@mircealungu mircealungu merged commit 3ca7a69 into master Feb 17, 2026
3 checks 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