Skip to content

Simplify translation history: store search_word + learned_language#491

Merged
mircealungu merged 1 commit intomasterfrom
feature/translation-history-v2
Feb 17, 2026
Merged

Simplify translation history: store search_word + learned_language#491
mircealungu merged 1 commit intomasterfrom
feature/translation-history-v2

Conversation

@mircealungu
Copy link
Member

Summary

  • Simplifies translation_search table to just store search_word + learned_language
  • Removes meaning_id dependency (was causing duplicate entries)
  • Filters history by user's current learned language
  • Frontend calls log_translation_search endpoint only for new searches (not re-searches from history)

Migration

Drops old table and creates new simplified schema:

CREATE TABLE translation_search (
    id, user_id, search_word, learned_language_id, search_time
)

Test plan

  • All 161 API tests pass
  • Manual test: search for word → appears in history once
  • Manual test: click history item → no duplicate entry added
  • Manual test: switch language → history shows only that language's searches

🤖 Generated with Claude Code

- Drop meaning_id dependency - just store the search word
- Filter history by user's current learned language
- Add log_translation_search endpoint (called by frontend)
- Only log new searches, not re-searches from history

Migration drops old table and creates new simplified schema.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

ArchLens - No architecturally relevant changes to the existing views

@mircealungu mircealungu merged commit 0789cd0 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

Comments