Skip to content

One word_report table for learners' reports about a word - #914

Merged
mircealungu merged 1 commit into
masterfrom
wt/word-report
Oct 25, 2026
Merged

mircealungu merged 1 commit into
masterfrom
wt/word-report

Conversation

@mircealungu

Copy link
Copy Markdown
Member

Roadmap 0c, step 1 (docs/future-work/llm-tasks-roadmap.md). Nothing new happens on a report yet. The next PR makes a wrong_translation report run the validator.

What changes

  • New word_report table: user, meaning, user word, bookmark, the sentence shown (a copy of its text), origin (exercise / reader / word_list), exercise source, kind, comment.
  • user_word_id and bookmark_id are ON DELETE SET NULL, so a report outlives a validator fix or a deleted bookmark.
  • /report_exercise_issue and /report_meaning write to it; their requests and responses are unchanged.
  • Old reasons are mapped: context_wrong and bad_examples become bad_example, wrong_meaning becomes wrong_translation.
  • /dont_use_in_exercises with reason bad_translation now also files a wrong_translation report. The learner still gets skip.
  • ExerciseReport and MeaningReport are removed; account deletion and account merge handle word_report.

Migration tools/migrations/26-10-25-b--word_report.sql

  • Copies 37 exercise reports and 10 meaning reports.
  • Fills the sentence from the bookmark where the client sent none (32 in prod) or sent [object Object],… (3, all from before 12 Mar).
  • Prints old vs new row counts, then drops exercise_report and meaning_report.
  • Run it right before deploying this: the API that is running now still writes the old tables.

Tested on local MySQL without the DROPs: 35/35 rows copied, every exercise report has a sentence. 1350 tests pass.

🤖 Generated with Claude Code

Replaces exercise_report and meaning_report (roadmap 0c, step 1). A report
keeps the word, the meaning it had, and the sentence it was shown in; the
kind says whether the meaning or the sentence is wrong. "Bad translation"
in the remove dialog now files a report too, besides the skip.

The endpoints are unchanged on the wire: old reasons are mapped
(context_wrong and bad_examples -> bad_example, wrong_meaning ->
wrong_translation).

Migration 26-10-25-b moves the 47 old rows in, fills the sentence from the
bookmark where the client didn't send it, and drops the two old tables.

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

Copy link
Copy Markdown

ArchLens detected architectural changes in the following views:
diff
diff

@mircealungu
mircealungu merged commit 8123192 into master Oct 25, 2026
3 checks passed
@mircealungu
mircealungu deleted the wt/word-report branch October 25, 2026 20:26
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